Polymarket market data, live CLOB books, replay, simulation, and opt-in trading in Rust.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A self-contained Rust MCP server for Polymarket: source-linked market briefs, public discovery, exact CLOB V2 books, wallet analytics, realtime market state, SQLite recording/replay, fill simulation, and safely gated optional trading.
The default research profile needs no API key or wallet. It exposes 30 public/realtime tools and does not advertise or accept calls to authenticated trading tools. A separate 11-tool chatgpt profile is compact, stateless, credential-blind, and available over Streamable HTTP with an optional inline market card.
macOS or Linux:
Windows PowerShell:
Or use a package manager:
Then add it to a client:
Prebuilt binaries and a one-click polymarket-mcp.mcpb bundle are attached to every GitHub release. See the install guide for Claude Desktop, VS Code, source builds, custom database paths, and Windows details.
Find the five highest-volume active Polymarket markets. For each, show the current outcome prices, liquidity, spread, order-book imbalance, and estimated slippage for 100 shares. Explain data limitations and do not recommend a trade.
Other demo prompts are in docs/DEMO.md.
| Profile | Tools | Intended use |
|---|---|---|
chatgpt | 11 | Compact stateless public research surface for hosted clients |
core | 20 | Public REST discovery, books, wallets, answer-ready analysis, and simulation |
research (default) | 30 | Core plus realtime watching and local recording/replay |
trading | 36 | Core plus authenticated account, user-event streaming, and trading operations |
all | 46 | Research and trading together |
Select a profile with --tool-profile research or POLYMARKET_TOOL_PROFILE=research. Hidden tools are removed from both tools/list and dispatch. Choosing trading or all only exposes the tool definitions; order mutation still requires POLYMARKET_ENABLE_TRADING=true, a signer, local caps, and per-operation confirmation. Public HTTP accepts only chatgpt or core and constructs an application instance that ignores credentials by design.
Run polymarket-mcp-rs tools to inspect the default catalog or polymarket-mcp-rs --tool-profile all tools --json for complete schemas. See docs/TOOLS.md for the grouped reference.
The market WebSocket engine seeds each watched token from CLOB REST, then applies full snapshots and incremental price changes. Authenticated profiles can separately watch account order and trade events. Connection state, reconnects, source-specific counters, local receipt time, feed age, errors, and recording gaps remain explicit. SQLite writes use a bounded channel and dedicated writer thread; active recordings flush before watches stop on MCP EOF, SIGINT, or SIGTERM.
| Variable | Default | Purpose |
|---|---|---|
POLYMARKET_TOOL_PROFILE | research | chatgpt, core, research, trading, or all |
POLYMARKET_MCP_DB | OS application-data directory | SQLite recording and approval-audit database |
POLYMARKET_WS_URL | Production market WebSocket | Override the full WebSocket URL |
POLYMARKET_WS_PROXY | unset | Unauthenticated socks5://host:port WebSocket proxy |
HTTPS_PROXY / HTTP_PROXY | environment dependent | Proxy used by HTTP API clients |
RUST_LOG | info | stderr log filtering |
The default database is in ~/Library/Application Support/polymarket-mcp/ on macOS, $XDG_DATA_HOME/polymarket-mcp/ (or ~/.local/share/polymarket-mcp/) on Linux, and %LOCALAPPDATA%\polymarket-mcp\ on Windows. ALL_PROXY=socks5://... is also honored for the public market WebSocket when POLYMARKET_WS_PROXY is unset; neither setting is needed on a normal unrestricted network. The server has no telemetry.
Read SECURITY.md and docs/THREAT_MODEL.md first. At minimum:
EOA, legacy Proxy, Gnosis Safe, and POLY_1271 configurations are supported. preview_order performs policy and current-market-rule checks and creates a single-use five-minute approval. place_order consumes that approval and requires confirm=true; batch placement requires PLACE_BATCH. Cancellations have their own confirmations. Approval transitions are persisted before submission, and ambiguous network outcomes are never reported as safe retries. Account reads and user-event watches do not silently enable cancel-on-disconnect heartbeats.
Rust 1.90 or newer is required:
Normal tests are offline and launch the compiled executable as a real stdio MCP subprocess. The ignored suite exercises current production Gamma, Data, CLOB REST, wallet, scanning, WebSocket, recording, replay, and simulation paths; it never places an order. Tool catalogs have committed golden contracts, and release tags rebuild on five OS/architecture targets.
The live semantic replacement audit launches both this server and the reference Python server through MCP, maps every Python demo tool, and fails on a Rust error or invariant violation:
This software provides market infrastructure, not trading recommendations or financial advice.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/polymarket-mcp-2)<a href="https://allmcps.com/mcp/polymarket-mcp-2"><img src="https://allmcps.com/api/badge/polymarket-mcp-2?style=directory" alt="Polymarket MCP on AllMCPs" /></a>