MCP cover image

MCP服务器的视觉测试工具

28

Github Watches

268

Github Forks

1.9k

Github Stars

MCP Inspector

The MCP inspector is a developer tool for testing and debugging MCP servers.

MCP Inspector Screenshot

Running the Inspector

From an MCP server repository

To inspect an MCP server implementation, there's no need to clone this repo. Instead, use npx. For example, if your server is built at build/index.js:

npx @modelcontextprotocol/inspector node build/index.js

You can pass both arguments and environment variables to your MCP server. Arguments are passed directly to your server, while environment variables can be set using the -e flag:

# Pass arguments only
npx @modelcontextprotocol/inspector build/index.js arg1 arg2

# Pass environment variables only
npx @modelcontextprotocol/inspector -e KEY=value -e KEY2=$VALUE2 node build/index.js

# Pass both environment variables and arguments
npx @modelcontextprotocol/inspector -e KEY=value -e KEY2=$VALUE2 node build/index.js arg1 arg2

# Use -- to separate inspector flags from server arguments
npx @modelcontextprotocol/inspector -e KEY=$VALUE -- node build/index.js -e server-flag

The inspector runs both an MCP Inspector (MCPI) client UI (default port 6274) and an MCP Proxy (MCPP) server (default port 6277). Open the MCPI client UI in your browser to use the inspector. (These ports are derived from the T9 dialpad mapping of MCPI and MCPP respectively, as a mnemonic). You can customize the ports if needed:

CLIENT_PORT=8080 SERVER_PORT=9000 npx @modelcontextprotocol/inspector node build/index.js

For more details on ways to use the inspector, see the Inspector section of the MCP docs site. For help with debugging, see the Debugging guide.

Authentication

The inspector supports bearer token authentication for SSE connections. Enter your token in the UI when connecting to an MCP server, and it will be sent in the Authorization header. You can override the header name using the input field in the sidebar.

Security Considerations

The MCP Inspector includes a proxy server that can run and communicate with local MCP processes. The proxy server should not be exposed to untrusted networks as it has permissions to spawn local processes and can connect to any specified MCP server.

Configuration

The MCP Inspector supports the following configuration settings. To change them, click on the Configuration button in the MCP Inspector UI:

Setting Description Default
MCP_SERVER_REQUEST_TIMEOUT Timeout for requests to the MCP server (ms) 10000
MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS Reset timeout on progress notifications true
MCP_REQUEST_MAX_TOTAL_TIMEOUT Maximum total timeout for requests sent to the MCP server (ms) (Use with progress notifications) 60000
MCP_PROXY_FULL_ADDRESS Set this if you are running the MCP Inspector Proxy on a non-default address. Example: http://10.1.1.22:5577 ""

These settings can be adjusted in real-time through the UI and will persist across sessions.

From this repository

If you're working on the inspector itself:

Development mode:

npm run dev

Note for Windows users:
On Windows, use the following command instead:

npm run dev:windows

Production mode:

npm run build
npm start

License

This project is licensed under the MIT License—see the LICENSE file for details.

相关推荐

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Benedikt Ess
  • FindetundanalysiertOnlineProdukteeinschlielichAmazonnachVolumenBewertungenundPreis

  • Aurity Ltd
  • Create and Publish Business Websites in seconds. AI will gather all the details about your website and generate link to your website.

  • Convincible Ltd
  • You're in a stone cell – can you get out? A classic choose-your-adventure interactive fiction game, based on a meticulously-crafted playbook. With a medieval fantasy setting, infinite choices and outcomes, and dice!

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • metorial
  • 数百个MCP服务器的容器化版本📡📡

  • langgenius
  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • alibaba
  • Azure
  • 该存储库用于开发Azure MCP服务器,将Azure的功能带给您的代理商。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • superiorlu
  • 🤖在AI上收集实用的AI存储库,工具,网站,论文和教程。 实用的ai百宝箱百宝箱

  • Byaidu
  • PDF科学纸翻译带有保留格式的pdf -基于ai完整保留排版的pdf文档全文双语翻译

  • Onelevenvy
  • Flock是一个基于工作流程的低音平台,可快速构建聊天机器人,抹布和协调多代理团队,由Langgraph,Langchain,Langchain,Fastapi和Nextjs提供支持。(羊群工作流工作流的低代码平台,rag rag rag 用于快速构建聊天机器人、 rag temant Agent fastem temantfaster和muti-agent agagent应用

    Reviews

    4 (1)
    Avatar
    user_PJMH7hhO
    2025-04-17

    I have been using the Inspector tool by ModelContextProtocol and it's an absolute game-changer for my projects. It's intuitive, efficient, and seamlessly integrates into my workflow. Highly recommend for anyone looking to streamline their code inspection process! Check it out at https://github.com/modelcontextprotocol/inspector.