- The script uses LangChain helper functions to convert MCP tool metadata into LangChain tools.
- It creates a concise prompt that instructs the LLM to list available tools (without invoking them).
- The script prints the discovered tool list and the total count.
- Defines the tracker MCP endpoint and transport (SSE in this example).
- Calls
convert_mcp_to_langchain_toolsto fetch MCP tool metadata and produce LangChain-compatible tools. - Instantiates a
ChatOpenAILLM client using variables from your.env. - Sends a controlled prompt asking the model to list tools without invoking any.
- Prints the model response and logs the discovered tool count.
- The script reads OpenAI-compatible variables from a
.envfile located at the repository root (adjust the parent path if your layout differs). - Key variables used by the script:
OPENAI_MODEL_ID— LLM model identifierOPENAI_BASE_URL— base URL for the OpenAI-compatible APIOPENAI_API_KEY— API key / bearer tokenOPENAI_TEMPERATURE— optional temperature setting (default0.2)TRACKER_MCP_URL— optional override for the tracker MCP endpoint (defaulthttp://localhost:8086/sse)
Ensure your
.env contains the required OpenAI-compatible variables (OPENAI_MODEL_ID, OPENAI_BASE_URL, OPENAI_API_KEY). If TRACKER_MCP_URL is not set in the environment, the script uses the default http://localhost:8086/sse.- The sample output indicates the tracker MCP exposes four tools:
create_issuelist_issuesget_issueupdate_issue
Next steps and usage ideas
- Use
list_issuesto fetch and inspect current tickets before creating new ones. - Use
create_issueto file new tickets based on outputs from an upstream FinOps agent. - Use
update_issueto change status, add comments, or attach metadata as workflows progress. - If you prefer an interactive exploration, connect an AI coding assistant (e.g., Claude Code or other coding-capable agents) to the MCP and have it enumerate the tools and propose example calls interactively.
The log shows SSE transport in use and warns that SSE is deprecated as of MCP 2025-03-26. If you control the MCP server, consider migrating to
streamable_http or another supported transport to avoid future compatibility issues.- LangChain: https://langchain.com
- OpenAI Codex: https://openai.com/blog/openai-codex
- MCP / tracker integration examples: check this repo for agent integration samples and the project README for deployment details
create_issue and update_issue (and other tracker tools) driven by outputs from your FinOps or automation agents.