MCP 服务器集合
基于 Model Context Protocol (MCP) 开发的服务集合,用于支持 Cursor IDE 的智能功能。
快速入门
克隆项目
git clone <repository-url>
cd mcp-servers
安装依赖
npm install
构建项目
构建所有服务:
npm run build
构建单个服务(如天气服务):
npm run build:weather
配置 MCP
编辑 ~/.cursor/mcp.json
文件:
{
"mcpServers": {
"weather": {
"command": "node",
"args": ["/your/path/to/mcp-servers/build/weather/index.js"],
"env": {
"OPENWEATHER_API_KEY": "your_api_key_here"
}
}
}
}
启动服务
启动天气服务:
npm run start:weather
启动示例服务:
npm run start:demo
测试
运行所有测试:
npm test
运行特定服务的测试(如天气服务):
npm run test:weather