使用说明
MCP项目
我构建的一些MCP服务器/客户端。
服务器
- 天气 -通过美国国家气象局API获取美国各地的天气预报和警报。
- 苹果笔记 --从本地计算机访问并列出Apple Notes。
本地开发
先决条件
- Python 3.13+
- 紫外线
安装环境
uv sync
本地运行
uv --directory servers/<server_name> run <server_name>.py
例如:
uv --directory servers/weather run weather.py
uv --directory servers/apple_notes run apple_notes.py
添加到Claude桌面版
向添加条目 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"<server_name>": {
"command": "/full/path/to/uv",
"args": [
"--directory",
"/full/path/to/mcp-projects/servers/<server_name>",
"run",
"<server_name>.py"
]
}
}
}
使用完整路径 uv (找到它 which uv)因为GUI应用程序不继承shell PATH。