PolyTest
v0.3.0Read historical Polymarket crypto Up/Down market data: prices, snapshots, and order books.
An MCP server for the PolyTest API. It lets an MCP client read historical data for Polymarket crypto Up/Down markets: the markets, their price snapshots, and their order books. Every tool is read-only. The server runs at https://mcp.polytest.io/mcp over Streamable HTTP. There are two ways to authenticate. Sign in with your PolyTest account. If your client supports OAuth, add the URL with no header. In Claude Code, run /mcp, select polytest and choose Authenticate, or run claude mcp login polytest in a terminal, from the folder where you added the server.
Summary extracted from the README.
@polytest/mcp
An MCP server for the PolyTest API. It lets an MCP client read historical data for Polymarket crypto Up/Down markets: the markets, their price snapshots, and their order books. Every tool is read-only.
Hosted server
The server runs at https://mcp.polytest.io/mcp over Streamable HTTP. There are two ways to authenticate.
Sign in with your PolyTest account. If your client supports OAuth, add the URL with no header. In Claude Code, run /mcp, select polytest and choose Authenticate, or run claude mcp login polytest in a terminal, 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 and you approve the connection. Until you sign in, a client can list the tools but not call them.
Send an API key. Add the header Authorization: Bearer <key>. Create a key at https://www.polytest.io/app/keys.
Tools
| Tool | What it returns | API requests |
|---|---|---|
polytest_list_markets |
Markets of one type for one coin, newest first. | 1 |
polytest_get_market |
One market, by market id or by Polymarket slug. | 1 |
polytest_get_snapshots |
Snapshots of one market, oldest first. Order books are optional. | 1 |
polytest_get_limits |
The plan behind your credential: rate limits, data access, and trial budget. | 1 |
polytest_get_price_series |
Evenly spaced price points across one market. | 1 + samples. samples is 20 by default, so 21 |
The data
- Coins are btc, eth and sol for 5m, 15m and 1hr markets. 4hr and 24hr markets are btc only.
price_upandprice_downare the lowest asks on each side's order book, from 0 to 1. They usually add up to a little more than 1.- PolyTest loads new markets in batches, so the newest data can be hours old. Each market row has a
statusofupcoming,open,resolvedorended_no_result, andpolytest_list_marketsadds a note when its newest market started hours ago. polytest_get_limitsreturnstrial_budget, the total a free trial may use over its 3 days. It applies only during a trial and doesn't show what's left.
Plan limits
Tool calls count against your plan limits the same way direct API calls do. Rate limits are per key, so a key shared between an MCP client and your own code shares one rate limit. Create a dedicated key for MCP use.
Setup
Most of these snippets read the key from the POLYTEST_KEY environment variable. Claude Desktop takes the key in its config file.
Claude Code
Sign in:
claude mcp add --transport http polytest https://mcp.polytest.io/mcp
API key:
claude mcp add --transport http polytest https://mcp.polytest.io/mcp --header "Authorization: Bearer $POLYTEST_KEY"
Local server:
claude mcp add --transport stdio --env POLYTEST_KEY=$POLYTEST_KEY polytest -- npx -y @polytest/mcp
Cursor
In ~/.cursor/mcp.json:
{"mcpServers":{"polytest":{"url":"https://mcp.polytest.io/mcp","headers":{"Authorization":"Bearer ${env:POLYTEST_KEY}"}}}}
VS Code
In .mcp.json:
{"mcpServers":{"polytest":{"type":"http","url":"https://mcp.polytest.io/mcp","headers":{"Authorization":"Bearer ${POLYTEST_KEY}"}}}}
Codex
In ~/.codex/config.toml:
[mcp_servers.polytest]
url = "https://mcp.polytest.io/mcp"
bearer_token_env_var = "POLYTEST_KEY"
Gemini CLI
gemini mcp add --transport http --header "Authorization: Bearer $POLYTEST_KEY" polytest https://mcp.polytest.io/mcp
Claude Desktop
In claude_desktop_config.json:
{"mcpServers":{"polytest":{"command":"npx","args":["-y","@polytest/mcp"],"env":{"POLYTEST_KEY":"pt_live_..."}}}}
Local use
npx -y @polytest/mcp starts the same server on stdio. It reads the API key from POLYTEST_KEY. Without a key the server still starts, and each tool call returns an error that says how to set one.
Docs
https://www.polytest.io/docs/mcp
License
MIT