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 ServerWhat are the trending prediction markets by volume right now?"
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.
Why?
Prediction markets are the best real-time signal for what the world thinks will happen next. This server puts that signal directly into your AI assistant's toolkit — no API keys, no auth tokens, no setup hassle.
22 tools • 5 resources • 4 prompts • Zero config • Zero dependencies beyond the MCP SDK
Quick Start
Option 1: Claude Desktop
Add to your claude_desktop_config.json (Settings > Developer > Edit Config):
{
"mcpServers": {
"polymarket": {
"command": "npx",
"args": ["-y", "@yigit/polymarket-mcp"]
}
}
}Restart Claude Desktop. Done.
Option 2: Claude Code
claude mcp add polymarket -- npx -y @yigit/polymarket-mcpOption 3: Build from source
git clone https://github.com/yigitabi5444/yigit_polymarket_mcp.git
cd yigit_polymarket_mcp
npm install && npm run build
node dist/index.js # runs over stdioThen point your MCP client at the built binary:
{
"mcpServers": {
"polymarket": {
"command": "node",
"args": ["/absolute/path/to/yigit_polymarket_mcp/dist/index.js"]
}
}
}What Can It Do?
Gamma API — Events & Markets
Tool | What it does |
| List/filter events — paginate, sort by volume/liquidity, filter by tag/status |
| Single event by ID or slug |
| List/filter markets with rich filtering (volume, liquidity, dates, tags) |
| Single market by ID or slug |
| Full-text search across events, markets, and profiles |
| List all category tags |
| List event series (grouped collections) |
| Get a specific series by ID |
| List available sports |
| List teams for a sport |
CLOB API — Prices & Order Books
Tool | What it does |
| Current price for a token (buy/sell side) |
| Midpoint price (best bid + best ask / 2) |
| Last executed trade price |
| Full bid/ask depth for a token |
| Batch order books for multiple tokens |
| Best bid, best ask, and spread at a glance |
| CLOB market details by condition ID |
| Markets eligible for liquidity rewards |
| Simplified sampled markets |
| Minimum price increment for a token |
Data API — Trades & Holders
Tool | What it does |
| Recent trades for a market |
| Top holders / position breakdown for a market |
Resources (URI-based access)
URI Pattern | Description |
| Market JSON by slug |
| Event JSON by slug |
| CLOB market by condition ID |
| Live order book for a token |
| All category tags (cached) |
Prompts (guided workflows)
Prompt | Description |
| Deep-dive: probability, liquidity, order book depth, top holders |
| Side-by-side comparison of multiple markets |
| Find the hottest markets by volume right now |
| Overview of sports prediction markets |
Architecture
┌─────────────────────────────┐
│ MCP Client │
│ (Claude Desktop / Code) │
└─────────┬───────────────────┘
│ stdio (JSON-RPC)
┌─────────▼───────────────────┐
│ polymarket-mcp │
│ │
│ ┌──────────┐ ┌──────────┐ │
│ │ Tools │ │Resources │ │
│ │ (22) │ │ (5) │ │
│ └────┬─────┘ └────┬─────┘ │
│ │ │ │
│ ┌────▼─────────────▼─────┐ │
│ │ API Client │ │
│ │ ┌───────┐ ┌────────┐ │ │
│ │ │ Rate │ │ Cache │ │ │
│ │ │Limiter│ │ (TTL) │ │ │
│ │ └───┬───┘ └───┬────┘ │ │
│ │ │ │ │ │
│ │ ┌───▼─────────▼────┐ │ │
│ │ │ Retry + Backoff │ │ │
│ │ └──────────────────┘ │ │
│ └────────────────────────┘ │
└──────────┬───────────────────┘
│ HTTPS
┌──────────▼───────────────────┐
│ Polymarket APIs │
│ gamma-api · clob · data-api │
└──────────────────────────────┘Production Hardening
Feature | Implementation |
Rate limiting | Token-bucket per API endpoint (Gamma: 4k/10s, CLOB: 9k/10s, Data: 1k/10s) |
Caching | In-memory TTL cache (order books: 5s, markets: 30s, tags: 5min) |
Retries | Exponential backoff with jitter on 429s and 5xx errors (3 retries max) |
Timeouts | 15s request timeout on all API calls |
No auth | Only hits public endpoints — zero secrets to manage |
No deps | Uses native |
Type safety | Full TypeScript with strict mode, Zod validation on all inputs |
Configuration
Environment Variable | Default | Description |
|
| Set to |
That's it. No API keys, no tokens, no config files. It just works.
Development
npm install # install dependencies
npm run build # compile TypeScript
npm run dev # run with tsx (auto-reload)
npm test # run test suite
npm run test:watch # tests in watch modeProject Structure
src/
├── index.ts # stdio entrypoint
├── server.ts # MCP server factory
├── config.ts # rate limits, cache TTLs, timeouts
├── api/
│ ├── client.ts # HTTP client with retry + rate limiting
│ ├── cache.ts # TTL cache implementation
│ ├── rate-limiter.ts # token-bucket rate limiter
│ ├── gamma.ts # Gamma API wrapper
│ ├── clob.ts # CLOB API wrapper
│ └── data.ts # Data API wrapper
├── tools/
│ ├── gamma/ # 6 Gamma tools
│ ├── clob/ # 4 CLOB tools
│ └── data/ # 2 Data tools
├── resources/ # 5 URI-based resources
├── prompts/ # 4 guided analysis prompts
└── types/ # TypeScript type definitionsExample Conversations
You: What are the hottest prediction markets right now?
Claude: uses
get_marketssorted by volume, thenget_order_bookfor depth analysis
You: What's the current probability that Bitcoin hits $200k this year?
Claude: uses
search("bitcoin 200k"), thenget_pricefor live odds
You: Compare the presidential election markets
Claude: uses the
compare_marketsprompt with relevant slugs
You: Show me the order book for the top sports market
Claude: uses
get_sports→get_markets→get_order_book
Contributing
PRs welcome! Please:
Fork the repo
Create a feature branch (
git checkout -b feature/awesome)Add tests for new functionality
Make sure
npm testpassesSubmit a PR
License
MIT — do whatever you want with it.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.