Skip to main content
Glama
Mavline

Polymarket Gamma MCP Server

by Mavline

Polymarket Gamma MCP Server

用于与 Polymarket Gamma Markets API 交互的 MCP 服务器——获取预测市场、事件和分析数据。

🚀 功能特性

📊 核心功能:

  • 热门市场 - 获取高交易量的热门市场

  • 市场搜索 - 在问题和描述中按文本搜索

  • 按类别筛选 - 按标签(Politics、Sports、Crypto)筛选市场

  • 市场详情 - 特定市场的完整信息

  • 事件 - 获取关联市场的事件

  • API 使用情况 - 跟踪请求使用量

🔧 技术特性:

  • 无需 API 密钥 - Gamma API 的公共访问

  • TypeScript - 严格类型化和数据验证

  • 重试逻辑 - 网络错误时自动重试

  • 格式化输出 - 以俄语方便地显示数据

  • 限制跟踪 - 监控 API 使用情况

Related MCP server: Polymarket MCP Server

📦 安装

# Клонировать и установить зависимости
npm install

# Собрать проект
npm run build

# Запустить тесты
npm test

🛠️ 可用工具

1. get_trending_markets

获取高交易量的热门市场。

参数:

  • limit(数字,默认值:20)- 市场数量

响应示例:

{
  "summary": "Найдено 5 трендовых рынков",
  "apiUsage": "4/1000 запросов использовано, 996 осталось",
  "markets": "1. Will Joe Biden get Coronavirus before the election?\n   💰 Объём: $32,257 | 💧 Ликвидность: $0\n   🏷️ Теги: US-current-affairs\n   📊 Цены: Yes: 0.0% | No: 0.0%",
  "rawData": [...]
}

2. get_markets_by_category

按类别/标签获取市场。

参数:

  • tags(字符串数组,必填)- 用于筛选的类别

  • limit(数字,默认值:50)- 市场数量

示例:

{
  "tags": ["Politics", "US Election"],
  "limit": 20
}

3. search_markets

按文本查询搜索市场。

参数:

  • query(字符串,必填)- 搜索查询

  • limit(数字,默认值:30)- 结果数量

4. get_market_details

获取特定市场的详细信息。

参数:

  • marketId(字符串,必填)- 市场 ID

5. get_events

获取关联市场的事件。

参数:

  • limit(数字,默认值:20)- 事件数量

  • active(布尔值,默认值:true)- 仅限活跃事件

  • orderBy(字符串)- 排序方式:volume、liquidity、endDate、createdAt

6. get_event_details

获取事件的详细信息。

参数:

  • eventId(字符串,必填)- 事件 ID

7. get_api_usage

获取 API 使用统计信息。

🔗 API 端点

服务器使用以下 Gamma API 端点:

  • GET /markets - 市场列表

  • GET /markets/{id} - 市场详情

  • GET /events - 事件列表

  • GET /events/{id} - 事件详情

基础 URL: https://gamma-api.polymarket.com

📊 数据结构

ProcessedMarket

{
  id: string;
  question: string;
  description?: string;
  outcomes: string[];
  prices: number[];
  volume: number;
  liquidity: number;
  endDate: string;
  tags: string[];
  active: boolean;
  closed: boolean;
  resolved: boolean;
  negRisk: boolean;
  spread?: number;
  slug: string;
  tokens: Array<{
    id: string;
    outcome: string;
    price: number;
    winner?: boolean;
  }>;
}

ProcessedEvent

{
  id: string;
  title: string;
  description?: string;
  slug: string;
  tags: string[];
  startDate?: string;
  endDate?: string;
  active: boolean;
  closed: boolean;
  volume?: number;
  liquidity?: number;
  marketsCount: number;
  topMarkets?: ProcessedMarket[];
}

🧪 测试

# Основные тесты
npm test

# Отладка API структуры
node test/debug-api.js

⚠️ 限制

  1. 公共 API - 无需密钥,但有合理限制

  2. 只读 - 无法下订单(需要 CLOB API)

  3. 简化搜索 - 暂不支持全文搜索

  4. 数据有延迟 - 非实时报价

🔄 与 Windsurf 集成

添加到 mcp_config.json

{
  "mcpServers": {
    "polymarket-gamma": {
      "command": "node",
      "args": ["C:/Users/pavelk/Desktop/Projects/my_own/Bet/polymarket/mcp-servers/polymarket-gamma-server/dist/index.js"],
      "cwd": "C:/Users/pavelk/Desktop/Projects/my_own/Bet/polymarket/mcp-servers/polymarket-gamma-server"
    }
  }
}

📈 使用场景

该服务器非常适合:

  • 市场分析 - 研究趋势和交易量

  • 事件监控 - 跟踪新市场

  • 研究 - 收集数据用于分析

  • 机会筛选 - 寻找感兴趣的市场

如需实际交易,请使用单独的 CLOB MCP 服务器。

🚀 后续步骤

  1. Gamma API 服务器 - 已完成并测试

  2. 🔄 CLOB API 服务器 - 用于交易操作

  3. 🔄 WebSocket 服务器 - 用于实时数据

  4. 🔄 统一服务器 - 整合所有功能

Install Server
F
license - not found
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables access to Polymarket's prediction markets for analyzing market probabilities, trading activity, and event outcomes across politics, sports, crypto, and other categories through natural language queries.
    15
    10
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to query Polymarket prediction markets, accessing real-time odds, market data, price history, order books, and trending markets across categories like politics, crypto, and sports through natural language.
    15
    5
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables comprehensive read access to Polymarket prediction market data, including live prices, order books, and market statistics. It allows AI assistants to analyze events, search markets, and monitor real-time signals without requiring API keys or authentication.
    22
    1
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables interaction with Polymarket prediction markets through read-only access to market data, events, orderbooks, and user positions, plus authenticated trading capabilities for creating and managing orders.
    1

View all related MCP servers

Related MCP Connectors

  • Polymarket MCP — prediction-market data via Gamma + CLOB public APIs.

  • Kalshi MCP — US-regulated prediction-market data (no auth on public reads).

  • Classify Polymarket wallets as human or bot, score their trading edge, read open positions.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mavline/polymarket-gamma-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server