CrowdCent MCP服务器
一个模型上下文协议(MCP)服务器,提供与 CrowdCent挑战API,使人工智能助手能够直接与CrowdCent的预测挑战进行交互。
概述
此MCP服务器允许Claude Desktop和Cursor等AI助手:
- 访问和管理CrowdCent挑战
- 下载训练和推理数据集
- 提交预测
- 监控提交
- 访问元模型
先决条件
- Python 3.12+
- 紫外线 (Python包管理器)
- CrowdCent API密钥(在 crowdcent.com)
安装
- 克隆此存储库:
git clone https://github.com/crowdcent/crowdcent-mcp.git
cd crowdcent-mcp- (可选)使用uv安装依赖项:
uv venv
uv pip install -e .配置
设置API密钥
创建一个 .env 项目根目录中的文件:
CROWDCENT_API_KEY=your_api_key_here光标设置
将以下内容添加到光标设置中(~/.cursor/mcp.json 或通过光标设置UI):
{
"mcpServers": {
"crowdcent-mcp": {
"command": "/path/to/.cargo/bin/uv",
"args": ["run",
"--directory",
"/path/to/crowdcent-mcp",
"server.py"
]
}
}
}替换 /path/to/ 你的实际路径。例如:
/home/username/.cargo/bin/uv在Linux上/Users/username/.cargo/bin/uv在macOS上C:\\Users\\username\\.cargo\\bin\\uv在Windows上
Claude桌面设置
对于Claude Desktop,请将以下内容添加到配置文件中:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json\ 视窗: %APPDATA%\Claude\claude_desktop_config.json\ Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"crowdcent-mcp": {
"command": "uv",
"args": ["run",
"--directory",
"/path/to/crowdcent-mcp",
"server.py"
]
}
}
}使用示例
在AI助手中配置MCP服务器后,您可以使用自然语言与CrowdCent进行交互:
"Download data, train a model, and submit predictions to the crowdcent challenge!""Download the crowdcent training data and do some EDA""Create time series folds for the crowdcent challenge and train/evaluate a model"故障排除
MCP服务器未连接
- 确保uv已安装并位于PATH中
- 检查配置中的目录路径是否正确
- 验证server.py文件是否具有执行权限
API关键问题
- 请确保您的API密钥有效
- 检查它是否在.env中正确设置或传递给init_client
提交错误
- 确保您的预测文件具有所需的列:
id,pred_10d,pred_30d - 检查所有资产ID是否与当前推断期匹配
- 验证提交窗口是否仍然打开(在推理数据发布后4小时内)
资源
支持
对于以下问题:
- 此MCP服务器:在此存储库中打开一个问题
- CrowdCent API:电子邮件info@crowdcent.com或加入我们的Discord
