协议检查工具

ModelContextProtocol Inspector 是一个用于检查和理解 MCP 协议的 Web GUI 工具,支持通过 Docker 快速部署和运行。

  • by uaiso-serious
  • Java
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 k3s-ia-lab/mcp-playground

使用说明

使用java 21运行应用程序:

./mvnw spring-boot:run

modelcontextprotocolinspectorwebgui:

docker run \
  --rm -d -p 6274:6274 -p 6277:6277 \
  -e HOST=0.0.0.0 \
  -e DANGEROUSLY_OMIT_AUTH=true \
  -e MCP_AUTO_OPEN_ENABLED=false \
  ghcr.io/modelcontextprotocol/inspector:0.17.5

http://localhost:6274


卷曲以理解MCP协议:

获取Mcp会话Id:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

curl -v --location 'http://localhost:8080/mcp' \
--header 'Accept: application/json, text/event-stream' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "method": "initialize",
    "id": "random-id-1234",
    "params": {
        "protocolVersion": "2025-06-18",
        "capabilities": {},
        "clientInfo": {
            "name": "My curl hack",
            "version": "0.0.1"
        }
    }
}'
curl --location 'http://localhost:8080/mcp' \
--header 'Accept: application/json, text/event-stream' \
--header 'mcp-session-id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list" 
}'

kubernetes实验室将n8n与ollama和mcp工具集成:

https://github.com/uaiso-serious/infra/