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 ServerPlace a buy order for 100 shares of "Will ETH hit $5k by June?" at $0.45"
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
⚠️ Notice: Quantish is winding down. The Quantish platform (quantish.live) is shutting down. This MCP server is self-hosted and will continue to work independently, but the Quantish team will no longer be maintaining or updating this project. If you're building in the prediction market space and need real-time data infrastructure, check out polynode.dev.
Self-hosted MCP server for trading on Polymarket prediction markets.
Overview
This package provides an MCP (Model Context Protocol) server that enables AI agents to trade on Polymarket prediction markets via the Polygon network.
Related MCP server: polymarket-mcp
Features
Full Polymarket Trading - Buy/sell on any Polymarket market
Polygon Wallet Management - Generate and manage wallets with Safe integration
Gasless Transactions - Most operations use Polymarket's relayer (no MATIC needed)
MCP Compatible - Works with Claude, Cursor, and any MCP client
Self-Hostable - Run on Railway, Fly.io, or any Node.js host
Quick Start
git clone https://github.com/joinQuantish/polymarket-mcp
cd polymarket-mcp
npm installEnvironment Variables
Variable | Required | Description |
| Yes | PostgreSQL connection string |
| Yes | 32-byte hex string for wallet encryption |
| Yes | Polygon RPC endpoint |
| No | Secret for trusted bot HMAC authentication |
| No | Server port (defaults to 3000) |
Generate Encryption Keys
# Generate ENCRYPTION_KEY (32 bytes = 64 hex chars)
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# Generate BOT_SIGNING_SECRET (for trusted bot auth)
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"Database Setup
Any PostgreSQL database works. Options:
Provider | Notes |
Railway | Add PostgreSQL service, copy |
Supabase | Free tier at supabase.com, copy connection string from Settings > Database |
Neon | Serverless Postgres at neon.tech, free tier available |
Local Docker |
|
Set your DATABASE_URL then run:
# Generate Prisma client
npm run db:generate
# Create tables
npm run db:pushRunning the Server
# Development
npm run dev
# Production
npm run build
npm startAvailable Tools
Account & Wallet
Tool | Description |
| Create account with new wallet (or recover existing) |
| Deploy Safe wallet and set approvals |
| Check wallet deployment and approval status |
| Get USDC/MATIC balances |
| Get addresses for depositing (EVM, Solana, BTC) |
| Export wallet private key |
| Import existing wallet |
Trading
Tool | Description |
| Place buy/sell order |
| Cancel an open order |
| Cancel all open orders |
| Get order history |
| Execute multiple orders atomically |
| Get market bids/asks |
| Get market midpoint price |
Positions
Tool | Description |
| Get your positions |
| Sync positions from Polymarket API |
| Check redeemable winnings |
| Claim resolved market winnings |
| Get all ERC-1155 holdings (including gifted) |
Transfers & Swaps
Tool | Description |
| Send bridged USDC |
| Send Circle native USDC |
| Send ERC-1155 shares |
| Send MATIC from EOA |
| Swap tokens via LI.FI |
| Get swap quote |
API Keys
Tool | Description |
| List your API keys |
| Create new API key |
| Revoke an API key |
Note: Market search tools (
search_markets,get_market,get_active_markets) are available via the Discovery MCP.
API Format
The server exposes a JSON-RPC 2.0 endpoint at /mcp:
curl -X POST https://your-server.com/mcp \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "get_balances",
"arguments": {}
},
"id": 1
}'MCP Client Configuration
Claude Desktop / Cursor
{
"mcpServers": {
"polymarket": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://your-server.com/mcp",
"--header",
"x-api-key: YOUR_API_KEY"
]
}
}
}Security
Returning Users
For security, returning users (existing externalId) cannot get new API keys without authentication. Options:
Use existing API key - If you have it saved
HMAC Authentication (trusted bots only) - Sign with
BOT_SIGNING_SECRET:signature = HMAC-SHA256(externalId:timestamp, BOT_SIGNING_SECRET)New Account - Use a different
externalId
Development
# Install dependencies
npm install
# Generate Prisma client
npm run db:generate
# Run migrations
npm run db:push
# Start development server
npm run devResources
GitHub: joinQuantish/polymarket-mcp
Discovery MCP: joinQuantish/quantish-discovery
Polymarket Docs: docs.polymarket.com
License
This project is licensed under the PolyForm Noncommercial License 1.0.0.
Free for personal use, research, and non-commercial purposes. Commercial use requires explicit permission from Quantish Inc. Contact hello@quantish.live for commercial licensing.
Built by Quantish Inc.
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.
Related MCP Servers
- Alicense-qualityCmaintenanceAn MCP server that gives AI agents direct access to Polymarket Crypto prediction markets, enriched with live spot prices. Discover markets, analyze order books, paper trade strategies, track activity, and execute live trades — all through natural language.1AGPL 3.0
- Alicense-qualityBmaintenanceAn MCP server and Python toolkit that provides AI agents with real-time tools for Polymarket prediction markets, including liquidity scanning, arbitrage detection, and slippage estimation. It also offers advanced wallet intelligence, portfolio risk calculation, and probabilistic reasoning to enhance market analysis and strategy.1MIT
- AlicenseCqualityBmaintenanceMCP server that provides a unified prediction market API for multiple venues like Polymarket and Kalshi, allowing AI agents to discover markets, fetch order books, and execute trades through a single interface.324388MIT
- Alicense-qualityCmaintenanceAgent-native, self-hosted MCP server for crypto trading and DeFi management. Enables agents to query balances, execute trades, and manage positions with a policy engine and secure key storage.7Apache 2.0
Related MCP Connectors
No-KYC managed MCP for AI agents: sandboxed TypeScript trading SDK, isolated sub-accounts, futures.
HiveCapital MCP Server — autonomous investment layer for AI agents
Polymarket + Hyperliquid + macro for AI agents. 38 tools, signal backtest, SSE streaming. Free tier.
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/joinQuantish/polymarket-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server