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 Servershow me the top prediction markets by volume"
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 gives LLM agents full access to Polymarket โ the world's largest prediction market. Discover markets, analyze trends, monitor positions, and execute trades.
34 tools ยท 4 APIs ยท Read + Write ยท Safety Guards Built-in
Features
Category | Tools | Auth Required |
๐ Market Discovery |
| โ |
๐ Real-Time Pricing |
| โ |
๐ Analytics |
| โ |
๐ฆ Account |
| Wallet address |
๐ฐ Trading |
| Private key |
โ๏ธ Market Metadata |
| โ |
Related MCP server: Polymarket MCP Server
Quick Start
Prerequisites
Python 3.12+
uv (recommended) or pip
Installation
git clone https://github.com/Arjein/polymarket-mcp.git
cd polymarket-mcp
uv syncConfiguration
cp .env.example .envFor read-only tools (market data, analytics): no configuration needed.
For trading tools: add your credentials to .env:
POLYMARKET_PRIVATE_KEY=0xYourPrivateKey
POLYMARKET_WALLET_ADDRESS=0xYourWalletAddress
POLYMARKET_DRY_RUN=true # Start with dry-run!
POLYMARKET_MAX_ORDER_SIZE=100 # Safety limit in USDConnect to Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"polymarket": {
"command": "uv",
"args": ["--directory", "/path/to/polymarket-mcp", "run", "server.py"]
}
}
}Run Standalone
uv run server.pyArchitecture
polymarket-mcp/
โโโ server.py # MCP server entrypoint
โโโ clients/
โ โโโ clob.py # CLOB API (public reads + price history)
โ โโโ gamma.py # Gamma API (market/event discovery)
โ โโโ data.py # Data API (positions, trades, open interest)
โ โโโ auth_clob.py # Authenticated CLOB (orders, balances)
โโโ tools/
โ โโโ clob_tools.py # 18 read-only CLOB tools
โ โโโ gamma_tools.py # 4 market discovery tools
โ โโโ data_tools.py # 5 analytics & account tools
โ โโโ trading_tools.py # 7 authenticated trading tools
โโโ .env.example # Configuration template
โโโ pyproject.toml # Dependencies & metadataAPI Coverage
API | Base URL | Purpose |
CLOB |
| Order books, prices, spreads, market data |
Gamma |
| Market/event discovery, metadata, search |
Data |
| Positions, trades, activity, open interest |
CLOB Auth |
| Order placement/cancellation, balances |
Development
npx -y @modelcontextprotocol/inspector uv run polymarket-mcpSafety Guards
The trading tools include built-in safety mechanisms:
Dry-run mode (
POLYMARKET_DRY_RUN=true): Orders are simulated and returned as JSON without executing. Enabled by default.Max order size (
POLYMARKET_MAX_ORDER_SIZE): Orders exceeding this USD value are rejected. Default: $100.Lazy authentication: The server starts without credentials โ read-only tools work immediately. Auth is only initialized when a trading tool is first called.
Tool Reference
Tool | Description |
| Search events by query, tag, active/closed status |
| Get event details including all child markets |
| Search markets with filters (volume, tag, status) |
| Get full market metadata by ID or slug |
Tool | Description |
| Best bid/ask price for a token |
| Mid-market price (single / batch) |
| Bid-ask spread (single / batch) |
| Full order book depth (single / batch) |
| Last executed price (single / batch) |
Tool | Description |
| Historical time-series with configurable interval and fidelity |
| Total shares outstanding for a market |
Tool | Description |
| Current holdings with P&L breakdown |
| Historical executed trades |
| Full audit trail (trades, splits, merges, rewards) |
Tool | Description |
| Place a limit order (BUY/SELL, GTC/FOK/GTD/FAK) |
| Cancel a specific order |
| Cancel multiple orders |
| Emergency kill switch โ cancel everything |
| List all pending orders |
| Get order status and details |
| Check USDC balance and approvals |
Tool | Description |
| API health check |
| Server timestamp |
| Browse CLOB market listings |
| Market trading parameters |
| Live trade feed for a market |
Example Usage
Once connected to Claude Desktop, you can ask:
"What are the hottest markets on Polymarket right now?"
"Show me the Bitcoin price history over the last week"
"What's the order book depth for the Fed rate decision market?"
"Place a dry-run buy order for 100 YES shares at $0.35 on the Super Bowl market"
โ ๏ธ Disclaimer
This software is provided for educational and informational purposes only. It is not financial advice.
Trading prediction markets involves risk. You may lose some or all of your funds.
The authors are not responsible for any financial losses incurred through the use of this software.
You are solely responsible for your own trading decisions and for complying with all applicable laws and regulations in your jurisdiction.
By using this software, you acknowledge and accept these risks.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/Arjein/polymarket-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server