PolyTest

Historical Polymarket crypto Up/Down market data for backtesting: outcomes, price snapshots, order books and price series. Read-only.

Hosted MCP Server

npx add-mcp 'https://mcp.polytest.io/mcp'

Installs into Claude Code, Codex, Cursor and more

Documentation

MCP server

The PolyTest MCP (Model Context Protocol) server lets an AI tool read PolyTest market data directly. It works in Claude Code, Cursor, VS Code, Codex, Gemini CLI, Claude Desktop and other MCP clients. All of its tools are read-only.

Connect

The hosted server is at https://mcp.polytest.io/mcp and uses Streamable HTTP. The Claude Code command adds the server without a key, and you sign in with your PolyTest account after that. The other snippets send an API key from the POLYTEST_KEY environment variable. Authenticate explains both.

claude mcp add --transport http polytest https://mcp.polytest.io/mcp

Run the Claude Code and Gemini CLI lines in a terminal. The Cursor block goes in ~/.cursor/mcp.json, the VS Code block in .mcp.json and the Codex block in ~/.codex/config.toml.

Authenticate

If your client supports OAuth, sign in with your PolyTest account. In Claude Code, run /mcp, select polytest and choose Authenticate. If /mcp isn't available, as in Claude Code inside the desktop app, run claude mcp login polytest in a terminal instead, from the folder where you added the server. Other clients ask you to sign in when they connect or the first time they call a tool.

Your browser opens a sign-in link on qpzofvjvtdvdnvgpxplg.supabase.co, the address of Supabase Auth, which PolyTest uses for sign-in. It then continues on www.polytest.io, where you approve the connection. You can remove it later in Settings, under Connected apps.

You can also send an API key in the header Authorization: Bearer <key>. The X-API-Key header works too. Create a key on the API keys page, and never put it in the URL.

In Claude Code, the key goes in a --header flag:

claude mcp add --transport http polytest https://mcp.polytest.io/mcp --header "Authorization: Bearer $POLYTEST_KEY"

Run it locally

npx -y @polytest/mcp runs the server on your own machine from the npm package @polytest/mcp. It needs Node 20 or newer and reads your key from the POLYTEST_KEY environment variable.

claude mcp add --transport stdio --env POLYTEST_KEY=$POLYTEST_KEY polytest -- npx -y @polytest/mcp

The Claude Desktop block goes in claude_desktop_config.json. Replace pt_live_... with your key.