Polymarket MCP

io.github.beejmaxxPublished by GitHub account beejmaxxv0.1.1Updated Oct 24, 2026

Polymarket market data, live CLOB books, replay, simulation, and opt-in trading in Rust.

VerifiedSTDIODesktop onlyFinanceData & Analytics

Overview

AI-generated overview

A local Rust MCP server for Polymarket prediction-market data: market briefs, live order books, wallet analytics, replay, simulation, and optional gated…

What you can do
Exposes tool profiles for Polymarket research: public market discovery, exact CLOB order books, wallet analytics, realtime market state over WebSocket, SQLite recording and replay, and fill simulation. The default research profile offers 30 public tools; a compact 11-tool chatgpt profile is available over Streamable HTTP. An opt-in trading profile adds authenticated account and order operations.
When to use it
Use it when an assistant needs Polymarket market data, order-book depth, liquidity, spread, slippage estimates, or wallet activity for research and analysis. It is also suited to recording and replaying market observations locally. Trading is only relevant if you deliberately opt in.
Requirements
Runs as a local binary on macOS, Linux, or Windows, installed via script, Homebrew, Scoop, or a release bundle. The default research profile needs no API key or wallet. Configuration uses environment variables such as POLYMARKET_TOOL_PROFILE and POLYMARKET_MCP_DB; network access to Polymarket APIs and WebSocket is required.
Before you install
Trading is off by default and requires separate opt-in: POLYMARKET_TOOL_PROFILE, POLYMARKET_ENABLE_TRADING, POLYMARKET_PRIVATE_KEY, POLYMARKET_MAX_ORDER_PUSD, and POLYMARKET_SIGNATURE_TYPE. Order placement spends real funds and needs per-operation confirmation; cancellations have their own confirmations. The private key is a wallet secret. Local SQLite stores recordings and approval audits. The server states it has no telemetry.

Installation

In SourceWeft

  1. Open Polymarket MCP in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Polymarket MCP

[CI] [Production API canary] [License: MIT]

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.

Install in a minute

macOS or Linux:

bash
curl --proto '=https' --tlsv1.2 -LsSf https://raw.githubusercontent.com/beejmaxx/polymarket-mcp-rs/main/scripts/install.sh | shpolymarket-mcp-rs doctor

Windows PowerShell:

powershell
irm https://raw.githubusercontent.com/beejmaxx/polymarket-mcp-rs/main/scripts/install.ps1 | iexpolymarket-mcp-rs doctor

Or use a package manager:

bash
brew install beejmaxx/tap/polymarket-mcp-rs
powershell
scoop bucket add beejmaxx https://github.com/beejmaxx/scoop-bucketscoop install beejmaxx/polymarket-mcp-rs

Then add it to a client:

bash
codex mcp add polymarket -- polymarket-mcp-rs# orclaude mcp add polymarket -- polymarket-mcp-rs

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.

Why this server

  • Verified replacement surface: 46 tools across public data, live books, research workflows, and opt-in account operations, with an automated live audit against all 25 Python demo tools.
  • Answer-ready workflows: one market brief joins metadata, executable books, history, fill impact, source URLs, timestamps, and limitations; wallet and explicit negative-risk event summaries avoid unnecessary tool chains.
  • Correct numeric boundaries: decimal financial values and 256-bit IDs stay strings across JSON, preventing floating-point and integer loss.
  • Stateful market research: Rust maintains reconstructed books and feed health internally instead of sending every tick to the model.
  • Honest replay: SQLite stores observations captured by this process, tracks dropped updates, and never presents them as complete exchange history.
  • Safe defaults: trading tools are absent by default; exposing them and enabling mutation are separate decisions.
  • Operationally simple: one binary, stdio or stateless Streamable HTTP, structured errors, health and Prometheus endpoints, an offline/online doctor, graceful shutdown, daily production canaries, containers, checksums, SBOMs, and release provenance.

A useful first prompt

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.

Tool profiles

ProfileToolsIntended use
chatgpt11Compact stateless public research surface for hosted clients
core20Public REST discovery, books, wallets, answer-ready analysis, and simulation
research (default)30Core plus realtime watching and local recording/replay
trading36Core plus authenticated account, user-event streaming, and trading operations
all46Research 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.

Architecture

text
MCP client (stdio or Streamable HTTP)        |        vtool profile + typed MCP schemas        |        vvalidation and stable output mapping   |              |                |                 |Gamma/Data/    CLOB REST      realtime books      SQLite + tradingpublic APIs    exact books    WebSocket health    replay / audit

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.

Configuration

VariableDefaultPurpose
POLYMARKET_TOOL_PROFILEresearchchatgpt, core, research, trading, or all
POLYMARKET_MCP_DBOS application-data directorySQLite recording and approval-audit database
POLYMARKET_WS_URLProduction market WebSocketOverride the full WebSocket URL
POLYMARKET_WS_PROXYunsetUnauthenticated socks5://host:port WebSocket proxy
HTTPS_PROXY / HTTP_PROXYenvironment dependentProxy used by HTTP API clients
RUST_LOGinfostderr 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.

Trading is a separate opt-in

Read SECURITY.md and docs/THREAT_MODEL.md first. At minimum:

bash
export POLYMARKET_TOOL_PROFILE=allexport POLYMARKET_ENABLE_TRADING=trueexport POLYMARKET_PRIVATE_KEY=0x...export POLYMARKET_MAX_ORDER_PUSD=100export POLYMARKET_SIGNATURE_TYPE=eoa

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.

Development and evidence

Rust 1.90 or newer is required:

bash
cargo fmt --checkcargo clippy --locked --all-targets --all-features -- -D warningscargo test --locked --all-featurescargo test --locked --test live_api -- --ignored --nocapture

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:

bash
python3 scripts/parity_harness.py

This software provides market infrastructure, not trading recommendations or financial advice.

Source: README.md at commit 9411ea5

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts