预测市场分析工具

MCP Predictive Market 是一个通过自然语言查询和分析预测市场数据的工具,支持多平台搜索、套利检测和市场跟踪功能。

  • by EricGrill
  • Python
  • 本地部署
  • 3 星标
  • 更新于
在 GitHub 查看 EricGrill/mcp-predictive-market

使用说明

MCP Predictive Market

Query and analyze prediction markets through Claude

Quick Start | Tools | Platforms | Configuration | Plugin Marketplace


这是什么?

一个MCP(模型上下文协议)服务器,从以下位置聚合预测市场数据 5大平台.搜索市场,比较赔率,发现套利机会,并通过自然语言跟踪预测。

适用于Claude Desktop、Claude Code、Cursor和任何兼容MCP的客户端。

部分 克劳德代码插件市场.


快速开始

# Clone and install
git clone https://github.com/EricGrill/mcp-predictive-market.git
cd mcp-predictive-market
uv sync

# Run the server
uv run python -m mcp_predictive_market.server

添加到您的Claude配置并开始查询市场:

“寻找人工智能监管的预测市场”


为什么使用这个?

特性 描述
多平台搜索 同时查询5个预测市场
套利检测 查找不同平台的价格差异
市场跟踪 建立观察名单并监控赔率变化
平台比较 类似问题的并列赔率
统一数据模型 跨所有平台的一致市场模式

可用工具

搜索与发现

工具 说明
search_markets 按关键字搜索所有平台上的市场
list_categories 获取可用的市场类别
browse_category 浏览特定类别的市场

市场数据

工具 说明
get_market_odds 获取特定市场的当前赔率
compare_platforms 类似市场的并排比较

追踪

工具 说明
track_market 将市场添加到您的观察名单中
get_tracked_markets 查看所有跟踪的市场和当前价格

分析

工具 说明
find_arbitrage 检测平台之间的价格差异

支持的平台

平台 URL 专业化
多种市场 歧管市场 玩钱,品种繁多
多市场 polymarket.com 加密货币,高流动性
Metaulus metaculus.com 科学,长期预测
预测 predictit.org 美国政治
卡尔希 kalshi.com CFTC监管的真实货币

配置

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": {
    "prediction-market": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp-predictive-market", "python", "-m", "mcp_predictive_market.server"]
    }
  }
}

Claude代码设置

添加到您的项目 .mcp.json 或 ~/.config/claude-code/mcp.json:

{
  "mcpServers": {
    "prediction-market": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp-predictive-market", "python", "-m", "mcp_predictive_market.server"]
    }
  }
}

例子

Search & Discovery
"Find prediction markets about AI"
"What categories of markets are available?"
"Show me crypto markets on Polymarket"
"Browse politics markets"
Market Analysis
"Get current odds for Manifold market abc123"
"Compare odds for 'Will Bitcoin hit $100k?' across all platforms"
"Show me the probability of a 2024 recession on different platforms"
Arbitrage Detection
"Find arbitrage opportunities with at least 10% spread"
"Are there any markets with significantly different odds across platforms?"
"Show me the biggest price discrepancies right now"
Market Tracking
"Track the Polymarket election market"
"Show all my tracked markets"
"What are the current prices on my watchlist?"

发展

# Clone
git clone https://github.com/EricGrill/mcp-predictive-market.git
cd mcp-predictive-market

# Install with dev dependencies
uv sync --extra dev

# Run tests
uv run pytest -v

# Run specific test file
uv run pytest tests/test_integration.py -v

项目结构

src/mcp_predictive_market/
├── server.py           # MCP server entry point
├── tools.py            # Tool handler implementations
├── schema.py           # Unified market data models
├── errors.py           # Custom exceptions
├── rate_limiter.py     # Per-platform rate limiting
├── adapters/           # Platform-specific adapters
│   ├── base.py         # Adapter protocol
│   ├── manifold.py
│   ├── polymarket.py
│   ├── metaculus.py
│   ├── predictit.py
│   └── kalshi.py
├── analysis/           # Market analysis modules
│   ├── matching.py     # Cross-platform market matching
│   └── arbitrage.py    # Arbitrage detection
└── state/              # State management
    └── memvid_client.py

故障排除

No results from a platform
  1. 平台API可能有费率限制-等待并重试
  2. 检查平台是否在线:直接访问网站
  3. 一些平台过滤某些市场类型
Arbitrage opportunities not found
  1. 降低 min_spread 参数(默认值为5%)
  2. 尝试更广泛的搜索词
  3. 有效市场中的机会更少
Market not found
  1. 验证市场ID格式(因平台而异)
  2. 确保市场尚未解决/关闭
  3. 检查您是否使用了正确的平台名称

相关项目


贡献

欢迎投稿!

  1. 分叉存储库
  2. 创建要素分支: git checkout -b feature/my-feature
  3. 进行更改和测试: uv run pytest
  4. 承诺: git commit -m 'Add my feature'
  5. 推: git push origin feature/my-feature
  6. 打开拉取请求

许可证

麻省理工学院