使用说明
未来的MCP服务器
模型上下文协议(MCP)服务器 Futuur 预测市场API。使Claude(以及任何兼容MCP的客户端)能够浏览市场、模拟和下注、管理订单和跟踪下注头寸。
快速入门(推荐-Smithery)
# Claude Desktop
npx -y @smithery/cli install @futuur/futuur-mcp --client claude
# Cursor
npx -y @smithery/cli install @futuur/futuur-mcp --client cursor
Smithery将提示您输入API密钥并处理其余密钥。
手动设置(npx--不需要克隆)
1.获取API密钥
登录 未来.com → 设置→ API → 生成公钥/私钥对。
2.配置您的MCP客户端
克劳德桌面版 --编辑 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)或 %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"futuur": {
"command": "npx",
"args": ["-y", "@futuur/futuur-mcp"],
"env": {
"FUTUUR_PUBLIC_KEY": "your_public_key_here",
"FUTUUR_PRIVATE_KEY": "your_private_key_here"
}
}
}
}
克劳德代码 (CLI)--运行一次以注册服务器:
claude mcp add futuur -- npx -y @futuur/futuur-mcp \
-e FUTUUR_PUBLIC_KEY=your_public_key_here \
-e FUTUUR_PRIVATE_KEY=your_private_key_here
或添加到 .claude/settings.json 在...之下 "mcpServers" 使用与上述Claude Desktop相同的格式。
光标 --添加到 .cursor/mcp.json:
{
"mcpServers": {
"futuur": {
"command": "npx",
"args": ["-y", "@futuur/futuur-mcp"],
"env": {
"FUTUUR_PUBLIC_KEY": "your_public_key_here",
"FUTUUR_PRIVATE_KEY": "your_private_key_here"
}
}
}
}
4.重新启动客户端
编辑配置文件后,Claude Desktop/Cursor需要完全重新启动。
可用工具
市场发现
| 工具 | 说明 |
|---|---|
get_markets |
使用过滤器(类别、标签、状态、排序等)列出/搜索事件 |
get_market_details |
单个活动的完整细节,包括所有嵌套市场 |
get_categories |
列出市场类别(旧版v1端点) |
get_category_details |
特定类别的详细信息 |
get_price_history |
事件的历史价格数据(day, week, month, year, all_time) |
账户
| 工具 | 说明 |
|---|---|
get_user_profile |
经过身份验证的用户资料和余额 |
get_user_ranking |
您在排行榜上的位置 |
交易
| 工具 | 说明 |
|---|---|
get_bet_simulation |
预览限价订单(成本/份额)而不下订单 |
place_bet |
使用确认的模拟有效载荷执行限价单 |
list_orders |
列出您的未完成/已完成/已取消订单 |
cancel_order |
按ID取消未结订单 |
头寸(赌注)
| 工具 | 说明 |
|---|---|
get_user_bets |
使用可选过滤器列出您的投注头寸 |
get_wager_details |
单次下注的完整细节 |
get_partial_sell_amount |
模拟出售N股的收益 |
sell_bet |
出售全部或部分下注头寸 |
Claude的典型工作流程
1. "Show me the top 10 markets by volume" → get_markets
2. "Give me details on event #1234" → get_market_details
3. "Simulate buying 100 OOM on the Yes outcome" → get_bet_simulation (requires event_id + market_id)
4. "Looks good, place the bet" → place_bet
5. "Show my open positions" → get_user_bets
6. "How much would I get if I sold 50 shares?" → get_partial_sell_amount
7. "Sell them" → sell_bet
提示: 使用
play_money模式(currency_mode: "play_money")在不冒实际资金风险的情况下进行测试。OOM是游戏货币。
认证
所有经过身份验证的请求都使用HMAC-SHA512签名。服务器会自动处理这个问题——只需通过环境变量提供您的公钥和私钥(FUTUUR_PUBLIC_KEY / FUTUUR_PRIVATE_KEY).
公共端点(事件列表、事件详细信息)不需要身份验证。
api参考
API完整文档: docs.futur.com
OpenAPI模式(机器可读): api.futuur.com/docs/schema/
发展
npm run dev # Run with tsx (hot reload)
npm run build # Compile TypeScript
npm run start # Run compiled build
npm test # Run tests
故障排除
Made with ❤️ by the Futuur Team