# Polymarket Paper Trader [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/agent-next/polymarket-paper-trader  
**GitHub Stars:** 509  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/polymarket-paper-trader

## Description
Polymarket paper trading for AI agents: $10k paper money, real order books, official fees.

## Tools
Capabilities this server exposes over MCP:

- **init_account** — Create a paper trading account with a starting USD balance.

    Writes the local account database; calling it again on an existing account
    replaces its balance. Run it before any trade; use reset_account to wipe
    trades and positions instead.
    
- **get_balance** — Get an account's cash, reserved and available cash, positions value and P&L.

    Reads the local account and prices positions with live market data. Use
    portfolio for per-position detail and stats for performance metrics.
    
- **reset_account** — Delete an account's trades, positions and orders and reset its balance.

    Irreversible local change. Use init_account to set a new starting balance
    afterwards; use cancel_all_orders to remove only pending orders.
    
- **search_markets** — Search Polymarket markets by text and return slug, question, prices and volume.

    Queries the live Polymarket API and changes nothing. Searches Polymarket
    only: use kalshi_markets to find Kalshi markets, list_markets to browse by
    volume, or get_markets_by_tag to browse a category.
    
- **list_markets** — List active Polymarket markets, highest volume or liquidity first.

    Queries the live Polymarket API and changes nothing. Use search_markets
    for a keyword, get_markets_by_tag for a category, or kalshi_markets for
    Kalshi.
    
- **get_market** — Get one market's question, outcome prices, volume, liquidity and status.

    Takes a Polymarket slug or condition ID, or a Kalshi market as
    'kalshi:<TICKER>'. Reads live data and changes nothing; use get_order_book
    for depth.
    
- **get_order_book** — Get the live asks and bids (price and size) for one market outcome.

    Works for Polymarket slugs and for Kalshi markets as 'kalshi:<TICKER>'.
    Reads live data and changes nothing; check it before sizing a buy or sell.
    
- **kalshi_markets** — List Kalshi markets for discovery; this tool is read-only and places no trade.

    Reads the live Kalshi API. To trade a result, pass 'kalshi:<TICKER>' as
    slug_or_id to buy, sell or place_limit_order. Use search_markets or
    list_markets for Polymarket instead.
    
- **kalshi_market** — Get one Kalshi market by ticker; read-only discovery, no trade is placed.

    Reads the live Kalshi API. To trade it, pass 'kalshi:<TICKER>' as
    slug_or_id to buy or sell. The same slug also works in get_market.
    
- **kalshi_book** — Get the live YES order book for a Kalshi market, best levels first; read-only.

    Kalshi publishes bids only, so asks are derived from NO bids (a NO bid at
    p is a YES ask at 1 - p). get_order_book returns the same book for the
    slug 'kalshi:<TICKER>' and also covers the NO side.
    
- **get_tags** — List all Polymarket market categories (tags) with their slugs.

    Reads the live Polymarket API and changes nothing. Pass a returned slug to
    get_markets_by_tag.
    
- **get_markets_by_tag** — List open Polymarket markets in one category tag.

    Reads the live Polymarket API and changes nothing. Get slugs from get_tags;
    use search_markets for a keyword or list_markets for the top markets
    overall.
    
- **get_event** — Get a Polymarket event: the group of related markets sharing one topic.

    Reads the live Polymarket API and changes nothing. Use get_market for a
    single market.
    
- **watch_prices** — Get live midpoint prices for several markets and outcomes in one call.

    Reads live data and changes nothing. Use get_order_book for depth on one
    market, or portfolio for prices of the positions you hold.
    
- **buy** — Buy shares of a Polymarket or Kalshi ('kalshi:<TICKER>') outcome with paper money.

    Fills immediately against the live order book and records the trade and
    fee (simulated; no real order). Kalshi fees follow the series fee schedule.
    Use place_limit_order for a resting order at your price, or sell to exit.
    
- **sell** — Sell held shares of a Polymarket or Kalshi ('kalshi:<TICKER>') outcome for paper cash.

    Fills immediately against the live order book and records the trade and
    fee (simulated; no real order). Use place_limit_order with side 'sell' to
    rest an exit at your price, or resolve to collect payout on a closed market.
    
- **portfolio** — List an account's open positions with live prices and unrealized P&L.

    Reads the local account and prices positions with live market data. Use
    get_balance for cash totals, history for past trades, or stats for
    performance metrics.
    
- **history** — List an account's recent trades with market, side, price, shares, USD and fee.

    Reads the local database only (no network) and changes nothing. Use
    portfolio for open positions or stats for aggregate performance.
    
- **place_limit_order** — Place a resting paper limit order on a Polymarket or Kalshi ('kalshi:<TICKER>') market.

    Stores the order locally and reserves cash for a buy; an order that
    crosses the book fills at once as a taker. Resting orders fill only when
    check_orders runs. Use buy or sell for an immediate market-price fill.
    
- **list_orders** — List an account's pending limit orders.

    Reads the local database only and changes nothing. Use check_orders to
    evaluate them against live prices, or cancel_order to remove one.
    
- **cancel_order** — Cancel one pending limit order by ID and release its reserved cash.

    Local change only. Returns a not_found error if the order does not exist
    or is no longer pending. Use cancel_all_orders to cancel every pending order.
    
- **cancel_all_orders** — Cancel every pending limit order of an account and release the reserved cash.

    Local change only; filled orders and open positions are untouched. Returns
    the count and the cancelled orders. Use cancel_order to cancel just one.
    
- **check_orders** — Evaluate pending limit orders against live prices and execute any that fill.

    Writes fills and cash changes to the local account. Resting orders never
    fill on their own, so call this periodically. Use list_orders to only view
    pending orders.
    
- **stats** — Get one account's raw performance numbers: win rate, ROI, profit, Sharpe, max drawdown.

    Reads the local account and prices positions live; changes nothing. Use
    this for analysis, stats_card for a postable text card, or
    leaderboard_entry for the ranking record.
    
- **stats_card** — Render one account's ROI, Sharpe, win rate and P&L as a postable text card.

    Reads the local account and posts nothing. Open positions are valued at live midpoints (0 if a lookup fails).
    Use stats for raw numbers,
    share_content for platform and template choices, or pk_card to compare two
    accounts.
    
- **leaderboard_entry** — Return one account's standardized leaderboard record as JSON.

    Includes ROI%, Sharpe, win rate, trade count, max drawdown, fees, first and
    last trade times, and 'qualified' (10+ trades). Reads the local account; Open positions are valued at live midpoints (0 if a lookup fails).
    Use leaderboard_card to rank many accounts, or stats for analysis.
    
- **share_content** — Generate post-ready text for a platform and template from one account's stats.

    Reads the local account and posts nothing. Open positions are valued at live midpoints (0 if a lookup fails).
    Use this when you need a
    template (milestone, daily); use stats_card for a plain stats card or
    stats for raw numbers.
    
- **pk_card** — Compare two existing accounts head-to-head and return a card naming the winner.

    Compares ROI, Sharpe, win rate, trades and tier from local accounts. Open positions are valued at live midpoints (0 if a lookup fails).
    Use pk_battle to run two strategies from scratch instead, or stats_card for
    a single account.
    
- **leaderboard_card** — Rank accounts with 10+ trades by ROI% and return a Top 10 leaderboard card.

    Scans local accounts (~/.pm-trader locally, the caller's own directory in
    remote mode) and changes nothing. Open positions are valued at live midpoints (0 if a lookup fails).
    Use leaderboard_entry for one account's
    record or pk_card for two.
    
- **pk_battle** — Run two strategies from scratch on equal balances and return stats, a PK card and the winner.

    Executes the strategy functions against live market data in temporary
    accounts. Use pk_card to compare accounts that already exist, or backtest
    to test one strategy on historical data.
    
- **resolve** — Settle an account's positions in one closed market, paying $1 per winning share.

    Writes payouts to the local account and cancels resting orders on that
    market. Fails if the market is not closed, the winner is ambiguous, or no
    position is held. Use resolve_all to settle every closed market at once.
    
- **resolve_all** — Settle every open position whose market has closed, paying $1 per winning share.

    Writes payouts to the local account; open markets are skipped, as are
    markets that hit a transient network error (retry later). Use resolve to
    settle a single market.
    
- **backtest** — Replay a strategy over historical price snapshots on synthetic order books.

    Reads the data file and returns performance metrics; it does not touch your
    paper accounts. Use pk_battle to compare two strategies live, or stats for
    an account's real results.
    

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "polymarket-paper-trader": {
    "command": "uvx",
    "args": ["--from","polymarket-paper-trader","pm-trader-mcp"]
  }
}
```

## Documentation

## What Polymarket Paper Trader MCP server does

The Polymarket Paper Trader MCP server connects AI agents to Polymarket market data and a local paper-trading account. Accounts start with a configurable balance, with the example workflow using $10,000. Agents can search and filter markets, inspect events and outcomes, observe live order books, trade shares, and review portfolio performance.

Trading is simulated rather than funded with real money. The account tracks cash, reserved cash, available cash, positions, trade history, open orders, realized results, and performance statistics. Multiple local accounts can support strategy comparisons and head-to-head tests.

## How it works

Market buys and sells execute against live Polymarket order-book levels. A buy consumes available asks from the lowest price upward, while execution can include slippage and partial fills. Limit orders remain open until they fill, are cancelled, or expire; reserved cash is retained for resting buy orders.

Fees follow the published per-match fee curve for the market, with fees calculated for each filled level. The system also validates limit prices against tick size and rejects trades for closed or paused markets. Closed markets can be resolved so winning shares pay $1 each.

The server can run over standard input/output with `pm-trader-mcp`, or over streamable HTTP using the `--transport streamable-http` option. Backtesting and head-to-head strategy battles are available through stdio only.

## Setup and configuration

Install the package with Python 3.10 or newer:

```bash
pip install polymarket-paper-trader
```

Start the MCP server locally with:

```bash
pm-trader-mcp
```

For an installation-free launch, the README provides this command:

```bash
uvx --from polymarket-paper-trader pm-trader-mcp
```

The Polymarket Paper Trader MCP server can also be configured for streamable HTTP:

```bash
pm-trader-mcp --transport streamable-http --host 127.0.0.1 --port 8000
```

The HTTP endpoint is `/mcp`. Optional global settings include `PM_TRADER_DATA_DIR` for the data location and `PM_TRADER_ACCOUNT` for selecting a named account.

## Tools and capabilities

The Polymarket Paper Trader MCP server exposes tools for:

- Creating, resetting, and inspecting paper accounts.
- Searching markets, listing them by volume or liquidity, and filtering by tags.
- Reading event details, market outcomes, prices, and live order-book snapshots.
- Watching prices across multiple markets.
- Buying and selling at the best available prices.
- Placing, listing, checking, and cancelling limit orders, including bulk cancellation.
- Viewing portfolios, trade history, win rate, ROI, profit, and maximum drawdown.
- Resolving individual or all eligible closed markets.
- Backtesting strategies against historical snapshots through stdio.
- Generating statistics cards, platform-specific sharing content, leaderboard entries, rankings, and account comparisons.

The repository also provides a command-line interface for the same trading workflow, including account management, exports, strategy execution, and benchmark aliases.

## Limitations and notes

This tool does not provide a real-money trading wallet. Balances and positions are paper records, while market information and order-book inputs come from Polymarket APIs.

Resolution is an explicit step: an agent must call the resolution tool after a market closes for winning positions to receive their $1-per-share payout. The project supports markets with multiple outcomes, not only binary YES/NO markets. Live API behavior and data availability therefore affect what the agent can discover and trade.

_Full upstream README: https://allmcps.com/mcp/polymarket-paper-trader/readme_

