MCP Inspector¶
MCP Inspector is a visual debugging GUI for the Model Context Protocol. Point it at any MCP-compliant endpoint — a live Gateway SSE stream or a local mcpgateway.wrapper
stdio server — and you can:
- π Browse tools, prompts and resources in real time
- π Invoke tools with JSON params and inspect raw results
- π Watch the full bidirectional JSON-RPC / MCP traffic live
- π Replay or edit previous requests
- π¬ Stream sampling messages (where supported)
π Quick launch recipes¶
All commands use npx (bundled with Node β₯ 14). Feel free to
npm install -g @modelcontextprotocol/inspector
for a global binary.
Use-case | One-liner | What happens |
---|---|---|
1. Connect to Gateway (SSE) | bash<br/>npx @modelcontextprotocol/inspector \\<br/> --url http://localhost:4444/servers/UUID_OF_SERVER_1/sse \\<br/> --header "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN"<br/> | Inspector opens http://localhost:5173 and attaches directly to the gateway stream. |
2. Connect to Gateway (Streamable HTTP) | bash<br/>npx @modelcontextprotocol/inspector \\<br/> --url http://localhost:4444/servers/UUID_OF_SERVER_1/mcp/ \\<br/> --header "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN"<br/> | Inspector opens http://localhost:5173 and attaches directly to the gateway stream. |
3 - Spin up the stdio wrapper in-process | bash<br/>export MCP_AUTH=$MCPGATEWAY_BEARER_TOKEN<br/>export MCP_SERVER_URL=http://localhost:4444/servers/UUID_OF_SERVER_1/mcp<br/><br/>npx @modelcontextprotocol/inspector \\<br/> python3 -m mcpgateway.wrapper<br/> | Inspector forks python3 -m mcpgateway.wrapper , then connects to its stdio port automatically. |
4 - Same, but via uv / uvx | bash<br/>npx @modelcontextprotocol/inspector \\<br/> uvx python3 -m mcpgateway.wrapper<br/> | Uses the super-fast uv virtual-env if you prefer. |
5 - Wrapper already running | Launch the wrapper in another shell, then:bash<br/>npx @modelcontextprotocol/inspector --stdio<br/> | Inspector only opens the GUI and binds to the running stdio server on stdin/stdout. |
π Environment variables¶
Most wrappers / servers will need at least:
export MCP_SERVER_URL=http://localhost:4444/servers/UUID_OF_SERVER_1 # one or many
export MCP_AUTH=$(python3 -m mcpgateway.utils.create_jwt_token -u admin --secret my-test-key)
If you point Inspector directly at a Gateway SSE stream, pass the header:
π§ Inspector Highlights¶
- Real-time catalogue - tools/prompts/resources update as soon as the Gateway sends
*Changed
notifications. - Request builder - JSON editor with schema hints (if the tool exposes an
inputSchema
). - Traffic console - colour-coded view of every request & reply; copy as cURL.
- Replay & edit - click any previous call, tweak parameters, re-send.
- Streaming - see
sampling/createMessage
chunks scroll by live (MCP 2025-03-26 spec).
π° Connecting through Translate Bridge (stdio β SSE bridge)¶
Want to test a stdio-only MCP server inside Inspector?
# Example: expose mcp-server-git over SSE on :8000
python3 -m mcpgateway.translate --stdio "uvx mcp-server-git" --expose-sse --port 9002
# SSE stream: http://localhost:8000/sse
# POST back-channel: http://localhost:8000/message
Then simply start Inspector:
Translate Bridge handles the bridging; Inspector thinks it is speaking native SSE.