Polymarket Gamma MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Polymarket Gamma MCP Server what are the trending prediction markets right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 filteringlimit(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 querylimit(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 eventsactive(boolean, default: true) - only active eventsorderBy(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 marketsGET /markets/{id}- market detailsGET /events- list of eventsGET /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
Public API - no keys, but with reasonable limits
Read-only - cannot place orders (requires CLOB API)
Simplified search - no full-text search yet
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
✅ Gamma API Server - ready and tested
🔄 CLOB API Server - for trading operations
🔄 WebSocket Server - for real-time data
🔄 Unified Server - combining all capabilities
Available Tools
8 toolsget_api_usageA
Get current API usage statistics and rate limits
Inputs: no named parameters.
get_event_detailsA
Get detailed information about a specific event by ID
Inputs: eventId (required).
get_eventsB
Get events with their associated markets
Inputs: limit, active, orderBy.
get_market_detailsB
Get detailed information about a specific market by ID
Inputs: marketId (required).
get_markets_by_categoryA
Get markets filtered by category/tags (Politics, Sports, Crypto, etc.)
Inputs: tags (required), limit.
get_sports_eventsC
Получить спортивные события с Polymarket (ПРАВИЛЬНЫЕ параметры)
Inputs: limit.
get_trending_marketsA
Get trending/popular markets with highest volume and liquidity
Inputs: limit.
search_marketsA
Search markets by text query in question/description
Inputs: query (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools are distinct: trending, category, search, details, events, event details, API usage. However, get_events and get_sports_events overlap somewhat, though the descriptions clarify sports is a subset. Search and category are clearly different. Overall, boundaries are mostly clear.
All tools follow the consistent pattern of 'get_' + noun, with clear nouns like 'trending_markets', 'market_details', 'events', etc. No mixed conventions or unexpected verbs.
8 tools are well-scoped for a read-only market data server. Each covers a distinct query type, and none feel redundant or excessive.
The surface covers market retrieval (trending, by category, search), market details, event listings and details, and API usage. Minor gaps like historical price data or market resolution info exist, but core read-only workflows are complete.
Maintenance
Related MCP Connectors
Read-only Polymarket search, market details, order books, price history, and market cards.
Polymarket in your AI: market rules, real fill costs, who is trading, top traders. Read-only.
Unofficial, read-only Polymarket analytics: top markets, movers, related-market mispricing checks.
Live prediction markets: Polymarket + Kalshi prices, odds, order books. Pay-per-call USDC, no key.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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.46 npm10MIT
- AlicenseNot gradedqualityDmaintenanceEnables 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.46 npm7MIT
- AlicenseBqualityDmaintenanceEnables 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.221MIT
- FlicenseNot gradedqualityCmaintenanceEnables 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-