An MCP server that lets any LLM research and trade Polymarket, with an optional REST gateway for algorithmic agents.
PolyGate defines 23 tools with consistent naming (verb_noun pattern: list_*, get_*, place_*, cancel_*) and comprehensive parameter schemas. All tools have descriptions (avg ~150 chars, within 10-1024 baseline). Input schemas are well-typed with enums (side: BUY|SELL), ranges (limit: 1-1000), and descriptions for all params. However, output schemas are not documented, LLMs cannot predict response structure for downstream chaining. Error handling is minimal: no recovery guidance, no categorization of retryable vs fatal errors. Security is strong (no secrets in params, wallet-gated trading tools), but tool composition has gaps: place_order requires both token_id AND condition_id (redundant, one should derive the other), and no batch variants for common loops (e.g., cancel_all exists but place_order is single-only).
Activity history for the configured wallet.
Collateral (USDC) or conditional-token balance & allowance (authenticated CLOB).
Cancel all open orders for the configured wallet.
Cancel a specific open order by order id.
Flatten every atomic market under one scope (series, tag, or event) into a list. Pass exactly one of `series_id`, `tag_id`, or `event`. Each returned market is tagged with its parent `event_id`/`event_title`/`event_slug` and carries its `conditionId` and `clobTokenIds`. This is how you gather markets Polymarket buries across sibling events (e.g. a sports fixture: `event=<fixture-slug>&group_by=gameId`). The scan runs to completion and fails loud if the scope is too broad - never silently partial.
Public comments on an event (Gamma).
Output schemas not documented. LLMs cannot predict response structure (fields, types, nested objects) for downstream tool chaining. E.g., list_markets returns markets with conditionId/clobTokenIds but this is not formally declared.
No error recovery guidance. Tools return PlatformError as {error, detail} but do not categorize errors (retryable vs user-fixable vs fatal) or suggest next steps. E.g., 'Market not found' should suggest search_markets() or list_markets().
place_order requires both token_id AND condition_id (redundant parameters). One should derive the other internally. This forces agents to gather both before calling, increasing complexity and error surface.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 62 | <=2025-11-25 | v2 |
Fetch a single event (with its nested markets) by slug or event id.
Fetch a single market by condition id.
Liveness, version, run mode, and the active (secret-free) configuration. Reports `status`/`version`/`can_trade_live` plus the full config summary (mode, wallet, CLOB creds, hosts).
Top holders for a market, grouped by outcome token (Data API).
Get the last trade price for a token id.
List Polymarket events with optional filtering by active status, closed status, tag, series, and pagination.
List Polymarket markets with optional filtering by active status, closed status, tag, slug, and pagination.
Catalog of series; each carries an `event_count` (drill in with list_events?series_id=).
List all market tags/categories.
Open orders for the configured wallet (authenticated CLOB).
Get the CLOB order book for a token id.
Place an order on Polymarket.
Open positions for the configured wallet (Data API).
Get price history for a token id with optional time range and fidelity.
Full-text search across Polymarket events and markets (Gamma). Gamma groups markets under events, so token ids live at `events[].markets[].clobTokenIds` (decoded to arrays). Pass `flatten=true` to also get a flat top-level `markets` array, each entry tagged with its parent `event_id`/`event_title`/`event_slug`.
Trade history for the configured wallet (authenticated CLOB).
Current portfolio value for the configured wallet (Data API).
No batch variants for common agent loops. place_order is single-only; agents must call it N times to place multiple orders. A place_orders(orders: array) variant would reduce token waste and latency.
Irreversible operations (place_order, cancel_all) lack confirmation/dry-run support. Agents can accidentally spend real money without a safety gate. Consider a dry_run parameter or separate confirm_order tool.