Potencia tu agente
El comando propio del publicador. No es un endpoint de PlugMCP.
Host a copy with our keys and logs.
uvx polymarket-paper-trader==0.4.13Claude Code no tiene enlace de instalación para un comando local. Copia el comando de abajo y ejecútalo en una terminal.
claude mcp add io.github.agent-next-polymarket-paper-trader -- uvx polymarket-paper-trader==0.4.13Ejecútalo en una terminal.
{ "mcpServers": { "io.github.agent-next-polymarket-paper-trader": { "command": "uvx", "args": [ "polymarket-paper-trader==0.4.13" ] } }}claude_desktop_config.json
¿URL remota o un comando en tu máquina? En qué se diferencian las dos instalaciones
Ejecutar en PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
AbrirA zero-risk gym for AI agents on real prediction markets — real order books, official fees, verified fill fidelity. Practice, evaluate, and benchmark decision intelligence.
Agents make probability judgments all day. Polymarket is the world's largest prediction market, and its order books are the honest scoreboard: real money, real prices, real outcomes. But you cannot hand an agent a wallet to learn with. So this project gives every agent what SWE-bench gave coders — a faithful environment where judgment has consequences and gets scored:
polymarket-benchmark harness in this repository (installed separately) scores any model on prediction-market decision sets (Brier score, calibration, alpha)Part of agent-next — building an agentic world.
pip install polymarket-paper-trader
pm-trader init --balance 10000 # $10k paper money
pm-trader markets search "bitcoin" # find markets
pm-trader buy will-bitcoin-hit-100k yes 500 # buy $500 of YES
pm-trader stats --card # shareable stats card
Prefer not to install? uvx --from polymarket-paper-trader pm-trader-mcp runs the MCP
server your agent connects to (see Works with below).
That's it. Your AI agent is now trading Polymarket with zero risk.
# via pip (CLI + MCP server)
pip install polymarket-paper-trader
# or the MCP server alone, with no install
uvx --from polymarket-paper-trader pm-trader-mcp
# from source (development)
uv pip install -e ".[dev]"
Requires Python 3.10+.
Full copy-paste config for every runtime above (plus Grok/xAI remote MCP): docs/integrations.md.
Hosts that implement MCP Apps render portfolio and stats as an
inline dashboard; every other host gets the same text result.
Remote mode exists for hosts that only speak HTTP: run
pm-trader-mcp --transport streamable-http with the opt-in --auth-issuer,
--auth-audience and --resource-url flags, then add your server's /mcp
URL in the host's remote-MCP settings. It is off by default, and it needs an
OAuth/OIDC issuer you operate — pm-trader verifies bearer tokens against it
and gives every verified subject its own paper accounts. There is no hosted
endpoint to add: you run the server yourself. Setup, threat model and the
environment equivalents: docs/remote-mcp.md.
# Initialize with $10k paper balance
pm-trader init --balance 10000
# Browse markets
pm-trader markets list --sort liquidity
pm-trader markets search "bitcoin"
# Trade
pm-trader buy will-bitcoin-hit-100k yes 100 # buy $100 of YES
pm-trader sell will-bitcoin-hit-100k yes 50 # sell 50 shares
# Check portfolio and P&L
pm-trader portfolio
pm-trader stats
fee = C × rate × p × (1-p), rounded to 5 decimals, makers exempt (exact spec in the CHANGELOG) — charged per filled level from each market's published fee schedule, not an approximationresolve (or resolve --all) when a market closes and winners pay out like the real thingkalshi:<ticker> slug (pm-trader buy kalshi:KXNBAGAME-26OCT16DENLAL-LAL yes 25); find them with kalshi markets. Fees follow each series' published curve (docs/kalshi.md)Global flags: --data-dir PATH, --account NAME (or env vars PM_TRADER_DATA_DIR, PM_TRADER_ACCOUNT).
Your agent gets the following tools via the Model Context Protocol.
The server also carries the full trading playbook with it — as MCP server
instructions, as a trading_playbook prompt, and as a skill://trading-playbook
resource — so MCP-only clients (Cursor, Claude.ai connectors, Grok API remote
MCP, ChatGPT apps) get the same guidance skill-aware agents get from
skill/polymarket-paper-trader/SKILL.md.
pm-trader-mcp # starts on stdio
# or, with no local install:
uvx --from polymarket-paper-trader pm-trader-mcp
Add to your Claude Code config:
{
"mcpServers": {
"polymarket-paper-trader": {
"command": "pm-trader-mcp"
}
}
}
For MCP clients that only speak HTTP, run the server with --transport streamable-http:
pm-trader-mcp --transport streamable-http --host 127.0.0.1 --port 8000
# or: pm-trader mcp --transport streamable-http --host 127.0.0.1 --port 8000
The MCP endpoint is then http://<host>:<port>/mcp. There is no isolation
between callers — everyone who reaches the server shares all of its paper
accounts; it is self-host-only, not a public multi-user service. There is no authentication on this transport;
anyone who can reach the port can call every exposed tool. backtest and
pk_battle (local file reads + local strategy-module execution) are
stdio-only and are not registered when serving over streamable-http.
docker build -t pm-trader-mcp .
docker run -p 127.0.0.1:8000:8000 -v pm-trader-data:/root/.pm-trader pm-trader-mcp
Publish the port to 127.0.0.1 only (as above) unless you put a real
authenticating proxy in front of it — the container has no auth of its own.
Three ready-to-use strategies in examples/:
examples/momentum.py)Buys when YES price crosses above 0.55, takes profit at 0.70, stops loss at 0.35.
pm-trader strategy run examples.momentum.run
examples/mean_reversion.py)Buys when YES price drops 12+ cents below 0.50 fair value, sells when it reverts.
pm-trader strategy run examples.mean_reversion.run
examples/limit_grid.py)Places a grid of limit buy orders below current price with take-profit sells above.
pm-trader strategy run examples.limit_grid.run
examples/jev_edge.py)"Jev vs the market": asks Jev for a YES probability per binary market and buys the side it favors, skipping markets priced outside [0.05, 0.95] where fees dominate — pm-trader strategy run examples.jev_edge.run (needs pip install -e "benchmark").
Strategies are imported from the examples. package (the allowlist lives in pm_trader/benchmark.py), so drop your file there:
# examples/my_strategy.py
from pm_trader.engine import Engine
def run(engine: Engine) -> None:
"""Your strategy receives a fully initialized Engine."""
markets = engine.api.search_markets("crypto")
for market in markets:
if market.closed or market.yes_price < 0.3:
continue
engine.buy(market.slug, "yes", 100.0)
pm-trader strategy run examples.my_strategy.run
For backtesting with historical data:
def backtest_strategy(engine, snapshot, prices):
"""Called once per historical price snapshot."""
if snapshot.midpoint > 0.6:
engine.buy(snapshot.market_slug, snapshot.outcome, 50.0)
The paper trader is the gym; the polymarket-benchmark package in this repository is the scoreboard. It is a separate install (not part of the pm-trader CLI — pm-trader strategy replays trading strategies (pm-trader benchmark remains as an alias), see the CLI table above):
pip install -e "benchmark[dev]"
cd benchmark && polymarket-benchmark run --model opencode/jev-1.13-free --market-set mini
Run two models head-to-head to see whose judgment is actually better. Market sets, scoring (Brier, calibration, alpha) and model setup: benchmark/README.md.
Run parallel strategies with isolated accounts:
pm-trader --account aggressive init --balance 5000
pm-trader --account conservative init --balance 5000
pm-trader --account aggressive buy some-market yes 500
pm-trader --account conservative buy some-market yes 100
pm-trader strategy compare aggressive conservative
Generate a shareable stats card and post to X/Twitter:
pm-trader stats --tweet # X/Twitter optimized
pm-trader stats --card # markdown for Telegram/Discord
pm-trader stats --plain # plain text
AI agents can use the stats_card MCP tool to generate and share cards automatically.
Available on ClawHub as polymarket-paper-trader:
npx clawhub install polymarket-paper-trader
Comment /oc or /opencode on an issue or PR. New issues get a triage reply; non-draft PRs get a shallow review. Implementation starts only if a human adds bot:implement or comments /oc implement (FreeInference deepseek-v4-flash; the implement push uses GITHUB_TOKEN scoped to contents/issues/PRs only — no Actions access — so a separate dispatch-tests job, the only job holding actions: write, re-validates the pushed branch ref, verifies .github/workflows/test.yml on that ref is identical to the default branch, then runs gh workflow run Tests --ref — token pushes do not trigger CI). Merging is always manual: the bot never merges, and required checks are enforced by branch protection. Q&A / triage / review stay on qwen3.6-35b. No wallet, no real trades. Sessions are not shared.
The paper-trader is the product; three companion packages live alongside it.
See CONTRIBUTING.md for how to work on each package and CHANGELOG.md for release history.
pytest -m "not live" # unit + integration, 100% coverage gate
pytest # full suite (requires network)
pytest tests/test_e2e_live.py # live API integration tests only
MIT
Polymarket paper trading for AI agents: $10k paper money, real order books, official fees.
{ "mcpServers": { "io.github.agent-next-polymarket-paper-trader": { "command": "uvx", "args": [ "polymarket-paper-trader==0.4.13" ] } }}Herramientas
Aún no hay lista de herramientas. Los servidores remotos la reciben tras la primera comprobación de estado.
Preguntas frecuentes
Copia en esta página la configuración stdio para Cursor, Claude Desktop, Claude Code o VS Code. Usa la instalación del publicador, no un proxy de PlugMCP.
Este registro no indica ninguna variable de entorno obligatoria.
Polymarket Paper Trader se ejecuta localmente por stdio.
Última comprobación: 2026-11-09. Polymarket paper trading for AI agents: $10k paper money, real order books, official fees.