使用说明
MCP开发检查员
基于浏览器的检查器 模型上下文协议(MCP) 服务器。连接到任何MCP服务器,浏览其工具,使用自定义参数执行它们,并检查JSON-RPC流量——所有这些都来自本地web UI。
专为开发人员构建或调试MCP服务器而构建。支持OAuth 2.0身份验证,适用于Google Cloud工作站。
快速开始
直接从GitHub运行 npx --无需安装:
npx github:Wave1art/mcp-inspector
这将构建(如果需要),启动本地服务器,并在浏览器中打开检查器。
用法
npx github:Wave1art/mcp-inspector [options]
选项
| 标志 | 默认值 | 描述 |
|---|---|---|
--mcp-url <url> |
-- | 要连接的MCP服务器的完整URL |
--port, --mcp-port <n> |
6277 |
MCP服务器端口(缩写 http://127.0.0.1:<n>) |
--inspector-port, -p <n> |
6280 |
检查器UI的端口 |
--auth <none|oauth> |
none |
身份验证模式 |
-h, --help |
-- | 显示帮助 |
示例
# Connect to an MCP server on the default port (6277)
npx github:Wave1art/mcp-inspector
# Connect to an MCP server at a specific URL
npx github:Wave1art/mcp-inspector --mcp-url http://localhost:8080
# Use a custom inspector port
npx github:Wave1art/mcp-inspector -p 3000
# Connect with OAuth authentication
npx github:Wave1art/mcp-inspector --mcp-url https://my-mcp-server.example.com --auth oauth
作为开发依赖项安装
您还可以将其添加到项目中,以便您的团队可以通过npm脚本运行它:
npm install --save-dev github:Wave1art/mcp-inspector
然后将脚本添加到您的 package.json:
{
"scripts": {
"inspect-mcp": "mcp-dev-inspector --mcp-url http://localhost:8080"
}
}
运行它:
npm run inspect-mcp
要获取最新版本,请执行以下操作:
npm install github:Wave1art/mcp-inspector
特性
- 工具浏览器 --列出MCP服务器公开的所有工具,按前缀分组
- 工具执行器 --通过自动生成的表单填写参数,并直接调用工具
- 智能响应查看器 --根据内容将结果呈现为表格、卡片、markdown或原始JSON
- JSON-RPC日志 --检查检查器和MCP服务器之间的每个请求和响应
- OAuth支持 --使用需要OAuth 2.0(PKCE+动态客户端注册)的MCP服务器进行身份验证
- 深色模式 --在浅色和深色主题之间切换
- 可折叠面板 --隐藏工具列表或日志面板,以专注于重要的事情
- CLI标志+UI输入 --通过命令行标志设置MCP服务器地址,或在UI中运行时更改它
发展
# Install dependencies
npm install
# Start the Angular dev server (hot reload)
npm run dev
# Build for production
npm run build
# Run the production server locally
npm start
# Run tests
npm test
建筑
- 前端:Angular 21,带角材料,独立组件,信号
- 后端:使用HTTP代理将Express 5发送到目标MCP服务器
- 认证:OAuth 2.0+PKCE,支持动态客户端注册
- 运输:基于HTTP的JSON-RPC,用于流式传输的SSE