mcptui
The Postman for Model Context Protocol (MCP)
A modern, interactive Terminal UI and playground for testing, inspecting, and debugging MCP servers.
🚀 How to Run mcptui (Quickstart)
Choose whichever method you prefer:
⚡ Method 1: Zero-Install (Run directly via uvx)
If you have uv installed, launch mcptui instantly without cloning or setting up virtual environments:
# Test drive the built-in demo server:
uvx --from git+https://github.com/kimarsen/mcptui mcptui demo
# Connect directly to your own server script:
uvx --from git+https://github.com/kimarsen/mcptui mcptui run "python my_server.py"
📦 Method 2: Clone & Run in PowerShell / Bash (Standard Method)
# 1. Clone the repository
git clone https://github.com/kimarsen/mcptui.git
cd mcptui
# 2. Launch interactive demo in 1 command
uv run mcptui demo
(If you don't have uv yet, install it via powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" or use standard pip install -e .)
🛠 Method 3: Install Globally as a CLI Tool
# With uv tool:
uv tool install --from git+https://github.com/kimarsen/mcptui mcptui
# Or with pipx:
pipx install git+https://github.com/kimarsen/mcptui.git
# Now 'mcptui' is available everywhere in your terminal:
mcptui demo
mcptui run "python my_server.py"
mcptui servers
📥 Method 4: GitHub Releases (.whl packages)
Pre-built wheels and source distributions are automatically packaged on every release. You can download them directly from the Releases page and install via pip install mcptui-*.whl.
🎯 Why mcptui?
Building and debugging MCP (Model Context Protocol) servers is rapidly becoming a core workflow for AI developers. But today, testing servers is painful:
- You have to edit
claude_desktop_config.jsonand restart Claude Desktop repeatedly. - You waste money and time on LLM token costs just to check if a simple function runs without syntax errors.
- Official web inspectors require Node.js, launch heavy browser tabs (
localhost:5173), and don't fit into terminal workflows.
mcptui fixes this completely. It gives you a dedicated, keyboard-driven Terminal UI (TUI) playground to test tools, inspect schemas, browse resources, preview prompts, and watch live JSON-RPC 2.0 traffic in real time with zero token costs.
┌────────────────────────────────────────────────────────────────────────┐
│ mcptui | Postman for MCP [* mcptui-demo] (18ms) │
├────────────────────────────────────────────────────────────────────────┤
│ [1] Tools [2] Resources [3] Prompts [4] Protocol Logs [5] History │
├─────────────────────────┬──────────────────────────────────────────────┤
│ Filter tools... │ TOOL: calculate │
│ ─────────────────────── │ Safe arithmetic calculation │
│ > calculate │ │
│ > weather │ Arguments (JSON) │
│ > system_info │ ┌──────────────────────────────────────────┐ │
│ > text_analyzer │ │ { "expression": "100 * 2 + 42" } │ │
│ > mock_query │ └──────────────────────────────────────────┘ │
│ │ [Execute (Ctrl+Enter)] [Copy Result] OK 18ms │
│ │ │
│ │ Response │
│ │ ┌──────────────────────────────────────────┐ │
│ │ │ { "result": 242, "status": "success" } │ │
│ │ └──────────────────────────────────────────┘ │
└─────────────────────────┴──────────────────────────────────────────────┘
🛠 Building Your First MCP Server in 2 Minutes
Want to create your own MCP server and test it with mcptui? Here is the complete minimal guide:
Step 1: Install the MCP Python SDK
pip install mcp
# or with uv:
uv add mcp
Step 2: Write your server (my_server.py)
import asyncio
from mcp.server.mcpserver import MCPServer
# 1. Initialize server
server = MCPServer("my-first-server")
# 2. Expose a tool that AI agents can execute
@server.tool(name="calculate_discount", description="Calculate price after applying percentage discount")
def calculate_discount(price: float, discount_percent: float) -> str:
discounted = price * (1.0 - (discount_percent / 100.0))
return f"Original: ${price}, Discount: {discount_percent}%, Final Price: ${round(discounted, 2)}"
# 3. Expose a static data resource
@server.resource(uri="store://catalog", name="Store Catalog", mime_type="application/json")
def get_catalog() -> str:
return '{"items": ["Laptop", "Mouse", "Keyboard"], "status": "in_stock"}'
# 4. Run over standard input/output (stdio)
if __name__ == "__main__":
asyncio.run(server.run_stdio_async())
Step 3: Test and Debug Live in mcptui
uv run mcptui run "python my_server.py"
Your new tool calculate_discount and resource store://catalog will instantly appear in the TUI! Fill in parameters, press Ctrl+Enter, and verify the output in 20ms.
Step 4: Connect to Claude Desktop or Cursor
Save it into your local mcp.json or %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"my-store-server": {
"command": "python",
"args": ["path/to/my_server.py"]
}
}
}
(Or simply run mcptui add my-store-server "python path/to/my_server.py" and mcptui will register it for you!)
✨ Features
-
🛠 Interactive Tool Workspace:
- Auto-generates clean JSON parameter templates from tool
inputSchema. - In-terminal JSON editor with error validation.
- One-click execution (
Ctrl+Enter) with live duration & latency measurement (OK 18ms). - Pretty-printed, syntax-highlighted output with clipboard copying.
- Auto-generates clean JSON parameter templates from tool
-
📚 Resource Explorer:
- Browse available server resources and dynamic URI templates.
- Read resources with automatic syntax detection (Markdown, JSON, Plain Text).
-
💬 Prompt Inspector:
- Test prompt templates with dynamic argument substitution.
- Preview generated message sequences (System, User, Assistant) before sending them to LLMs.
-
🕵️ Live JSON-RPC 2.0 Traffic Inspector:
- Intercepts and logs all raw protocol packets (
>>> SENTand<<< RECV). - Search and filter messages by method (
tools/call,initialize, etc.). - Protocol latency, request/response matching, and packet export.
- Intercepts and logs all raw protocol packets (
-
🕒 Execution History & Replay:
- Stores recent invocations with timestamps, status, input parameters, and duration.
- Easily copy previous requests or inspect errors.
-
🔍 Auto-Discovery & Local Server Management:
- Automatically scans and imports configurations from:
- Claude Desktop (
claude_desktop_config.jsonon macOS, Windows, Linux) - Cursor (
.cursor/mcp.json& global settings) - Local project
mcp.json/.mcp.json
- Claude Desktop (
- Register any server permanently with
mcptui add <name> <command>. - Switch between servers on the fly with
F2.
- Automatically scans and imports configurations from:
🤖 Headless CLI & Automation
mcptui also works as a scriptable headless CLI for automated testing and CI/CD pipelines:
# Register a server into local mcp.json permanently
mcptui add notes "python examples/sample_server.py"
# List all registered and discovered servers
mcptui servers
# Headless capabilities inspection
mcptui list notes
# Or on the fly without saving:
mcptui list --cmd "python examples/sample_server.py"
# Execute a tool headlessly and get clean JSON output
mcptui call convert_temperature '{"value": 100, "from_scale": "C", "to_scale": "F"}' --server notes
# Remove a server from local config
mcptui remove notes
⌨️ Keybindings
| Key | Action |
|---|---|
1 – 5 |
Switch active tab (Tools, Resources, Prompts, Logs, History) |
Ctrl + Enter |
Execute active tool / Read resource / Get prompt |
F2 |
Open Server Switcher modal |
F5 / Ctrl + R |
Reload server capabilities |
Tab / Shift + Tab |
Navigate between sidebar, editor, and response view |
Ctrl + Q / q |
Quit mcptui |
📄 License
MIT License. Contributions, feedback, and stars are warmly welcome! ⭐
Metadata
Release files for mcptui 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcptui-0.1.0.tar.gz | 98.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcptui-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 133.5 kB
Release files / mcptui-0.1.0.tar.gz
| Download URL | mcptui-0.1.0.tar.gz |
|---|---|
| Size | 98.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ced745b366f0db72ebe1264844e36a6e9a40103a72fa6e3968cc3d973030241d
|
|
BLAKE2b-256 checksum How to use checksums |
d52c7379615ea27b63859b67012330ce6aff9bd2970f303c1564e7f7f7cfe171
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / mcptui-0.1.0-py3-none-any.whl
| Download URL | mcptui-0.1.0-py3-none-any.whl |
|---|---|
| Size | 35.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
425d7d48a44214ebd55b19c5130bfaf21e6aa3468c997edb6210e6a09fafce66
|
|
BLAKE2b-256 checksum How to use checksums |
b6ee10ddf5793e3d19ed90c1efb318d335977764cd7e3d241436708bfb44958f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|