Skip to main content
Glama
Mavline

Polymarket Gamma MCP Server

by Mavline

Polymarket Gamma MCP Server

MCP Server for working with the Polymarket Gamma Markets API - retrieving prediction market data, events, and analytics.

🚀 Features

📊 Core functions:

  • Trending markets - get popular markets with high volume

  • Market search - search by text in questions and descriptions

  • Category filtering - markets by tags (Politics, Sports, Crypto)

  • Market details - full information about a specific market

  • Events - get events with related markets

  • API Usage - track request usage

🔧 Technical features:

  • No API keys - public access to the Gamma API

  • TypeScript - strict typing and data validation

  • Retry logic - automatic retries on network errors

  • Formatted output - convenient data display in Russian

  • Limit tracking - API usage monitoring

Related MCP server: Polymarket MCP Server

📦 Installation

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

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

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

🛠️ Available tools

1. get_trending_markets

Get trending markets with high trading volume.

Parameters:

  • limit (number, default: 20) - number of markets

Example response:

{
  "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

Get markets by categories/tags.

Parameters:

  • tags (array of strings, required) - categories for filtering

  • limit (number, default: 50) - number of markets

Example:

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

3. search_markets

Search markets by text query.

Parameters:

  • query (string, required) - search query

  • limit (number, default: 30) - number of results

4. get_market_details

Get detailed information about a specific market.

Parameters:

  • marketId (string, required) - market ID

5. get_events

Get events with related markets.

Parameters:

  • limit (number, default: 20) - number of events

  • active (boolean, default: true) - only active events

  • orderBy (string) - sorting: volume, liquidity, endDate, createdAt

6. get_event_details

Get detailed information about an event.

Parameters:

  • eventId (string, required) - event ID

7. get_api_usage

Get API usage statistics.

🔗 API Endpoints

The server uses the following Gamma API endpoints:

  • GET /markets - list of markets

  • GET /markets/{id} - market details

  • GET /events - list of events

  • GET /events/{id} - event details

Base URL: https://gamma-api.polymarket.com

📊 Data structure

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[];
}

🧪 Testing

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

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

⚠️ Limitations

  1. Public API - no keys, but with reasonable limits

  2. Read-only - cannot place orders (requires CLOB API)

  3. Simplified search - no full-text search yet

  4. Delayed data - not real-time quotes

🔄 Windsurf Integration

Add to 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"
    }
  }
}

📈 Usage

This server is ideal for:

  • Market analytics - researching trends and volumes

  • Event monitoring - tracking new markets

  • Research - collecting data for analysis

  • Opportunity screening - finding interesting markets

For real trading, use a separate CLOB MCP Server.

🚀 Next steps

  1. Gamma API Server - ready and tested

  2. 🔄 CLOB API Server - for trading operations

  3. 🔄 WebSocket Server - for real-time data

  4. 🔄 Unified Server - combining all capabilities

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