
Polymarket Agent Mcp
io.github.demwickPublished by GitHub account demwickv1.7.0Updated Oct 24, 2026
Polymarket trading, market discovery, copy trading and backtesting — 48 MCP tools.
Overview
A local MCP server that lets an assistant discover, analyze and trade Polymarket prediction markets, including copy trading, backtesting and portfolio risk.
- What you can do
- Search, browse and compare markets, events and top traders, including trending, featured and smart-money flow signals, with live prices and price history. Score markets and traders, check liquidity and holders, and get buy/sell/hold recommendations. Place, batch, limit and cancel orders, and switch from preview to live mode. Watch traders, run an automatic copy-trading monitor, rebalance the watchlist and backtest a trader's past trades. Review positions, balance, P&L, risk and optimization, set stop-loss and take-profit rules, and scan for arbitrage. Manage configuration, safety limits, trade history, watchlists and a dashboard.
- When to use it
- Useful when you want an assistant to research prediction markets, evaluate traders, simulate copy-trading strategies, or place real Polymarket orders from a local client. Preview mode makes it safe to explore without spending money.
- Requirements
- Runs locally over stdio, typically via npx or a global npm install (Node.js), or as a Docker image. Live trading needs COPY_MODE=live plus the Polymarket CLOB credentials POLY_API_KEY, POLY_API_PASSPHRASE and POLY_API_SECRET, the wallet key POLY_PRIVATE_KEY and POLY_FUNDER_ADDRESS. Outbound access to Polymarket APIs and a public price WebSocket; a local SQLite database file.
Installation
In SourceWeft
- Open Polymarket Agent Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Polymarket Agent MCP Server
[polymarket-agent-mcp MCP server]
[npm version] [CI] [GitHub last commit] [License: MIT] [Node.js] [TypeScript] [MCP SDK] [Tools] [Tests] [SafeSkill 97/100] [Socket Badge] [OpenSSF Scorecard] [OpenSSF Best Practices]
Trade, analyze, and automate Polymarket prediction markets through AI.
The most comprehensive MCP server for Polymarket — 48 tools spanning direct trading, market discovery, smart money tracking, copy trading, backtesting, risk management, and portfolio optimization. Works with Claude Code, Cursor, or any MCP-compatible client.
Tool Overview
Quick Start
npm Install
Docker
Claude Code Config
Add to ~/.claude/settings.json:
Usage Examples
Just talk naturally to your AI assistant:
"What are the trending markets today?"
"Search for bitcoin prediction markets"
"Buy $5 on this market"
"Score this trader — should I copy them?"
"Backtest this trader with $10 per trade"
"Show smart money flow — what are the top traders buying?"
"Set stop-loss at 0.30 on my BTC position"
"Optimize my portfolio with a balanced strategy"
"Scan for arbitrage opportunities"
"Compare these two markets side by side"
All 48 Tools
Discovery
Analysis
Trading
Copy Trading
Portfolio & Risk
Configuration
Architecture
HTTP Transport & Deployment
The server supports two transport modes:
Deployment model — read this first
This server is designed for single-tenant use. Each client runs its own instance with its own SQLite database (copytrader.db), watchlist, daily budget, trade history, and monitor loop. The stdio mode is the recommended path for most users — npx polymarket-agent-mcp or the Claude Code config above gives you a fully isolated, local-only instance.
⚠️ Do not expose an HTTP instance publicly. The server has no per-user isolation: watchlist, positions, budget, and the background monitor loop are shared across every client that connects. A public HTTP deployment is effectively a shared workspace, not a multi-tenant SaaS. If you enable live trading, a public endpoint can drain your Polymarket wallet from any caller. Always configure the HTTP bearer-token env var (see PERMISSIONS.md) and keep the endpoint behind a firewall, VPN, or auth proxy.
Starting in HTTP mode
Endpoints
Authentication
The HTTP transport accepts an optional bearer token gated by an environment variable — the exact name is documented in PERMISSIONS.md. When set, clients must send Authorization: Bearer <token> on requests to /mcp; when unset the endpoint is open (suitable only for local or private networks).
Docker deployment
A prebuilt multi-arch image is published to GHCR on every release:
Or build it yourself from the included Dockerfile:
DB_PATH (default /app/data/copytrader.db) controls where SQLite data is persisted — mount a volume to keep it across restarts.
Configuration
All secrets stay in memory for the lifetime of the process — they are never written to the database, logs, or disk, and are only transmitted to their designated Polymarket API endpoint over HTTPS. The complete authoritative env var list, with per-variable sensitivity and scope, lives in PERMISSIONS.md and SECURITY.md.
Safety Features
- Configurable order size limits
- Total exposure caps
- Per-market position limits
- Minimum liquidity requirements
- Maximum spread tolerance
- Stop-loss / take-profit automation
- Preview mode (default) — no real money
Permissions & Capabilities
This package has a transparent, minimal footprint. Full disclosure: PERMISSIONS.md — machine-readable version in .well-known/mcp/server-card.json.
WebSocket scope: The WSS connection to Polymarket is inbound-only for public price updates. No wallet, credential, or user identity is transmitted — it carries the same public feed available to any browser client.
Secrets scope: Every secret environment variable is held in memory only, never logged, never persisted, and sent to exactly one host (see SECURITY.md).
Development
License
MIT - see LICENSE
Source: README.md at commit ebe901c
Tools
0Version history
1- v1.7.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts