Polymarket MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Polymarket MCP Serversearch for markets about the next US presidential election"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Polymarket MCP Server
An MCP (Model Context Protocol) server that exposes read-only tools for querying live Polymarket prediction-market data via the public Gamma API. Built with FastMCP.
No API key required — the Gamma API is public and unauthenticated.
Tools
All tools are read-only (readOnlyHint: true).
Tool | Params | Purpose |
|
| Free-text search across event titles, market questions, and descriptions. Primary discovery tool when the user names a topic but not an ID. |
|
| Browse open, unresolved events sorted by a field. Use for "what's hot / most liquid / expiring soon". |
|
| Full detail for one event and all of its nested markets. Use when the user cares about a whole topic (all candidates, all strike brackets). |
|
| Full detail for a single market, including order-book edges ( |
get_active_markets sort keys
| Meaning |
| Cumulative USD traded — "biggest overall" |
| USD currently in the order book — "where you can trade now" |
| Resolution deadline — "expiring soonest" |
| Listing date |
| Closest to 50/50 — "most contested" (best-effort) |
Known tag_slug values: politics, crypto, sports, elections, geopolitics. Omit for all categories.
Field coverage at a glance
Fields that require drilling down — search_markets returns less than the list/detail tools, and get_event returns less per-market than get_market:
Field |
|
|
|
|
| ❌ | ✅ | ✅ | ✅ |
| ❌ | ✅ (event-level) | ✅ (event-level) | ✅ |
| ❌ | ❌ | ✅ | ✅ |
| ❌ | ❌ | ❌ | ✅ |
Full market | ❌ | ❌ | ❌ | ✅ |
Related MCP server: PolyMarket MCP Server
Domain model & data conventions
The server sends these conventions to clients on connect as part of its instructions, but they're worth knowing upfront:
Event vs. market. An event is a topic that groups one or more related markets (e.g. event
Democratic Nominee 2028groups per-candidate markets). A market is a single binary question with a share price in[0, 1]that reflects the crowd-estimated probability.outcome_pricesandoutcomesare JSON-encoded strings, not lists. Parse withjson.loads, e.g.'["0.0135", "0.9865"]'→["0.0135", "0.9865"]. For binary markets, index 0 is YES, index 1 is NO, and values sum to ~1.0.outcome_pricesisnullfor untraded markets.Prices are probabilities, not dollars.
best_bid,best_ask,last_trade_price, and the parsed entries ofoutcome_pricesare all in[0, 1].USD units.
volume,volume_24hr,liquidityare USD (float, may benull).Dates.
end_dateis ISO 8601 UTC (e.g."2026-07-01T04:00:00Z") ornullwhen an event's sub-markets have staggered dates.
Dependencies
Package | Version | Purpose |
| MCP server framework | |
| HTTP client for the Polymarket Gamma API |
Installation
Requires Python 3.10+.
With uv (recommended)
git clone https://github.com/jiroamato/polymarket_mcp.git
cd polymarket_mcp
uv syncuv sync reads pyproject.toml and installs all dependencies into an isolated virtual environment automatically.
With pip
git clone https://github.com/jiroamato/polymarket_mcp.git
cd polymarket_mcp
pip install -e .Installing the package also registers a polymarket-mcp console script (see pyproject.toml) that you can use as the command in any MCP client config.
Usage
There are three ways to wire this server into an MCP client, in increasing order of "how much JSON you touch".
Option A — FastMCP CLI install (easiest)
FastMCP ships install commands that write the client config for you.
Claude Code:
fastmcp install claude-code src/polymarket_mcp/server.pyClaude Desktop:
fastmcp install claude-desktop src/polymarket_mcp/server.py --server-name "Polymarket"Useful flags: --python 3.11, --project /path/to/polymarket_mcp, --with httpx, --env KEY=VALUE, --env-file .env. See fastmcp install --help for the full list.
Option B — Direct Python
If you've already installed dependencies into a Python environment (via uv sync or pip install -e .), point the client directly at that interpreter.
Claude Code — add to your .claude.json:
{
"mcpServers": {
"polymarket": {
"command": "/path/to/python",
"args": [
"/absolute/path/to/polymarket_mcp/src/polymarket_mcp/server.py"
],
"env": {
"PYTHONUNBUFFERED": "1"
}
}
}
}Claude Desktop — add to claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"polymarket": {
"command": "/path/to/python",
"args": [
"/absolute/path/to/polymarket_mcp/src/polymarket_mcp/server.py"
],
"env": {
"PYTHONUNBUFFERED": "1"
}
}
}
}Replace /path/to/python with the full path to your interpreter (e.g., C:/Users/you/miniforge3/python.exe, /Users/you/.venv/bin/python).
If you ran pip install -e ., you can instead use the installed console script:
{
"mcpServers": {
"polymarket": {
"command": "/path/to/polymarket-mcp"
}
}
}Standalone:
python src/polymarket_mcp/server.py
# or, after `pip install -e .`:
polymarket-mcpOption C — uv run (no pre-installed deps)
uv handles dependency isolation automatically — no need to install fastmcp or httpx yourself.
Claude Code:
claude mcp add polymarket -- uv run --with fastmcp --with httpx fastmcp run src/polymarket_mcp/server.pyOr add to your .claude.json:
{
"mcpServers": {
"polymarket": {
"command": "uv",
"args": [
"run",
"--with", "fastmcp",
"--with", "httpx",
"fastmcp",
"run",
"/absolute/path/to/polymarket_mcp/src/polymarket_mcp/server.py"
]
}
}
}Claude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"polymarket": {
"command": "uv",
"args": [
"run",
"--with", "fastmcp",
"--with", "httpx",
"fastmcp",
"run",
"/absolute/path/to/polymarket_mcp/src/polymarket_mcp/server.py"
]
}
}
}Standalone:
uv run fastmcp run src/polymarket_mcp/server.pyExample prompts
Once connected, try asking your AI assistant:
"What are the top prediction markets on Polymarket right now?"
"Search Polymarket for markets about AI."
"Show me the most liquid crypto prediction markets."
"Which politics markets on Polymarket are expiring soonest?"
"Get details on Polymarket event 903 and summarize the candidates."
"For Polymarket market 573655, what's the current spread and 1-day price change?"
Development
# Install dependencies
uv sync
# Run the server locally
uv run fastmcp run src/polymarket_mcp/server.py
# Inspect tools interactively with the MCP Inspector (browser UI)
uv run fastmcp dev inspector src/polymarket_mcp/server.pyThe server itself lives in a single file: src/polymarket_mcp/server.py. Each tool is a plain function decorated with @mcp.tool(annotations={"readOnlyHint": True}); FastMCP generates the JSON schema from the type hints and docstring automatically.
Available Tools
4 toolsget_active_marketsARead-only
Browse active (open, unresolved) events sorted by a field.
Use this for discovery when the user asks "what's hot / most liquid /
expiring soon" without naming a topic. For keyword search, use
search_markets.
limit: Events to return (default 10, max ~100).
offset: Pagination offset (default 0). Page by incrementing
offsetbylimit.order: Sort field. Supported values:
"volume" — cumulative USD traded (default; "biggest overall")
"liquidity" — USD in the order book now ("where you can trade")
"end_date" — resolution deadline ("expiring soonest")
"start_date" — listing date
"competitive" — closest to 50/50 ("most contested"; best-effort semantics)
ascending: False (default) returns largest/latest first.
tag_slug: Category filter. Known slugs include "politics", "crypto", "sports", "elections", "geopolitics". Omit for all categories.
volume_min: Minimum cumulative USD volume. Useful to exclude long-tail markets with near-zero activity.
Returns a list of event dicts with nested markets. Each event has id,
end_date, volume, volume_24hr, liquidity, and markets[]. Each
nested market has id, outcomes, outcome_prices, best_bid,
best_ask, last_trade_price.
Does NOT include event-level active / closed / category, or
market-level closed / liquidity / one_day_price_change. Call
get_market for those.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| order | No | volume | |
| offset | No | ||
| tag_slug | No | ||
| ascending | No | ||
| volume_min | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond readOnlyHint annotation, the description details return format (event dicts with nested markets), lists included and excluded fields, and clarifies no mutation occurs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with clear sections, bullet points, and minimal redundancy. Every sentence adds value; it's appropriately detailed without being verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 6 parameters and output schema existence, the description provides complete context: input usage, return structure, and explicit list of excluded fields. No gaps remain.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Despite 0% schema coverage, description fully explains each of 6 parameters: limit/max, offset pagination, supported order values with definitions, ascending behavior, tag_slug examples, and volume_min usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool browses active (open, unresolved) events sorted by field, distinguishes from search_markets for keyword search, and lists supported sort orders and their meanings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use for discovery queries like 'what's hot' without a topic, and directs to search_markets for keyword search. Also explains pagination and ordering semantics.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_eventARead-only
Get one event with all of its nested markets.
Use when the user cares about a whole topic (all candidates, all strike
brackets, etc.). For one specific sub-question, use get_market.
event_id: Numeric string ID (e.g. "36173"). Obtain from
search_marketsorget_active_markets(returned asid).
Returns the event dict with its full markets[]. Notable fields:
volume,volume_24hr,liquidity: USD floats (may be null).active,closed: state flags;closed= all sub-markets resolved.end_date: ISO 8601 UTC; null when sub-markets have staggered dates.markets[].outcome_prices: JSON-encoded probability list; null if untraded.markets[].best_bid,best_ask,last_trade_price: probabilities in [0, 1].markets[].one_day_price_change: 24h absolute change in probability (float).markets[].closed: true once that individual market has resolved.
Does NOT include per-market spread, one_week_price_change, or full
market description / slug. Use get_market for those.
| Name | Required | Description | Default |
|---|---|---|---|
| event_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond readOnlyHint, the description details what is returned (markets[] with specific fields) and what is NOT included, providing full transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with bullet points for notable fields and limitations; slightly long but each part adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists, the description covers parameter, usage, and key output fields, making it fully complete for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Despite 0% schema coverage, the description fully explains event_id: type (numeric string), example, and retrieval source, adding essential meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves one event with all nested markets, and contrasts it with get_market for sub-questions, distinguishing it from siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly tells when to use this tool vs get_market, and explains how to obtain event_id from search_markets or get_active_markets.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_marketARead-only
Get full details for one market, including order-book edges and momentum.
Use when the user cares about a single specific question (one candidate's
odds, one strike price). For the whole topic, use get_event.
market_id: Numeric string ID (e.g. "573655"). Obtain from
search_markets,get_event, orget_active_markets(returned asidormarkets[].id).
Returns a single market dict. Notable fields:
question: the prediction question itself.description: full resolution rules (can be long — tells you how the market settles).outcome_prices,outcomes: JSON-encoded string lists (see server instructions).best_bid,best_ask: order-book edges as probabilities in [0, 1].spread:best_ask-best_bid(narrower = more liquid).last_trade_price: most recent fill price (probability).one_day_price_change,one_week_price_change: absolute change in probability.volume,volume_24hr,liquidity: USD floats.end_date: ISO 8601 UTC resolution deadline.active,closed: tradeability + resolution state.
| Name | Required | Description | Default |
|---|---|---|---|
| market_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Despite readOnlyHint annotation, description provides extensive behavioral context: lists return type (dict), notable fields including order-book edges, momentum, liquidity, and status flags. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Compact and well-structured: purpose first, then usage guidelines, parameter explanation, and return field list. Every sentence adds value with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Complete for a single-market retrieval tool: explains how to call it, what it returns (including key fields and their meanings), and how the output is structured. Output schema exists but description adds necessary context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Only parameter market_id is fully described: type (numeric string), example ('573655'), and origin (from search_markets, get_event, get_active_markets). Schema has 0% description coverage, so description entirely compensates.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states 'Get full details for one market' with specific verb and resource. Differentiates from sibling get_event by specifying 'single specific question' versus 'whole topic'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says when to use ('single specific question') and when not to ('For the whole topic, use get_event'), and tells how to obtain market_id from sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_marketsARead-only
Search events and markets by free-text keyword.
Use this as the primary discovery tool when the user names a topic but not an event/market ID. Matches against event titles, market questions, and descriptions.
query: Free-text query. Short topical terms work best ("bitcoin", "ukraine", "nba mvp"). Not fuzzy — overly-specific queries may return nothing.
limit: Max results per result type (default 10, typical useful 5-20).
Returns a list of event dicts with nested markets. Key fields:
id: event ID forget_event.markets[].id: market ID forget_market.markets[].outcome_prices: JSON-encoded probability list (see server instructions); can be null for untraded markets.
Does NOT include best_bid / best_ask / last_trade_price /
volume_24hr / spread. Call get_event or get_market on a result
id for order-book data.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the readOnlyHint annotation, the description discloses that the search is not fuzzy and overly-specific queries may return nothing, and specifies which fields are not included (best_bid, best_ask, etc.), adding valuable behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with bullet points and front-loaded purpose, but could be slightly more concise; each sentence earns its place, though some detail could be streamlined.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has two parameters and an output schema exists (though not shown), the description provides a complete picture of return format including key fields and what is excluded, making it fully actionable for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description fully compensates by explaining that query is free-text with short topical terms, not fuzzy, and that limit is per result type with default 10 and typical range 5-20, adding meaning beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Search' and resource 'events and markets', and distinguishes from siblings by noting it is the primary discovery tool when no event/market ID is provided, and that it excludes order-book data which requires get_event/get_market.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Use this as the primary discovery tool when the user names a topic but not an event/market ID' and advises calling get_event or get_market for order-book data, providing clear when-to-use and when-not-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v0.1.0- First observed
get_active_markets - First observed
get_event - First observed
get_market - First observed
search_markets
TDQS
Scored across 4 tools
Each tool targets a distinct purpose: browsing active markets, retrieving a full event, getting detailed market info, and searching by keyword. No functional overlap exists.
All tool names follow a consistent verb_noun snake_case pattern: get_active_markets, get_event, get_market, search_markets. The verbs are fitting and predictable.
With 4 tools, the scope is appropriately focused on data retrieval for prediction markets. It's slightly lean but covers the core use cases without being overwhelming.
The tool set covers essential discovery and detail retrieval for events and markets. Minor gaps exist (e.g., no history or category listing), but the core workflow is well-supported.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Polymarket MCP — prediction-market data via Gamma + CLOB public APIs.
Live prediction markets: Polymarket + Kalshi prices, odds, order books. Pay-per-call USDC, no key.
Live prediction-market odds, volume and movers across 8 platforms. Read-only, no auth.
Live Polymarket data for agents: markets, insider-scored whale trades, leaderboards, wallet P&L
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables access to Polymarket's prediction markets for analyzing market probabilities, trading activity, and event outcomes across politics, sports, crypto, and other categories through natural language queries.1710MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLM agents to search, navigate, and filter PolyMarket prediction market events with smart tools for data exploration. Features in-memory caching and background updates for instant queries across markets, liquidity, and analytics.-
- AlicenseBqualityDmaintenanceEnables comprehensive read access to Polymarket prediction market data, including live prices, order books, and market statistics. It allows AI assistants to analyze events, search markets, and monitor real-time signals without requiring API keys or authentication.221MIT
- AlicenseNot gradedqualityCmaintenanceProvides access to Polymarket prediction-market data via Gamma and CLOB public APIs, enabling AI agents to query market information.15MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jiroamato/polymarket_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server