接入你的智能体
發布者自己的指令。不是 PlugMCP 端點。
用我們的金鑰與日誌託管一份副本。
npx -y [email protected]Claude Code 沒有本機指令的安裝連結。複製下方指令並在終端機中執行。
COPY_MODE=<value> POLY_PRIVATE_KEY=<secret> POLY_API_KEY=<secret> POLY_API_SECRET=<secret> POLY_API_PASSPHRASE=<secret> POLY_FUNDER_ADDRESS=<value> DAILY_BUDGET=<value> MIN_CONVICTION=<value> CHAIN_ID=<value> DB_PATH=<value> claude mcp add demwick-polymarket-agent-mcp -- npx -y polymarket-agent-mcp@1.7.0在終端機中執行。
{ "mcpServers": { "demwick-polymarket-agent-mcp": { "command": "npx", "args": [ "-y", "[email protected]" ], "env": { "COPY_MODE": "<value>", "POLY_PRIVATE_KEY": "<secret>", "POLY_API_KEY": "<secret>", "POLY_API_SECRET": "<secret>", "POLY_API_PASSPHRASE": "<secret>", "POLY_FUNDER_ADDRESS": "<value>", "DAILY_BUDGET": "<value>", "MIN_CONVICTION": "<value>", "CHAIN_ID": "<value>", "DB_PATH": "<value>" } } }}claude_desktop_config.json
遠端 URL 還是本機指令? 兩種安裝方式的差異
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.
npm install -g polymarket-agent-mcp
docker compose up
Add to ~/.claude/settings.json:
{
"mcpServers": {
"polymarket": {
"command": "npx",
"args": ["polymarket-agent-mcp"]
}
}
}
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"
Claude Code / Cursor / AI Client
|
| MCP Protocol (stdio)
v
+------------------+
| MCP Server | 48 tools registered
| (index.ts) |
+--------+---------+
|
+----+----+
| |
Tools Services
| |
v v
+-------+ +------------+
| Zod | | Backtester |
| Input | | Scorer |
| Valid. | | SmartFlow |
+-------+ | Filter |
| Tracker |
| Executor |
+-----+------+
|
+-------+-------+
| | |
Data Gamma CLOB
API API API
The server supports two transport modes:
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.
# Flag
node dist/index.js --http
# Or set PORT (defaults to 3000)
PORT=8080 node dist/index.js
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).
A prebuilt multi-arch image is published to GHCR on every release:
docker pull ghcr.io/demwick/polymarket-agent-mcp:1.7.0
Or build it yourself from the included Dockerfile:
docker build -t polymarket-mcp .
docker run -p 3000:3000 -v mcp-data:/app/data \
-e DAILY_BUDGET=50 \
polymarket-mcp
# To require bearer-token auth on /mcp, also pass the HTTP bearer env var
# listed in PERMISSIONS.md (e.g. `-e <VAR>=my-secret-key`).
DB_PATH (default /app/data/copytrader.db) controls where SQLite data is persisted — mount a volume to keep it across restarts.
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.
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).
git clone https://github.com/demwick/polymarket-agent-mcp.git
cd polymarket-agent-mcp
npm install
npm run build
npm test # 200+ tests
MIT - see LICENSE
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. Wor
{ "mcpServers": { "demwick-polymarket-agent-mcp": { "command": "npx", "args": [ "-y", "[email protected]" ], "env": { "COPY_MODE": "<value>", "POLY_PRIVATE_KEY": "<secret>", "POLY_API_KEY": "<secret>", "POLY_API_SECRET": "<secret>", "POLY_API_PASSPHRASE": "<secret>", "POLY_FUNDER_ADDRESS": "<value>", "DAILY_BUDGET": "<value>", "MIN_CONVICTION": "<value>", "CHAIN_ID": "<value>", "DB_PATH": "<value>" } } }}總覽
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.
工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
發布者列出了以下環境變數:COPY_MODE, POLY_PRIVATE_KEY, POLY_API_KEY, POLY_API_SECRET, POLY_API_PASSPHRASE, POLY_FUNDER_ADDRESS, DAILY_BUDGET, MIN_CONVICTION, CHAIN_ID, DB_PATH。
Polymarket Agent 透過 stdio 在本機執行。
上次檢查時間:2026-10-28。 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.