如何使用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界面

连接调试

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

相关推荐
神秘的猪头1 天前
🔌 给 AI 装上“三头六臂”!实战大模型接入第三方 MCP 全攻略
langchain·llm·mcp
神秘的猪头2 天前
🔌 把 MCP 装进大脑!手把手带你构建能“热插拔”工具的 AI Agent
langchain·llm·mcp
小兵张健2 天前
AI 页面与交互迁移流程参考
前端·ai编程·mcp
小兵张健2 天前
掘金发布 SOP(Codex + Playwright MCP + Edge)
前端·mcp
Qinana2 天前
从代码到智能体:MCP 协议如何重塑 AI Agent 的边界
前端·javascript·mcp
神秘的猪头2 天前
🚀 拒绝“手搓”工具!带你硬核手写 MCP Server,解锁 Agent 的无限潜能
agent·mcp·trae
warm3snow3 天前
Claude Code 黑客马拉松:5 个获奖项目,没有一个是"纯码农"做的
ai·大模型·llm·agent·skill·mcp
warm3snow4 天前
AI 核心技能系列:12 篇文章带你系统掌握大模型岗位必备技能
ai·transformer·agent·skill·mcp·fine-tunning
3秒一个大4 天前
深入理解 MCP 协议:从本质解析到实战构建
mcp
牧马人win4 天前
Chrome DevTools MCP:让 AI 编码助手拥有“浏览器之眼“
mcp