Skip to content

Repository files navigation

MCP Inspector

A desktop GUI for exploring and testing Model Context Protocol servers. Connect over STDIO, SSE, or streamable HTTP; browse tools, resources, and prompts; invoke them through schema-driven forms; and watch the full request/response stream in a live console.

Built with Python, tkinter, and the official mcp SDK.

Features

  • Three transports — STDIO (launch a local server process), SSE, and streamable HTTP, with per-transport configuration for command/args/env or URL/headers.
  • Capability tabs — dedicated views for Tools, Resources, and Prompts, populated automatically on connect based on what the server advertises.
  • Schema-driven tool forms — tool arguments render as a live input form built from the tool's JSON Schema.
  • Resource browser — list and read any resource the server exposes.
  • Prompt runner — fill in prompt arguments and view the rendered messages.
  • Ping & server info — quick health check and server metadata at a glance.
  • Request/response console — every call is logged with its payload and result for debugging.
  • Dark Catppuccin-inspired theme out of the box.

Quick start

python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
python3 main.py

Try it against the bundled example server

The repo includes example_server.py, a small FastMCP server with sample tools, resources, and prompts.

  1. Launch the app: python3 main.py
  2. In the sidebar:
    • Transport: STDIO
    • Command:python3
    • Args:example_server.py
  3. Click Connect. Tools, resources, and prompts will populate automatically.

Connecting to an SSE or HTTP server

Select the transport in the sidebar and provide the server URL. For SSE the client will auto-append /sse if it isn't already present. Custom headers (e.g., auth tokens) can be added in the headers editor.

Building a standalone executable

To produce a single-file binary in dist/mcpviewer:

source env/bin/activate
pip install -r requirements-dev.txt
pyinstaller mcpviewer.spec

The spec uses collect_all for mcp, anyio, pydantic, and pydantic_settings to capture their dynamic submodules. If new hidden-import errors appear at runtime, add the offending package to that list in mcpviewer.spec.

Project layout

main.py # entry point
app.py # main window, wires the client to the UI
mcp_client.py # async MCP client running in a background thread
example_server.py # sample FastMCP server for testing
ui/
sidebar.py # connection configuration panel
tools_tab.py # tool list + schema-driven argument form
resources_tab.py # resource browser
prompts_tab.py # prompt runner
ping_tab.py # ping and server info
console_tab.py # request/response log
theme.py # color constants and ttk styles
widgets.py # reusable widgets (ScrolledText, JsonView, etc.)

The async MCP work runs in a dedicated daemon thread; UI updates are marshaled back to the tkinter main thread through self.after(...) callbacks. See CLAUDE.md for a deeper architecture note.

Requirements

  • Python 3.10+
  • mcp >= 1.0.0 (installed via requirements.txt)
  • tkinter (ships with most Python distributions; on Debian/Ubuntu install python3-tk)

License

See repository for license details.

About

Desktop GUI for exploring and testing MCP (Model Context Protocol) servers — Python + tkinter.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages