Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CHAIN_ID | No | Blockchain network chain ID | 137 |
| DATA_API_URL | No | Polymarket Data API base URL | https://data-api.polymarket.com |
| CLOB_API_BASE | No | Polymarket CLOB API base URL | https://clob.polymarket.com |
| GAMMA_API_URL | No | Polymarket Gamma API base URL | https://gamma-api.polymarket.com |
| BRIDGE_API_URL | No | Polymarket Bridge API base URL | https://bridge.polymarket.com |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
| logging | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_tool_guide | Return a concise usage guide with workflows, dependencies, and examples for this MCP. |
| get_market_by_slug | Get detailed market info by slug. Source: slug from search_markets or list_markets. Returns market with clobTokenIds for CLOB tools. Example: slug=will-biden-win-2024. |
| get_event_by_slug | Get event details by slug. Source: slug from search_markets or list_events. Returns event and associated markets. Example: slug=presidential-election-2024. |
| list_active_markets | List active markets sorted by volume. Use clobTokenIds/conditionId from results for CLOB or Data API tools. Example: limit=20, order=volume24hr. |
| search_markets | Search for markets, events, and profiles using text search. limit applies per type (events/markets/profiles). Example: query=trump, limit=3. |
| get_markets_by_tag | Get markets filtered by tag ID. Source: tag_id from get_all_tags. Example: tag_id=2, limit=20, closed=false. |
| get_all_tags | List all tags. Use tag id/slug with get_markets_by_tag or list_markets tag_slug. Example: call then pick tag_id. |
| get_order_book | Get order book via CLOB /book for token_id. Source: clobTokenIds from list_active_markets or get_market_details. If token has no active order book, returns 404. Example: token_id=clobTokenIds[0]. |
| get_trending_markets | Get markets with highest trading volume for timeframe. Returns active markets sorted by volume. Example: timeframe=24h, limit=10. |
| get_closing_soon_markets | Get markets closing within specified hours. Returns active markets sorted by endDate. Example: hours=24, limit=20. |
| get_featured_markets | Get featured/promoted markets. Falls back to top-volume active markets. Example: limit=10. |
| filter_markets_by_category | Filter markets by tag/category slug (case-insensitive). Source: get_all_tags for slug list. Example: category=politics, active_only=true. |
| get_event_markets | Get markets for a specific event. Provide event_id or event_slug from list_events/search_markets. Example: event_id=80505. |
| compare_markets | Compare multiple markets by slug. Source: slugs from search_markets/list_markets. Returns market data or error per slug. Example: market_slugs=[a,b]. |
| get_market_details | Get complete market information including metadata, tokens, volume, liquidity, and livePrice by token_id. livePrice may be null when tokens are closed or have no active CLOB. |
| get_current_price | Get CLOB /price for BUY/SELL and return bid/ask/mid. Source: clobTokenIds from list_active_markets or get_market_details. If token has no active CLOB/order book, returns 404. Example: token_id=clobTokenIds[0], side=BOTH. |
| get_spread | Compute spread from CLOB /book best bid/ask. Source: clobTokenIds from list_active_markets or get_market_details. If token has no active CLOB/order book, returns 404. Example: token_id=clobTokenIds[0]. |
| get_market_volume | Get volume and liquidity for a market by slug. Source: slug from search_markets/list_markets. Example: slug=will-biden-win-2024. |
| get_liquidity | Compute liquidity from CLOB /book depth (bid/ask USD). Source: clobTokenIds from list_active_markets or get_market_details. If token has no active CLOB/order book, returns 404. Example: token_id=clobTokenIds[0]. |
| analyze_market_opportunity | Heuristic market analysis using volume, liquidity, spread, and time-to-close. Uses first clobTokenIds entry when available. Example: slug=will-biden-win-2024. |
| subscribe_market_prices | Subscribe to real-time price changes by market condition IDs (conditionId). Source: list_markets/list_active_markets/get_market_by_slug. Use get_realtime_status to inspect events. Example: market_ids=[conditionId]. |
| subscribe_orderbook_updates | Subscribe to real-time orderbook updates by token_ids (clobTokenIds). Source: list_active_markets/get_market_details. Use get_realtime_status to inspect events. Example: token_ids=[clobTokenIds[0]]. |
| subscribe_market_resolution | Subscribe to market resolution alerts by condition IDs. Source: list_markets/list_active_markets/get_market_by_slug. Example: market_ids=[conditionId]. |
| get_realtime_status | Get status of WebSocket subscriptions (active topics, connection state, stats, recent messages). connected=false means offline; subscriptions can exist but will not receive events until connected. |
| unsubscribe_realtime | Unsubscribe from a real-time feed. Source: subscription_id from subscribe_* response. Example: subscription_id=abc. |
| get_price_history | Get historical price data for a token. Source: clobTokenIds from list_active_markets or get_market_details. If no history, returns history=[]. Example: token_id=clobTokenIds[0], interval=1h. |
| get_midpoint | Get midpoint price via CLOB /midpoint. Source: clobTokenIds from list_active_markets or get_market_details. If token has no active CLOB/order book, returns 404. Example: token_id=clobTokenIds[0]. |
| get_batch_prices | Batch prices via POST CLOB /prices. Source: clobTokenIds from list_active_markets or get_market_details. If none found, returns {}. Example: token_ids=[clobTokenIds[0], clobTokenIds[1]]. |
| get_batch_spreads | Batch spreads via POST CLOB /spreads. Source: clobTokenIds from list_active_markets or get_market_details. If none found, returns {}. Example: token_ids=[clobTokenIds[0], clobTokenIds[1]]. |
| get_batch_order_books | Batch order books via POST CLOB /books. Source: clobTokenIds from list_active_markets or get_market_details. If none found, returns []. Example: token_ids=[clobTokenIds[0], clobTokenIds[1]]. |
| get_market_by_id | Get market details by numeric id. Source: id from list_markets. Returns clobTokenIds and conditionId. Example: id=680392. |
| list_markets | List markets with filters (active/closed/tag/date/sort). Use conditionId for Data API and clobTokenIds for CLOB tools. Example: active=true, limit=20. |
| list_events | List events with filters and pagination. Use event id for list_comments/get_event_by_id/get_live_volume. Example: active=true, limit=20. |
| get_event_by_id | Get event details by id, including associated markets. Source: id from list_events. Example: id=80505. |
| list_series | List series from the Gamma API. limit applies to series count; each series can include a large events array. Example: limit=1, offset=0. |
| get_series_by_id | Get series by id. Source: id from list_series. Series includes events array. Example: id=10543. |
| get_sports_metadata | Get sports metadata (leagues, seasons, etc.). Use with list_teams or sports market filters. Example: no params. |
| list_teams | List sports teams with pagination. Use to map team names/abbreviations in sports markets. Example: limit=20, offset=0. |
| get_public_profile | Get a user's public profile by Ethereum address. Unknown address may return 404. Example: address=0xabc.... |
| list_comments | List comments from Gamma API /comments. Requires parent_entity_type and parent_entity_id in practice (use list_events/list_series/list_markets to get IDs); otherwise Gamma often returns 422. Example: parent_entity_type=Event, parent_entity_id=80505. |
| get_comment_by_id | Get a comment by id. Source: id from list_comments. Example: id=2064395. |
| get_valid_sports_market_types | Get valid sports market types from Gamma API /sports/market-types (returns {marketTypes:[...]}). Example: use result in sports filters. |
| check_health_gamma | Check Gamma API health via GET /status. Returns plain text OK. |
| get_positions | Get a user's open positions (public on-chain data). Use user address; optional market conditionId. Example: user=0xabc..., market=0x... |
| get_closed_positions | Get a user's closed/settled positions (public on-chain data). Use user address; optional market conditionId. Example: user=0xabc... |
| get_trades | Get trade history (public data). Filter by user address and/or market conditionId from list_markets. Example: user=0xabc..., market=0x... |
| get_user_activity | Get a user's activity feed (public data). Use user address. Example: user=0xabc..., limit=50. |
| get_top_holders | Get top holders for a market. Source: market conditionId from list_markets. Example: market=0x... |
| get_positions_value | Get total value of a user's positions (public data). Use user address. Example: user=0xabc.... |
| get_open_interest | Get open interest for a market. Source: market conditionId from list_markets. Example: market=0x... |
| get_live_volume | Get live trading volume for an event. Source: event id from list_events. Example: id=80505. |
| get_total_traded | Get total markets a user has traded in (public data). Use user address. Example: user=0xabc.... |
| get_trader_leaderboard | Get trader leaderboard (public). Use limit/offset for pagination. Example: limit=50, offset=0. |
| get_builder_leaderboard | Get builder leaderboard (public). Use limit/offset for pagination. Example: limit=50, offset=0. |
| get_builder_volume_timeseries | Get builder daily volume timeseries (public). Use limit for number of points. Example: limit=30. |
| check_health_data_api | Check Data API health via GET /. Returns JSON {data:"OK"}. |
| get_bridge_transaction_status | Check bridge transactions via GET https://bridge.polymarket.com/status/{address}. Address must have bridge history; invalid/unknown addresses may return 500. Example: address=0xabc.... |
| get_supported_assets | Get bridge-supported assets and chains. Use to fill get_bridge_quote params. Example: call then pick fromTokenAddress/toTokenAddress. |
| get_bridge_quote | Get a bridge quote from /quote. Source: token/chain from get_supported_assets. Requires fromAmountBaseUnit and recipientAddress. Example: fromChainId=137, toChainId=137. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |