How Parlay Works

How Parlay maps Polymarket, Kalshi, and Manifold into a single MCP tool schema.

Doc index

Looking for a machine-readable map of every Parlay doc? See the Introduction for the human version, or fetch /docs/llms.txt for the agent-friendly index.

Parlay sits between an AI assistant and three prediction-market venues — Polymarket, Kalshi, and Manifold — and turns their three different APIs into one typed MCP tool schema. The model speaks one protocol; Parlay handles the venue-specific glue. Below is the full pipeline, layer by layer.

The full pipeline

A user asks a question

Plain English in the AI client: "What's the best price on a Fed cut in June?" or "Which market has the most liquidity for the 2026 election?"

The AI client picks a tool

The model reads Parlay's MCP descriptor, picks search_markets or get_quote, fills in typed arguments, and sends the call over HTTP or stdio.

Parlay validates and routes

The Parlay MCP server checks your API key, validates the arguments against the tool schema, and routes the call to the right venue adapter.

The venue adapter calls the upstream API

Polymarket, Kalshi, or Manifold returns its native payload. Parlay normalizes the shape — same field names, same units, same timestamps — across all three.

The client gets typed JSON back

The model reads structured fields it can reason about directly. No scraping, no per-venue parsing logic, no SDK on the client side.

Layer 1: Your AI client

You bring the AI client. Parlay works with any MCP-aware client today: Claude (desktop and web), ChatGPT (via the MCP connector), Gemini CLI, OpenClaw, Cursor, and Windsurf. The client provides:

CapabilityWhat it brings
Natural-language understandingThe model translates "best Fed-cut odds" into a real search_markets call.
Multi-step reasoningChain search_marketsget_quoteget_orderbook without prompting at each step.
File and context groundingPull tickers, dates, or themes from documents you've shared with the assistant.
User confirmationTrading tools (landing next) prompt the user before any state-changing call.
Result formattingThe model converts typed JSON into prose, tables, or charts the user can read.

Layer 2: MCP (Model Context Protocol)

MCP is the open spec from Anthropic that lets any client talk to any tool server without a custom SDK. Parlay exposes a single endpoint that every client connects to:

https://parlay.run/mcp

The same URL serves Claude, ChatGPT, Gemini, OpenClaw, and any future MCP client. The descriptor handshake tells the client which tools exist and what shape each call takes.

Read tools — live today

search_markets, get_quote, get_orderbook, get_trades. All four work across Polymarket, Kalshi, and Manifold with one schema.

Write tools — landing next

place_order and cancel_order are in development. They will be opt-in, separately scoped, and require explicit user confirmation per call.

For the wire-level handshake and a sample descriptor, see How MCP Works.

Layer 3: Authentication (API key + Bearer)

Parlay uses a single API key per account, not per-venue OAuth. Venue credentials live server-side and never reach the client.

Issue a key in the dashboard

Sign in at parlay.run and create an API key under Dashboard → API Keys. Each key is scoped to your account and can be rotated or revoked at any time.

Set it in your client

For HTTP clients (Claude, ChatGPT, Gemini, Cursor) paste the key as a Bearer token in the MCP connector settings:

Authorization: Bearer <your-api-key>

For stdio clients (OpenClaw, Gemini CLI) export it in your shell:

export PARLAY_API_KEY=<your-api-key>

Parlay validates and scopes the session

The server checks the key against your account, scopes the session to read-only tools today, and rate-limits per account. Invalid or revoked keys fail at the descriptor handshake — before any venue is touched.

Server-side adapters call the venues

Parlay's adapters use Parlay-managed venue credentials to fetch live data. Your API key never sees a Polymarket wallet, a Kalshi trading secret, or a Manifold session token.

What Parlay never sees from you:

  • Your wallet seed phrase or private keys
  • Your venue-side API secrets
  • Your custodial balances on any platform
  • Your IP-bound login sessions

Layer 4: Prediction-market APIs

The point of Parlay is that one tool name returns the same shape no matter which venue answers. Here is how each tool maps across the three venues today:

Parlay toolUnderlying callWhat it returns
search_marketsPolymarket Gamma API /marketsActive markets matching keyword/category, with close date and venue tag.
search_marketsKalshi /trade-api/v2/marketsActive Kalshi markets, normalized to the same shape.
search_marketsManifold /v0/search-marketsActive Manifold markets, normalized to the same shape.
get_quotePolymarket CLOB /midpoint + bookCurrent yes/no implied probability and last-trade timestamp.
get_quoteKalshi /markets/{id}Current yes/no probability from Kalshi's bid/ask.
get_quoteManifold /market/{id}Current probability from Manifold's market state.
get_orderbookPolymarket CLOB /bookTop-N bid/ask levels with size, in cents.
get_orderbookKalshi /markets/{id}/orderbookTop-N bid/ask levels with size, normalized.
get_tradesPolymarket CLOB /tradesRecent fills with price, size, side, timestamp.
get_tradesKalshi /markets/{id}/tradesRecent fills, normalized to the same fields.

Manifold doesn't expose a public order book or trade tape today, so get_orderbook and get_trades skip Manifold gracefully — the response includes a not_supported flag rather than failing the whole call.

Safety model

Parlay is read-only today, but the safety model is layered for when trading tools land.

LayerProtectionWho enforces it
API-key scopeEach key is bound to one account; revocation is immediate.Parlay control plane
Tool surfaceOnly read tools are exposed today; write tools require a separate scope.Parlay MCP server
Rate limitingPer-account quotas prevent runaway agents from hammering venues.Parlay edge
Venue ToSAdapters respect each venue's robots, rate limits, and acceptable-use rules.Parlay adapters
Data minimizationOnly the fields the tool schema declares leave the server.Parlay MCP server
Audit loggingEvery tool call is logged with timestamp, tool, and account for review.Parlay control plane

Data flow summary

WhatWhere it livesWho can access it
Your Parlay API keyHashed in the Parlay control plane; raw value shown once at issuance.You, on the client side. Parlay sees only the hash after creation.
Venue credentialsParlay-managed secrets, encrypted at rest, never sent to clients.Parlay adapters only.
Market data (quotes, books, trades)Cached briefly at the edge for hot markets; otherwise fetched live.The requesting client, on demand.
Request logsAudit log scoped to your account.You (via dashboard) and Parlay support.
User prompt textStays in the AI client; only the typed tool arguments reach Parlay.Your AI client. Parlay never sees raw prompts.
Response payloadsReturned to the client and not retained beyond the audit log entry.Your AI client.

FAQ