如何使用MCP Inspector调试MCP工具

官方文档:MCP Inspector

启动MCP Inspector

docker启动

bash 复制代码
docker run --rm --network host -p 6274:6274 -p 6277:6277 -e DANGEROUSLY_OMIT_AUTH=false m.daocloud.io/ghcr.io/modelcontextprotocol/inspector:latest

npx启动

ini 复制代码
DANGEROUSLY_OMIT_AUTH=false npx @modelcontextprotocol/inspector
  • DANGEROUSLY_OMIT_AUTH=false 关闭权限验证,简化后面配置
  • m.daocloud.io/ghcr.io/modelcontextprotocol/inspector:latest 修改为国内镜像,加速下载
  • http://localhost:6274/ UI访问地址
  • http://localhost:6277/ 后端代理地址,一并启动,代理我们的测试请求

启动本地的MCP服务

我本地使用fastMCP开发的服务,使用的StreamableHTTP协议,端口号是8000,打印日志大概如下

markdown 复制代码
$ python server.py
╭────────────────────────────────────────────────────────────────────────────╮
│                                                                            │
│        _ __ ___  _____           __  __  _____________    ____    ____     │
│       _ __ ___ .'____/___ ______/ /_/  |/  / ____/ __ \  |___ \  / __ \    │
│      _ __ ___ / /_  / __ `/ ___/ __/ /|_/ / /   / /_/ /  ___/ / / / / /    │
│     _ __ ___ / __/ / /_/ (__  ) /_/ /  / / /___/ ____/  /  __/_/ /_/ /     │
│    _ __ ___ /_/    \____/____/\__/_/  /_/\____/_/      /_____(*)____/      │
│                                                                            │
│                                                                            │
│                                FastMCP  2.0                                │
│                                                                            │
│                                                                            │
│                🖥️  Server name:     TenderMCP 🚀                            │
│                📦 Transport:       Streamable-HTTP                         │
│                🔗 Server URL:      http://0.0.0.0:8000/mcp                 │
│                                                                            │
│                🏎️  FastMCP version: 2.12.4                                  │
│                🤝 MCP SDK version: 1.18.0                                  │
│                                                                            │
│                📚 Docs:            https://gofastmcp.com                   │
│                🚀 Deploy:          https://fastmcp.cloud                   │
│                                                                            │
╰────────────────────────────────────────────────────────────────────────────╯

配置MCP Inspector UI界面

连接调试

剩下我们就可以根据自己需要调试方法了,不用再依靠大模型调用

相关推荐
啊湘25 分钟前
vscode 使用 github (适用CURSOR等使用)
ide·vscode·github·cursor·mcp
小小呱呱蛙1 小时前
Claude Code 自下而上分析(Slash/Sub Agents/Skills/MCP)带来的启发
agent·claude·mcp
callJJ2 小时前
MCP配置与实战:深入理解现代开发工具链
javascript·node.js·vue·mcp·windsurf
谷哥的小弟5 小时前
Brave Search MCP服务器安装以及客户端连接配置
搜索引擎·大模型·spring ai·mcp·brave search
太空眼睛6 小时前
【MCP】使用SpringBoot基于Streamable-HTTP构建MCP-Client
spring boot·ai·llm·sse·mcp·mcp-client·streamable
kaizq16 小时前
AI-MCP-SQLite-SSE本地服务及CherryStudio便捷应用
python·sqlite·llm·sse·mcp·cherry studio·fastmcp
太空眼睛19 小时前
【MCP】使用SpringBoot基于Streamable-HTTP构建MCP-Server
spring boot·sse·curl·mcp·mcp-server·spring-ai·streamable
康de哥1 天前
MCP Unity + Claude Code 配置关键步骤
unity·mcp·claude code
田井中律.1 天前
MCP协议
mcp
通义灵码2 天前
Qoder 支持通过 DeepLink 添加 MCP Server
人工智能·github·mcp