
granludo/mcp-inspector-cli
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
Inspects MCP servers via cli , only stio servers
Обзор
A comprehensive command-line tool for inspecting, testing, and debugging MCP (Model Context Protocol) servers. This tool provides an interactive interface to explore and test all MCP capabilities including tools, resources, and prompts. - : Connect to MCP servers and test their capabilities through an intuitive menu-driven interface - : Configure and switch between multiple MCP servers - : - Tools: List available tools and execute them with custom arguments - Resources: Browse and read server-provided resources - Prompts: List and retrieve prompts with arguments - : Automatic session logging with timestamps and colored output - : Support for various configuration file formats and locations - : View server stdout/stderr output in real-time - : Intelligent timeout management with user extension options - Python 3.11+ - uv (Python package manager) - MCP server(s) to test against The tool supports multiple configuration methods, checked in order of priority: Create mcp.
README
Показан фрагмент оригинального README. Открыть оригинал.
MCP Inspector CLI
By Ludo (Marc Alier) @granludo
A comprehensive command-line tool for inspecting, testing, and debugging MCP (Model Context Protocol) servers. This tool provides an interactive interface to explore and test all MCP capabilities including tools, resources, and prompts.
Works with STDIO Transport protocol
Features
- Interactive Server Testing: Connect to MCP servers and test their capabilities through an intuitive menu-driven interface
- Multiple Server Support: Configure and switch between multiple MCP servers
- Comprehensive MCP Protocol Support:
- Tools: List available tools and execute them with custom arguments
- Resources: Browse and read server-provided resources
- Prompts: List and retrieve prompts with arguments
- Advanced Logging: Automatic session logging with timestamps and colored output
- Flexible Configuration: Support for various configuration file formats and locations
- Real-time I/O Monitoring: View server stdout/stderr output in real-time
- Timeout Handling: Intelligent timeout management with user extension options
Prerequisites
- Python 3.11+
- uv (Python package manager)
- MCP server(s) to test against
Installation
-
Clone the repository:
git clone [email protected]:granludo/mcp-inspector-cli.git> cd mcp-inspector-cli -
create venv
uv venv source .venv/bin/activate uv pip install -r requirements.txt -
Run directly with uv :
uv run mcp-inspector-cli.py
Configuration
The tool supports multiple configuration methods, checked in order of priority:
1. Command Line Argument
python mcp-inspector-cli.py /path/to/config.json
2. Local Configuration File
Create mcp.json in the same directory as the script:
{
"mcpServers": {
"my-server": {
"command": "python",
"args": ["my_server.py"]
}
}
}
3. Cursor-style Configuration
Place configuration in ~/.cursor/mcp.json:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
},
"git": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-git", "--repository", "/path/to/repo"]
}
}
}
4. Single Server Configuration
For a single server, you can use a simpler format:
{
"command": "uv",
"args": ["run", "main.py"],
"name": "my-custom-server"
}
Usage
Basic Usage
If installed with uv:
mcp-inspector-cli
If running directly with uv:
uv run mcp-inspector-cli.py
With configuration file:
uv run mcp-inspector-cli.py /path/to/config.json
If you have multiple servers configured, you’ll be prompted to select one. For single server configurations, it will connect automatically.
Interactive Menu
Once connected, you’ll see the main menu:
=== MCP Tester Menu ===
Установка
npx -y @modelcontextprotocol/server-filesystem /tmpКонфигурация
{
"mcpServers": {
"my-server": {
"command": "python",
"args": ["my_server.py"]
}
}
}