Read-only MCP server for Polymarket public market data (Gamma / CLOB / Data APIs).
Project description
Polymarket MCP Server (read-only)
A read-only MCP server exposing Polymarket's public prediction-market data. Search markets, read live odds and order books, pull historical probability time-series, and inspect public wallet positions — all over public, unauthenticated endpoints.
Read-only by design. No order placement, cancellation, signing, wallets, or private keys. No API keys, no environment variables, zero secrets.
Tools
| Tool | What it does |
|---|---|
polymarket_search |
Natural-language search across events / markets / tags. |
polymarket_list_markets |
Browse & filter markets (volume, liquidity, dates, tags). |
polymarket_get_market |
Full detail for one market by id, slug, or condition_id. |
polymarket_list_events |
Browse & filter events (groups of markets). |
polymarket_get_event |
Event detail with all child markets. |
polymarket_trending_markets |
What's hot right now (top markets by 24h volume). |
polymarket_get_live_price |
Freshest CLOB midpoint / bid / ask / spread for an outcome token. |
polymarket_get_order_book |
Live order book (top N levels) for an outcome token. |
polymarket_get_price_history |
Historical probability time-series for an outcome token. |
polymarket_get_user_positions |
Public current holdings for a wallet. |
polymarket_get_user_activity |
Recent on-chain activity for a wallet. |
polymarket_get_market_holders |
Top holders per outcome token for a market. |
polymarket_get_user_value |
Total portfolio value (USDC) for a wallet. |
polymarket_market_snapshot |
Recommended: live odds for one market in a single call. |
Every tool is annotated readOnlyHint=True, openWorldHint=True.
Key concepts
- Prices are probabilities. Outcome prices are floats in
[0, 1](e.g.0.41= 41%). Tools also surface a human-readableprobability_pct. token_idvsconditionId. CLOB pricing/book/history tools key on a CLOB token id (one per outcome, from a market'sclobTokenIds) — not a slug or conditionId. The Data API'scondition_ididentifies the market itself.- Freshness. Gamma discovery data can lag the live CLOB book by a few seconds. For the
freshest odds use
polymarket_get_live_price/polymarket_market_snapshot(CLOB midpoint).
Install
Requires uv (Python 3.11+).
Published to PyPI as mcp-polymarket:
# Run on demand (no install):
uvx mcp-polymarket
# Or install as a persistent tool:
uv tool install mcp-polymarket
Registration
No environment variables or API keys are required.
Claude Code (CLI)
claude mcp add polymarket -- uvx mcp-polymarket
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"polymarket": {
"command": "uvx",
"args": ["mcp-polymarket"]
}
}
}
Development
From a checkout of this repo:
uv sync # install deps
uv run mcp-polymarket # run the server (stdio)
uv run python tests/smoke_test.py # live smoke test (hits the public API)
Inspect the tool schemas and annotations:
npx @modelcontextprotocol/inspector uvx mcp-polymarket
Publishing
Releases are published to PyPI automatically via
Trusted Publishing — no API tokens are
stored. The workflow in .github/workflows/publish.yml runs uv build and uploads
the artifacts whenever a GitHub Release is published. To cut a release:
# bump `version` in pyproject.toml, commit, then:
gh release create v0.1.0 --generate-notes
Self-hosting over HTTP (optional)
In addition to the default stdio transport, the server can run over streamable-HTTP:
uv run polymarket-mcp --http --host 0.0.0.0 --port 8000
# served at http://<host>:<port>/mcp
Evaluation
evaluation.xml contains stable, verifiable, read-only questions exercising multi-tool
workflows (search → market → price history → live price, etc.).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_polymarket-0.1.0.tar.gz.
File metadata
- Download URL: mcp_polymarket-0.1.0.tar.gz
- Upload date:
- Size: 62.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c82870988118618c9197da7b74db3b90316a5c01aa4d28fbd85381c219e42ff2
|
|
| MD5 |
27d82e2cb17c668dc063d99db393c9e8
|
|
| BLAKE2b-256 |
79d1d81dbcda2474af4f54b819842403bead805b577757745d4cac0b2704c156
|
Provenance
The following attestation bundles were made for mcp_polymarket-0.1.0.tar.gz:
Publisher:
publish.yml on fzlzjerry/polymarket-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_polymarket-0.1.0.tar.gz -
Subject digest:
c82870988118618c9197da7b74db3b90316a5c01aa4d28fbd85381c219e42ff2 - Sigstore transparency entry: 1850684334
- Sigstore integration time:
-
Permalink:
fzlzjerry/polymarket-mcp@1a324bdea17e2a5a477e4edffc57565deea6e74f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/fzlzjerry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1a324bdea17e2a5a477e4edffc57565deea6e74f -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcp_polymarket-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_polymarket-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d63446d4be9c7396baf606dd4e8a56876d29330acc861e7f78f0685aae0d3a8
|
|
| MD5 |
e4b83430e54b89b43b5735b08ec66ac7
|
|
| BLAKE2b-256 |
665b1b6e8a6d0edbb6739dfc4b8aab8e0bab9ec448e6a7fb349ef55b85746470
|
Provenance
The following attestation bundles were made for mcp_polymarket-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on fzlzjerry/polymarket-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_polymarket-0.1.0-py3-none-any.whl -
Subject digest:
4d63446d4be9c7396baf606dd4e8a56876d29330acc861e7f78f0685aae0d3a8 - Sigstore transparency entry: 1850684675
- Sigstore integration time:
-
Permalink:
fzlzjerry/polymarket-mcp@1a324bdea17e2a5a477e4edffc57565deea6e74f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/fzlzjerry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1a324bdea17e2a5a477e4edffc57565deea6e74f -
Trigger Event:
release
-
Statement type: