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
https://api.thepredictionmarkets.com/mcp| What | Details |
|---|---|
| Transport | Streamable HTTP, stateless, JSON replies. Pick HTTP or Streamable HTTP if your app asks. |
| Sign-in | None. Optionally send a free API key as X-API-Key: <key> or Authorization: Bearer <key>. |
| Without a key | About 30 tool calls a minute, up to 25 rows per answer. |
| With a key | Your key's plan limits, shared with your REST requests. Free keys: API keys. |
| Tools | Eight read-only tools (listed below). Nothing can trade or change data. |
Claude (claude.ai and Claude Desktop)
- Open Customize → Connectors, click + Add, then Add custom connector.
- Name it
ThePredictionMarketsand pastehttps://api.thepredictionmarkets.com/mcpas the URL. Leave sign-in as No sign in. - Optional: under Request headers, add
X-API-Keywith your free key for higher limits. - 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
claude mcp add --transport http tpm https://api.thepredictionmarkets.com/mcpclaude 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
- On chatgpt.com, open Plugins, click +, then Add custom MCP server.
- Name it
ThePredictionMarkets, pastehttps://api.thepredictionmarkets.com/mcpand set authentication to No authentication. - 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
- Open Customize → Connectors (or Plugins), click Add custom, then Add MCP connector → Remote.
- Name it
ThePredictionMarkets, pastehttps://api.thepredictionmarkets.com/mcp, and choose Streamable HTTP. - 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:
{
"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
{
"mcpServers": {
"tpm": {
"url": "https://api.thepredictionmarkets.com/mcp",
"headers": {
"X-API-Key": "${env:TPM_API_KEY}"
}
}
}
}{
"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
| Tool | What it does |
|---|---|
search_events | Find events by words, category, venue or closing date, busiest first. |
get_event | One event with every venue's price per outcome, freshness, matches and gaps. |
get_price_history | Price candles for one outcome, up to 180 days. |
get_markets | Venue listings, filtered by venue, status or words. |
find_matches | The same market on the other venue, from a Kalshi or Polymarket link or id. |
get_prices | Latest quotes for up to 100 contracts. |
find_price_gaps | Outcomes where the venues disagree most. Gaps are gross: before fees and depth. |
get_status | Venue 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:
https://thepredictionmarkets.com/api/docs/gpt-actions.json- In the GPT editor, open Configure → Create new action → Import from URL and paste the URL above.
- Under Authentication, choose API Key, auth type Custom, header name
X-API-Key, and paste your free key. - Set the privacy policy to
https://thepredictionmarkets.com/privacy. - Tell the GPT to call
getEventwithmax_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 -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}}}'| HTTP | Meaning |
|---|---|
429 | Free-tier or plan limit reached. Wait for Retry-After seconds, or add a key. |
401 | The API key is wrong or revoked. Remove it to use the free tier. |
405 | Not a POST. |
Related
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.