/ 目錄 / 演練場 / MCP Inspector
● 官方 modelcontextprotocol ⚡ 即開即用

MCP Inspector

作者 modelcontextprotocol · modelcontextprotocol/inspector

The official debugger for MCP servers — connect to any server, call its tools live, see the raw protocol traffic.

MCP Inspector is the canonical dev tool for MCP. Point it at a server (local or remote), enumerate tools and resources, fire calls with structured inputs, and watch frames go by. First thing to reach for when your server misbehaves.

為什麼要用

核心特性

即時演示

實際使用效果

就緒

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "mcp-inspector": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/inspector"
      ]
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "mcp-inspector": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/inspector"
      ]
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "mcp-inspector": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/inspector"
      ]
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "mcp-inspector": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/inspector"
      ]
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "mcp-inspector",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/inspector"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "mcp-inspector": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "@modelcontextprotocol/inspector"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add mcp-inspector -- npx -y @modelcontextprotocol/inspector

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: MCP Inspector

Debug your MCP server without involving an LLM

👤 Developers ⏱ ~15 min intermediate

何時使用: Claude says 'tool failed' and you need to see what really happened.

步驟
  1. Launch
    npx @modelcontextprotocol/inspector ./my-server.✓ 已複製
    → UI opens
  2. Invoke
    Pick the tool; fill inputs; send.✓ 已複製
    → Result + frames shown
  3. Diagnose
    Toggle raw frames to see protocol-level errors.✓ 已複製
    → Root cause clear

結果: Server bug isolated without LLM noise.

組合

與其他 MCP 搭配,撬動十倍槓桿

mcp-inspector + fastmcp-prefect

Build a FastMCP server; debug it with the Inspector before shipping

Combine mcp-inspector with fastmcp-prefect: Build a FastMCP server; debug it with the Inspector before shipping✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
tools.call (see docs) Invoke any tool the server advertises 1 call
resources.list (see docs) Browse resources 1 call

成本與限制

運行它的成本

API 配額
N/A
每次呼叫 Token 數
N/A
費用
Free OSS
提示
Save common invocations as bookmarks

安全

權限、密鑰、影響範圍

憑證儲存: Local only
資料出站: Whatever the server reaches
切勿授予: Run untrusted MCP servers against your auth tokens

故障排查

常見錯誤與修復

Server won't connect

Check transport (stdio vs SSE); confirm the binary path

替代方案

MCP Inspector 對比其他方案

替代方案何時用它替代權衡
mcp2cliYou prefer command-lineNo GUI for protocol inspection

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills