Skip to content

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 its Streamable HTTP endpoint β€” 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.

Base URL

  • Direct installs (uvx, pip, or docker run): http://localhost:4444
  • Docker Compose (nginx proxy): http://localhost:8080
Use-case One-liner What happens
1. Connect to Gateway (SSE)
bash<br/>npx @modelcontextprotocol/inspector \\<br/> --server-url http://localhost:4444/servers/UUID_OF_SERVER_1/sse \\<br/> --transport 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/> --server-url http://localhost:4444/servers/UUID_OF_SERVER_1/mcp/ \\<br/> --transport http \\<br/> --header "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN"<br/>
Inspector opens http://localhost:5173 and attaches directly to the gateway stream.

πŸ” 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@example.com --secret my-test-key-but-now-longer-than-32-bytes)

If you point Inspector directly at a Gateway SSE stream, pass the header:

--header "Authorization: Bearer $MCP_AUTH"

πŸ”§ 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:9002/sse
#   POST back-channel: http://localhost:9002/message

Then simply start Inspector:

npx @modelcontextprotocol/inspector \
  --server-url http://localhost:9002/sse \
  --transport sse

Translate Bridge handles the bridging; Inspector thinks it is speaking native SSE.