Debugging the MCP Server
Debugging with MCP Inspector
MCP Inspector is a debugging tool for MCP servers.
Debug locally over stdio transport
You can inspect a local Apollo MCP Server by running it with MCP Inspector.
Run the MCP Server with Inspector:
1operations:
2 source: local
3 paths:
4 - <absolute path to this git repo>/graphql/weather/operations/
5schema:
6 source: local
7 path: <absolute path to this git repo>/graphql/weather/api.graphql
8transport:
9 type: stdio1npx @modelcontextprotocol/inspector \
2 target/debug/apollo-mcp-server <path to the preceding config>Example output
Starting MCP inspector...
⚙️ Proxy server listening on port 6277
🔍 MCP Inspector is up and running at http://127.0.0.1:6274 🚀In a browser, go to the URL returned by Inspector, then click Connect and List Tools. You should see the tools for the operations you provided.
Debug over the Streamable HTTP transport
When running the MCP Server over the Streamable HTTP transport, you can run MCP Inspector as follows.
Start the MCP Server in Streamable HTTP mode:
1operations:
2 source: local
3 paths:
4 - <absolute path to this git repo>/graphql/weather/operations/
5schema:
6 source: local
7 path: <absolute path to this git repo>/graphql/weather/api.graphql
8transport:
9 type: streamable_http
10 address: 127.0.0.1
11 port: 80001target/debug/apollo-mcp-server <path to the above config>Start the MCP Inspector:
1npx @modelcontextprotocol/inspectorIn a browser, go to the URL returned by Inspector, then fill in the details:
Transport Type: Select
Streamable HTTPURL: Enter
http://127.0.0.1:8000/mcp, where the port must match thetransport.portoption
Click Connect and List Tools. You should see the tools for the operations you provided.