GM

granludo/mcp-inspector-cli

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

4 stars 7 forks 品質 80 トレンド 26GPL-3.0

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

  1. Clone the repository:

    git clone [email protected]:granludo/mcp-inspector-cli.git>
    cd mcp-inspector-cli
    
  2. create venv

    uv venv
    source .venv/bin/activate
    uv pip install -r requirements.txt
    
  3. 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 ===
GitHub で README 全文を見る

インストール

npx -y @modelcontextprotocol/server-filesystem /tmp
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "my-server": { "command": "python", "args": ["my_server.py"] } } }