使用说明
测试MCP
图表:https://excalidraw.com/#json=uRRaOjlO8rV6Og36vjPEj,LRARtOLrhz0VdTFIxjH8Rg
需求
备注:OpenRouter有很多 免费模型 可用于测试。
发展
对于测试,您可以运行开发服务器并手动运行工具调用:
uv run fastmcp dev
完整示例在 test-mcp.py,您可以在自己的项目中使用的一个最小示例是 minimal-mcp.py.
安装
要安装MCP服务器,您需要配置 MCP.json 看起来像这样:
{
"mcpServers": {
"test-mcp": {
"command": "uv",
"args": [
"--directory",
"/Users/admin/Projects/test-mcp",
"run",
"test-mcp.py"
],
"timeout": 600
}
}
}
对于Claude Desktop,有一个 详细指南 可用。
