The Prediction Markets
AI assistants

Connect TPM to your AI assistant

Paste one URL into your assistant and it can look up live Kalshi and Polymarket odds, compare venues, read price history and find gaps. The server is https://api.thepredictionmarkets.com/mcp. No key needed.

At a glance

MCP server URL
https://api.thepredictionmarkets.com/mcp
WhatDetails
TransportStreamable HTTP, stateless, JSON replies. Pick HTTP or Streamable HTTP if your app asks.
Sign-inNone. Optionally send a free API key as X-API-Key: <key> or Authorization: Bearer <key>.
Without a keyAbout 30 tool calls a minute, up to 25 rows per answer.
With a keyYour key's plan limits, shared with your REST requests. Free keys: API keys.
ToolsEight read-only tools (listed below). Nothing can trade or change data.

Claude (claude.ai and Claude Desktop)

  1. Open Customize → Connectors, click + Add, then Add custom connector.
  2. Name it ThePredictionMarkets and paste https://api.thepredictionmarkets.com/mcp as the URL. Leave sign-in as No sign in.
  3. Optional: under Request headers, add X-API-Key with your free key for higher limits.
  4. Click Add, then turn the connector on in a chat from the tools menu.

Team and Enterprise: an owner adds it once under Organization settings → Connectors → Add → Custom → Web; members then click Connect. Free accounts can add one custom connector.

Claude Code

Terminal
claude mcp add --transport http tpm https://api.thepredictionmarkets.com/mcp
With an API key
claude mcp add --transport http tpm https://api.thepredictionmarkets.com/mcp \
  --header "X-API-Key: $TPM_API_KEY"

Add --scope project to share it through the repo's .mcp.json. Type /mcp inside Claude Code to check it is connected.

ChatGPT

  1. On chatgpt.com, open Plugins, click +, then Add custom MCP server.
  2. Name it ThePredictionMarkets, paste https://api.thepredictionmarkets.com/mcp and set authentication to No authentication.
  3. Accept the warning, click Create, then install it and turn it on in a chat.

Which plans

Business, Enterprise and Edu workspaces can add custom MCP servers (on Business, an admin creates them). Availability on personal plans is changing; check OpenAI's help center if you don't see the option. ChatGPT can't send an API key to MCP servers, so it always uses the free tier.

Building your own GPT instead? See Build a Custom GPT.

Perplexity

  1. Open Customize → Connectors (or Plugins), click Add custom, then Add MCP connector → Remote.
  2. Name it ThePredictionMarkets, paste https://api.thepredictionmarkets.com/mcp, and choose Streamable HTTP.
  3. Set auth to None, or API Key with your free key. Click Add, then click the card to turn it on.

Custom connectors are on paid plans. On Enterprise an admin may need to allow member-added connectors.

Grok

In the Grok app, open grok.com/connectors → New connector → Custom and paste https://api.thepredictionmarkets.com/mcp. On Business and Enterprise an admin sets connectors up first.

With the xAI API, pass the server as a remote MCP tool:

POST https://api.x.ai/v1/responses
{
  "model": "grok-4.7",
  "input": [
    {
      "role": "user",
      "content": "Compare Kalshi and Polymarket odds on the next Fed decision."
    }
  ],
  "tools": [
    {
      "type": "mcp",
      "server_url": "https://api.thepredictionmarkets.com/mcp",
      "server_label": "tpm",
      "headers": {
        "X-API-Key": "<your key>"
      }
    }
  ]
}

Leave out headers to use the free tier.

Meta Muse

Muse can add custom connectors: open Settings → Connectors → Add custom connector (or ask Muse to add one) and paste https://api.thepredictionmarkets.com/mcp. Meta hasn't published full steps yet, so the menu may differ.

Cursor and VS Code

Cursor: .cursor/mcp.json (or ~/.cursor/mcp.json)
{
  "mcpServers": {
    "tpm": {
      "url": "https://api.thepredictionmarkets.com/mcp",
      "headers": {
        "X-API-Key": "${env:TPM_API_KEY}"
      }
    }
  }
}
VS Code (Copilot): .vscode/mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "tpm-key",
      "description": "TPM API key",
      "password": true
    }
  ],
  "servers": {
    "tpm": {
      "type": "http",
      "url": "https://api.thepredictionmarkets.com/mcp",
      "headers": {
        "X-API-Key": "${input:tpm-key}"
      }
    }
  }
}

Remove headers (and inputs) to use the free tier.

Tools

ToolWhat it does
search_eventsFind events by words, category, venue or closing date, busiest first.
get_eventOne event with every venue's price per outcome, freshness, matches and gaps.
get_price_historyPrice candles for one outcome, up to 180 days.
get_marketsVenue listings, filtered by venue, status or words.
find_matchesThe same market on the other venue, from a Kalshi or Polymarket link or id.
get_pricesLatest quotes for up to 100 contracts.
find_price_gapsOutcomes where the venues disagree most. Gaps are gross: before fees and depth.
get_statusVenue feed health and when prices last updated.

Every answer includes source, retrieved_at and, per price, freshness and the event's web_url, so the assistant can say how old a price is and link to it. Prices are market-implied probabilities, not forecasts by TPM.

Try these prompts

  • "What do Kalshi and Polymarket say about the next Fed decision?"
  • "Who leads the 2028 Democratic nomination on each venue, and how has it moved this week?"
  • "Here's a Kalshi link: is the same market on Polymarket, and which is cheaper?"
  • "Where do Kalshi and Polymarket disagree most right now?"

Build a Custom GPT

GPTs use Actions (OpenAPI) instead of MCP. We publish a ready-made schema for the REST API:

Actions schema URL
https://thepredictionmarkets.com/api/docs/gpt-actions.json
  1. In the GPT editor, open Configure → Create new action → Import from URL and paste the URL above.
  2. Under Authentication, choose API Key, auth type Custom, header name X-API-Key, and paste your free key.
  3. Set the privacy policy to https://thepredictionmarkets.com/privacy.
  4. Tell the GPT to call getEvent with max_outcomes=15: big events run past the 100,000-character limit for Actions.

One key for everyone

Everyone who uses your GPT shares its key and its limits. Use a key just for the GPT, and revoke it on API keys if it leaks.

For client developers

Each POST carries one JSON-RPC message and gets one JSON reply. There are no sessions and no server-sent stream, so GET returns 405. Only tools/call counts toward limits; initialize and tools/list are free.

curl
curl -s https://api.thepredictionmarkets.com/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_events","arguments":{"query":"fed","limit":3}}}'
HTTPMeaning
429Free-tier or plan limit reached. Wait for Retry-After seconds, or add a key.
401The API key is wrong or revoked. Remove it to use the free tier.
405Not a POST.

Build with TPM

Get your free API key

One key gives you Kalshi and Polymarket events, prices with freshness, price history, cross-venue gaps and the live quotes WebSocket.