Access prediction market data, market positions and trading activity on Polymarket. Monitor markets, retrieve information and interact with forecasting-based financial products.
Kimi Code is Moonshot AI's command-line coding agent. It connects to remote MCP servers over HTTP, set up in one JSON file, and signs in with OAuth from the terminal.
This guide connects Polymarket to Kimi Code through MewCP, so Kimi Code can use Polymarket's 40 tools, like list_events, get_event_by_slug and get_event_by_id, without your Polymarket credentials ever reaching the app.
Your Polymarket API key is stored encrypted and injected only at call time. Your agent never holds it, so it can never leak it, log it or paste it into a prompt.
More apps
Crawl websites and extract clean structured data optimized for AI applications and automation. Collect content from the web at scale while maintaining high-quality outputs.
Extract structured data from websites and public web pages. Fetch content, parse information and transform online data into formats that can be consumed by applications, agents and workflows.
TinyFish MCP for running AI-driven browser automation tasks, deep web research, persistent browser login profiles, remote CDP browser sessions, and agentic wallet payments.
Manage repositories, pull requests, issues, branches and development workflows on GitHub. Automate software delivery and collaborate across engineering projects.
Other clients
Polymarket works the same way in every client below. Pick yours for its own guide.
Free to start.
Scope access to the exact Polymarket tools and accounts you allow, work and personal side by side. Anything outside that scope is refused at call time, even when the model asks for it.
Each call is logged: what ran, on which account, and whether it worked. Failures come back structured, so the agent knows whether to retry instead of guessing.
Every app sits behind one secure MCP URL, and there is no server for you to deploy or keep running. Add an integration in the dashboard and it is live on the next call, with no config to change and no new credentials to wire up. Tools load only when a task needs them, so your agent stays fast and focused however many apps you connect.
Edit ~/.kimi-code/mcp.json. Create it if it doesn't exist. For one repository only, use .kimi-code/mcp.json in that project instead.
An entry with a url is an HTTP server.
Start a new Kimi Code session (servers added mid-session only join new ones), then run /mcp-config login mewcp and approve access in the browser.
Start a new chat and ask: "List the tools you can use from MewCP." You should see your connected apps. /mcp shows the connection status.
Lists Polymarket events matching optional filters (status, tags, series, categories, liquidity/volume ranges, dates, sports game or team) and returns each event record with its markets, tags, teams and volume stats. Page through results with `limit` and `offset`; hidden events are excluded unless `includeHidden` is true.
Retrieves a single Polymarket event by its URL slug and returns the full event record, including its markets, tags, teams, live state and volume stats. Set `groups` to true to also get the structured market group hierarchy (`marketGroups`); use get_event_by_id when you have the numeric event ID instead.
Retrieves a single Polymarket event by its numeric event ID and returns the full event record, including its markets, tags, teams, live state and volume stats. Set `groups` to true to also get the structured market group hierarchy (`marketGroups`); use get_event_by_slug when you have the event slug instead.
Lists markets, optionally filtered by IDs, slugs, status flags, volume range, start/end dates, categories, market types, tag IDs, game ID or sports market types, with limit/offset paging. Returns market records including slug, question, status, sides, best bid/ask quotes, tags and volume. Hidden markets are excluded unless includeHidden is true. The returned `slug` is the identifier used by get_market_by_slug, get_market_book, get_market_bbo, get_market_settlement, get_price_history (as `symbol`) and order creation (as `marketSlug`).
Retrieves one market by its numeric ID. Returns the market's full details: question, slug, status, dates, sides, best bid/ask quotes, tags, subject, price terms and volume.
Retrieves one market by its slug. Returns the market's full details: question, ID, status, dates, sides, best bid/ask quotes, tags, subject, price terms and volume.
Retrieves lightweight live market data for one market by slug. Returns best bid and best ask, current and last-trade prices, settlement price, long/short quotes, shares traded, open interest, book depth (price-level counts and resting shares per side) and the book state. Use get_market_book for the full order book.
Retrieves the order book for one market by slug. Returns bid and offer price levels (price and quantity), the book state, the transaction time and market stats (open/close/high/low/last-trade prices, settlement price and method, shares and notional traded, open interest). Use get_market_bbo when only the best bid/offer is needed.
Retrieves the settlement price of one market by slug. Returns the market slug and its settlement price as a number.
Retrieves book-derived Yes (longPrice, normally from the best ask) and No (shortPrice, normally one minus the best bid) display prices over time for one market, as Unix-second timestamped points. These are not trades, and the two prices can sum to more than 1 because they keep the bid-ask spread. Pass either fixedInterval with its matching fidelity (1H/6H/LIVE: 1, 1D: 5, 1W/1M/ALL: 180) or both start_timestamp and end_timestamp with fidelity 1; custom ranges are meant for windows up to 24 hours and may return irregular points. One market per call; an unknown slug or a market without stored observations returns an empty history. Responses are cached for 30 seconds.
Gets reference price history for crypto, gold and silver price markets as a dense, ascending OHLC candle series per requested asset between `from` and `to`, one candle per bucket. Returns one series per distinct asset with its currency, effective window and candles (decimal-string prices); buckets with no ticks are gap-filled (close carried forward, tickCount 0). The window is clamped, not rejected: `from` is raised so a series holds at most 3600 candles (an hour at 1S, 60 hours at 1M, 150 days at 1H), and the effective bounds are echoed on each series. Series order is not guaranteed; each series carries its `asset` field. An unknown symbol, or an asset whose markets are not available yet, fails the whole request with 404.
Lists series (e.g., NFL 2025-26 Season), optionally filtered by slug, active state or recurrence and paged with limit/offset. Returns each series' ID, slug, title, subtitle, recurrence, image, active flag and timestamps. The API accepts two parameter sets: plain ones (`limit`, `offset`, `orderBy`, `slug`, ...) and `params.`-prefixed ones (the `params_*` arguments, including category and tag filters), which the provider lists without descriptions.
Retrieves a single series by its numeric ID. Returns the series' ID, slug, title, subtitle, recurrence, image, active flag and timestamps.
Lists all sports. Returns each sport's ID, slug, name, image and tag ID, with its leagues (ID, slug, name, abbreviation, active series ID) nested under it.
Gets a single sport by its slug. Returns the sport's ID, name, image and tag ID with all of its leagues attached.
Lists events for a sport by its slug, in either the games ('sport') or 'futures' tab and the 'general' or 'trending' section. Returns the events (with markets, teams, live score and state) plus the sport record; page with limit/offset.
Lists leagues across all sports, at most 50 per page. Returns each league's ID, slug, name, abbreviation, parent sport ID and active series ID; page with limit/offset.
Gets a single league by its slug. Returns the league's ID, name, abbreviation, parent sport ID, tag ID, active series ID and operational status.
Lists events for a league by its slug, taken from the league's active series, in either the games ('sport') or 'futures' tab and the 'general' or 'trending' section. Returns the events (with markets, teams, live score and state) plus the league record; page with limit/offset.
Lists tags in ranked order, optionally filtered by slug, tag IDs, parent tag or a case-insensitive label substring. Returns each tag's ID, label, slug, image, tradable flag, league and sport details, parent ID and subtags. If both parentSlug and parentId are given, parentSlug takes precedence over parentId.
Gets a single tag by its slug. Returns the tag's ID, label, image, tradable flag, league and sport details, parent ID and subtags.
Gets a single tag by its numeric ID. Returns the tag's label, slug, image, tradable flag, league and sport details, parent ID and subtags.
Lists events carrying a given tag slug, sorted by volume descending unless orderBy/orderDirection say otherwise. Returns each event's ID, ticker, slug, title, dates, status flags, liquidity and volume figures, markets, tags, teams and live game state. By default only active, non-closed events are returned; set active/closed to include others.
Runs a full-text search across Polymarket events and markets, optionally filtered by series, market type, start/closed time, status or combo-enabled markets. Returns the matching events, each with its associated markets nested under `markets` (IDs, slugs, titles, status flags, volumes, tags). Page through results with `page` and `limit`.
Lists the authenticated account's open orders, optionally limited to specific markets. Returns each order's `id`, market slug, intent, type, price, original/filled/remaining quantity, time in force and state; the `id` is the input for get_order, cancel_order, modify_order, cancel_multiple_orders and modify_multiple_orders.
Gets one order by its exchange-assigned ID (from list_open_orders or create_order). Returns the order's market, intent, type, price, original/filled/remaining quantity, average fill price, commissions, time in force and current state.
Previews an order without placing it: validates the same parameters create_order accepts and returns the order as it would be entered. Nothing is submitted to the exchange. Set either `intent` or `outcome_side` + `action`; `ORDER_TYPE_LIMIT` needs `price`.
Places a real order on the exchange for the authenticated account to buy or sell YES/NO contracts in one market; it can fill immediately and commits account funds, so confirm the market, intent, price and size with the user first (use preview_order to validate without placing anything). Returns the new order `id` (input for get_order, cancel_order and modify_order) and, when `synchronous_execution` is true, its executions. Set either `intent` or `outcome_side` + `action`; `ORDER_TYPE_LIMIT` needs `price`. Orders not processed within 5 seconds are rejected with `Order Processing Max Delay Exceeded`, a transient latency reject (not a rate limit) after which the order may be resubmitted.
Modifies an existing open order (ID from list_open_orders) — it can overwrite the price, quantity, time in force, good-till time and maker-only flag; the exchange applies it as a cancel-replace. Only fields you provide are changed — others keep their current value. NOTE: this overwrites the current order values — the original state is not stored by the API after the call. The response includes both the before and after state (each read via get_order) so you have a full record of what changed; `after` is read immediately and may still show ORDER_STATE_PENDING_REPLACE. Modifications not processed within 5 seconds are rejected with `Order Processing Max Delay Exceeded`, a transient latency reject after which the request may be resubmitted.
DESTRUCTIVE — REQUIRES EXPLICIT USER CONFIRMATION BEFORE CALLING. Cancels one open order by its exchange-assigned ID (from list_open_orders), removing its remaining unfilled quantity from the book. This action is irreversible — a canceled order cannot be restored and must be placed again with create_order. NEVER call this tool autonomously or as part of an automated flow. You MUST stop, tell the user exactly which order (market, side, price, quantity) will be canceled and that it is permanent, and wait for their explicit written confirmation before proceeding. Returns the canceled order ID (the API returns an empty body on success). Pure cancels are not rejected by the exchange's 5-second latency stopgap.
DESTRUCTIVE — REQUIRES EXPLICIT USER CONFIRMATION BEFORE CALLING. Cancels ALL open orders of the authenticated account in the markets listed in `slugs`. If `slugs` is omitted or empty, it cancels EVERY open order in EVERY market on the account. This action is irreversible — canceled orders cannot be restored and must be placed again with create_order. NEVER call this tool autonomously or as part of an automated flow. You MUST stop, tell the user exactly which orders will be canceled (run list_open_orders with the same `slugs` to show them) and that it is permanent, and wait for their explicit written confirmation before proceeding. Returns `canceledOrderIds`.
Places a market sell order for the ENTIRE position the authenticated account holds in one market (YES or NO contracts), exiting it at the best available price; confirm with the user first. It cannot sell part of a position or set a limit price — use create_order with ORDER_INTENT_SELL_LONG or ORDER_INTENT_SELL_SHORT for that. Returns the close order `id` and, when `synchronous_execution` is true, its executions. Orders not processed within 5 seconds are rejected with `Order Processing Max Delay Exceeded`, a transient latency reject after which the request may be resubmitted.
Places 1–20 real orders on the exchange in one request, each taking the same fields as create_order; they can fill immediately and commit account funds, so confirm every order with the user first. Returns `createdOrderIds` in request order — these only confirm submission: per-order acceptance, fills and rejects are not in this response, so check each with get_order. If any entry fails request-shape validation, the whole batch is rejected before reaching the exchange.
DESTRUCTIVE — REQUIRES EXPLICIT USER CONFIRMATION BEFORE CALLING. Cancels the 1–20 listed open orders in one request, removing their remaining unfilled quantity from the book. This action is irreversible — canceled orders cannot be restored and must be placed again with create_order. NEVER call this tool autonomously or as part of an automated flow. You MUST stop, tell the user exactly which orders will be canceled and that it is permanent, and wait for their explicit written confirmation before proceeding. Returns `canceledOrderIds`, which only echoes the request — the exchange may silently skip unknown order IDs, so verify with list_open_orders. If any entry fails request-shape validation, the whole batch is rejected before reaching the exchange.
DESTRUCTIVE — REQUIRES EXPLICIT USER CONFIRMATION BEFORE CALLING. Modifies the 1–20 listed open orders in one request, overwriting each order's price, quantity, time in force, good-till time or maker-only flag as given; each entry is sent to the exchange as a cancel-replace. The previous order values are not returned and cannot be recovered from this call. NEVER call this tool autonomously or as part of an automated flow. You MUST stop, summarise to the user exactly which orders change and their new values, and wait for their explicit written confirmation before proceeding. Returns `modifiedOrderIds`, which only echoes the request — the exchange may silently skip unknown order IDs, so verify with get_order. If any entry fails request-shape validation, the whole batch is rejected before reaching the exchange.
Lists the user's trading positions across all markets, or only the position for one market when `market` is given. Returns a map of market slug to position (decimal-string quantities, cost basis, realized PnL, unrealized cash value, market metadata) plus `nextCursor` and `eof` for cursor pagination. Prefer the *Decimal quantity fields; the whole-number ones are deprecated.
Lists the user's account activity history: trades, position resolutions (market settlements) and account balance changes such as deposits, withdrawals, transfers, referral bonuses, fee rebates and liquidity-program payouts. Each activity carries a `type` plus the matching `trade`, `positionResolution` or `accountBalanceChange` object; results are newest first by default and paginate with `nextCursor` / `eof`.
Gets the user's current account balances, one entry per currency. Returns current fiat balance, buying power (capital available to trade after security valuations and open orders), asset notional and available collateral, pending credits, open-order and unsettled-fund totals, margin requirement, balance reservations and any pending withdrawals.
Lists active and historical incentive programs grouped by market. Returns each market's slug, instrument state, category and its time periods (program ID and type, start/end, reward pool, status, liquidity targets such as targetSize and maxSpread), plus `nextPageToken` for paging; `page_size` counts markets, not time periods.
Lists the authenticated user's incentive rewards, where each entry sums all payouts for one market on one Eastern Time date. Returns reward amount, program type, market slug, date and status; by default covers the program launch date through today.