{ "serverInfo": { "name": "Polymarket Agent MCP", "version": "1.6.2" }, "description": "Trade, analyze, and automate Polymarket prediction markets via AI. 48 tools for direct trading, smart money flow detection, copy trading, backtesting, and portfolio management.", "homepage": "https://github.com/demwick/polymarket-agent-mcp", "icon": "https://raw.githubusercontent.com/demwick/polymarket-agent-mcp/main/assets/icon.svg", "configSchema": { "type": "object", "properties": { "COPY_MODE": { "type": "string", "enum": [ "preview", "live" ], "default": "preview", "description": "Trading mode: preview (simulated) or live (real orders on Polymarket)" }, "DAILY_BUDGET": { "type": "string", "default": "20", "description": "Maximum daily spending limit in USDC" }, "MIN_CONVICTION": { "type": "string", "default": "3", "description": "Minimum trade size in USDC to copy from watched traders" }, "POLY_API_KEY": { "type": "string", "description": "Polymarket CLOB API key (required for live mode)" }, "POLY_API_SECRET": { "type": "string", "description": "Polymarket CLOB API secret (required for live mode)" }, "POLY_API_PASSPHRASE": { "type": "string", "description": "Polymarket CLOB API passphrase (required for live mode)" }, "POLY_PRIVATE_KEY": { "type": "string", "description": "Polymarket wallet private key (required for live mode)" }, "MCP_LICENSE_KEY": { "type": "string", "description": "MCP Marketplace license key for Pro features" } }, "required": [] }, "tools": [ { "name": "traders.discover", "description": "Fetch top traders from the Polymarket leaderboard ranked by PnL, volume, and ROI. Use this to find profitable traders worth copying. Returns trader address, PnL, volume, and win rate. Use auto_watch to add them to your watchlist directly.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "pages": { "default": 3, "description": "Number of leaderboard pages to fetch (1 page = 25 traders)", "type": "integer", "minimum": 1, "maximum": 10 }, "period": { "default": "ALL", "description": "Leaderboard time range: ALL for all-time, WEEK for last 7 days", "type": "string", "enum": [ "ALL", "WEEK" ] }, "min_volume": { "default": 1000, "description": "Minimum total trading volume in USDC to include a trader", "type": "number" }, "min_pnl": { "default": 0, "description": "Minimum profit/loss in USDC to include a trader", "type": "number" }, "auto_watch": { "default": false, "description": "Automatically add discovered traders to your watchlist", "type": "boolean" } } }, "annotations": { "readOnlyHint": true } }, { "name": "watchlist.add", "description": "Add or remove an Ethereum wallet address from the copy trading watchlist. Watched wallets are monitored for new trades when the monitor is running. Use discover_traders first to find good wallets to watch.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "Ethereum wallet address to watch (0x followed by 40 hex characters)" }, "alias": { "description": "Friendly name for this wallet (e.g. 'whale_trader_1')", "type": "string" }, "action": { "default": "add", "description": "add=start watching this wallet, remove=stop watching", "type": "string", "enum": [ "add", "remove" ] } }, "required": [ "address" ] }, "annotations": { "readOnlyHint": false } }, { "name": "watchlist.list", "description": "Show every wallet address currently on the copy-trading watchlist, with its alias, date added, and active/paused status. Use to review who is being copied before calling monitor.start, after watchlist.rebalance to confirm removals, or to pick a target for traders.analyze, traders.positions, or traders.score. Returns a markdown table of watched wallets. Call watchlist.add to manage entries, or traders.discover to find new wallets to watch. No parameters.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": {} }, "annotations": { "readOnlyHint": true } }, { "name": "monitor.start", "description": "Start a background loop that polls watched wallets for new trades and automatically copies them. Runs continuously at the specified interval until stop_monitor is called. Requires at least one wallet on the watchlist. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "interval_seconds": { "default": 30, "description": "Polling interval in seconds between wallet checks (10-300)", "type": "integer", "minimum": 10, "maximum": 300 } } }, "annotations": { "readOnlyHint": false } }, { "name": "monitor.stop", "description": "Stop the background wallet monitoring loop started by monitor.start. Call this to end a copy-trading session, before changing bot configuration via config.set or config.safety_limits, or when switching between preview and live modes via config.go_live. Does NOT close open positions — use positions.close or positions.set_exit_rules separately to unwind trades. Idempotent: safe to call when the monitor is not running. Returns a short confirmation string. No parameters. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": {} }, "annotations": { "readOnlyHint": false } }, { "name": "dashboard.get", "description": "Get a comprehensive dashboard showing daily budget usage, total P&L, recent trades, watchlist status, and monitor state. No parameters needed. Use this for a quick overview of your trading activity.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": {} }, "annotations": { "readOnlyHint": true } }, { "name": "trades.history", "description": "Retrieve past copy trades from the database with optional filters by trader address or status. Returns trade details including entry price, P&L, and market info. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "limit": { "default": 20, "description": "Maximum number of trades to return", "type": "integer", "minimum": 1, "maximum": 100 }, "trader": { "description": "Filter by trader wallet address (0x...)", "type": "string" }, "status": { "description": "Filter by trade status: open, closed, or won", "type": "string" } } }, "annotations": { "readOnlyHint": true } }, { "name": "config.set", "description": "Update bot configuration at runtime. Supports daily_budget (max USDC per day) and min_conviction (minimum trade size to copy). Changes take effect immediately and persist across restarts. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "key": { "type": "string", "enum": [ "daily_budget", "min_conviction" ], "description": "Config key: daily_budget=max USDC spend per day, min_conviction=minimum trade size in USDC to copy" }, "value": { "type": "string", "description": "New value as a string (e.g. '50' for $50 daily budget)" } }, "required": [ "key", "value" ] }, "annotations": { "readOnlyHint": false } }, { "name": "config.go_live", "description": "Switch from preview (simulated) to live trading mode where real orders are placed on Polymarket. Requires the four Polymarket CLOB credentials (documented in PERMISSIONS.md) to be present in the environment. This action uses real money. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "confirm": { "type": "boolean", "description": "Must be true to confirm switching to live trading mode. This will place real orders with real money" } }, "required": [ "confirm" ] }, "annotations": { "destructiveHint": true } }, { "name": "traders.analyze", "description": "Analyze a Polymarket trader by wallet address. Returns profile stats, active positions, win rate, volume, PnL, and recent trade activity. Use before adding a trader to your watchlist to assess their quality.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "Trader's Ethereum wallet address (0x...) to analyze" } }, "required": [ "address" ] }, "annotations": { "readOnlyHint": true } }, { "name": "traders.positions", "description": "View another trader's current open positions on Polymarket by their wallet address. Shows market name, outcome, size, and current price. Useful for due diligence before copy trading. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "Trader's Ethereum wallet address (0x...)" }, "limit": { "default": 20, "description": "Maximum number of positions to return", "type": "integer", "minimum": 1, "maximum": 100 } }, "required": [ "address" ] }, "annotations": { "readOnlyHint": true } }, { "name": "positions.list", "description": "View your own copy trading positions filtered by status (open, closed, or all). Returns market name, entry price, current price, P&L, and exit rules for each position.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "status": { "default": "open", "description": "Filter positions: open=active, closed=resolved/exited, all=both", "type": "string", "enum": [ "open", "closed", "all" ] } } }, "annotations": { "readOnlyHint": true } }, { "name": "positions.close", "description": "Manually close a copy trading position by trade ID. In live mode, places a sell order on Polymarket. In preview mode, marks the position as closed in the database. Use get_positions to find the trade_id. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "trade_id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "ID of the trade/position to close (from get_positions)" }, "reason": { "default": "manual", "description": "Reason for closing (e.g. 'manual', 'stop_loss', 'take_profit')", "type": "string" } }, "required": [ "trade_id" ] }, "annotations": { "destructiveHint": true } }, { "name": "markets.discover", "description": "Find active Polymarket prediction markets filtered by resolution deadline and category. Returns market question, price, volume, and end date. Use ending='today' for fast-resolving markets, or 'all' to browse everything.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "ending": { "default": "today", "description": "Filter by resolution deadline: today, this_week, or all active markets", "type": "string", "enum": [ "today", "this_week", "all" ] }, "category": { "description": "Filter by category (e.g. politics, sports, crypto, pop-culture)", "type": "string" }, "min_volume": { "default": 100, "description": "Minimum trading volume in USDC to include a market", "type": "number" }, "limit": { "default": 20, "description": "Maximum number of markets to return", "type": "integer", "minimum": 1, "maximum": 50 } } }, "annotations": { "readOnlyHint": true } }, { "name": "markets.price", "description": "Get live bid/ask/spread prices from the CLOB order book for a specific market by condition_id. If no condition_id is given and show_positions is true, returns current prices for all open positions.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "condition_id": { "description": "Polymarket market condition ID. Omit to show prices for all open positions", "type": "string" }, "show_positions": { "default": false, "description": "Include current position value alongside price data", "type": "boolean" } } }, "annotations": { "readOnlyHint": true } }, { "name": "wta.discover", "description": "Find today's WTA tennis match markets on Polymarket where the favorite is available at a discount. Returns matches with current price vs fair price and the discount percentage. Use place_stink_bid to act on these opportunities. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "discount_pct": { "default": 30, "description": "Minimum discount percentage below fair price to qualify as a stink bid opportunity (5-50%)", "type": "number", "minimum": 5, "maximum": 50 } } }, "annotations": { "readOnlyHint": true } }, { "name": "wta.bid", "description": "Place limit orders (stink bids) at a discount on WTA tennis match favorites. Orders sit in the order book until filled at your target price. In preview mode, simulates the orders. In live mode, places real CLOB orders. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "discount_pct": { "default": 30, "description": "Discount percentage below fair price to place the bid (5-50%)", "type": "number", "minimum": 5, "maximum": 50 }, "bet_size": { "default": 5, "description": "USDC amount per stink bid order (1-50)", "type": "number", "minimum": 1, "maximum": 50 } } }, "annotations": { "readOnlyHint": false } }, { "name": "orders.cancel", "description": "Cancel ALL open/pending limit orders on Polymarket for this account in a single call. Use as an emergency stop, before changing strategy, after a sudden price move, or when unwinding positions. Not reversible — cancelled orders must be re-placed via orders.buy, wta.bid, or orders.batch. Returns the count of cancelled orders. Call orders.list first if you want to preview what will be cancelled. Only works in live mode (no-op in preview). No parameters. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": {} }, "annotations": { "destructiveHint": true } }, { "name": "positions.check_exits", "description": "Scan all open positions for exit conditions: market resolution, stop-loss/take-profit triggers, or the original trader exiting. Updates P&L and closes positions that meet exit criteria. No parameters needed.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": {} }, "annotations": { "readOnlyHint": true } }, { "name": "agent.log_cycle", "description": "Record an AI agent's trading cycle metrics to the database for dashboard tracking and performance analysis. Stores PnL, win rate, positions, budget usage, and notes. Call this after each automated trading cycle.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "agent_name": { "type": "string", "description": "Name of the AI agent logging this cycle" }, "strategy": { "type": "string", "description": "Trading strategy used in this cycle (e.g. 'copy_top_traders', 'stink_bids')" }, "status": { "default": "ok", "description": "Cycle outcome: ok=normal, warning=minor issue, risk_alert=needs attention, error=failed", "type": "string", "enum": [ "ok", "warning", "risk_alert", "error" ] }, "positions_open": { "default": 0, "description": "Number of currently open positions", "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "positions_closed": { "default": 0, "description": "Number of positions closed this cycle", "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "realized_pnl": { "default": 0, "description": "Realized profit/loss in USDC from closed positions", "type": "number" }, "unrealized_pnl": { "default": 0, "description": "Unrealized profit/loss in USDC from open positions", "type": "number" }, "win_rate": { "default": 0, "description": "Win rate as a decimal (0.0-1.0)", "type": "number" }, "budget_used": { "default": 0, "description": "Amount of daily budget spent in USDC", "type": "number" }, "budget_limit": { "default": 0, "description": "Total daily budget limit in USDC", "type": "number" }, "actions_taken": { "description": "Comma-separated list of actions taken (e.g. 'bought YES on Bitcoin market')", "type": "string" }, "notes": { "description": "Free-text notes about this cycle", "type": "string" } }, "required": [ "agent_name", "strategy" ] }, "annotations": { "readOnlyHint": false } }, { "name": "positions.set_exit_rules", "description": "Set stop-loss and/or take-profit price levels on an open position. When the market price crosses these levels, check_exits will automatically close the position. Use get_positions to find trade IDs. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "trade_id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "ID of the open position to set exit rules on (from get_positions)" }, "stop_loss": { "description": "Price at which to sell (stop-loss). E.g. 0.30 means sell if price drops to $0.30", "type": "number", "minimum": 0, "maximum": 1 }, "take_profit": { "description": "Price at which to sell (take-profit). E.g. 0.85 means sell if price rises to $0.85", "type": "number", "minimum": 0, "maximum": 1 } }, "required": [ "trade_id" ] }, "annotations": { "readOnlyHint": false } }, { "name": "portfolio.get", "description": "Get a comprehensive portfolio overview of all open copy-trading positions, grouped by the source trader they were copied from, with per-wallet subtotals, individual market names/entry prices/sizes, active stop-loss/take-profit rules, and an aggregate total P&L. Use as a daily status check, before sizing decisions via config.set, or to identify which source wallet is carrying the portfolio. Returns a grouped markdown table. Call portfolio.balance for budget-focused numbers or portfolio.risk for concentration metrics. No parameters.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": {} }, "annotations": { "readOnlyHint": true } }, { "name": "traders.backtest", "description": "Simulate copying a trader's historical trades to calculate hypothetical P&L. Shows what you would have earned if you had copy-traded this wallet. Use before adding a trader to your watchlist to validate their performance. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "Ethereum wallet address of the trader to backtest" }, "copy_budget": { "default": 5, "description": "Simulated $ amount per trade (default: $5)", "type": "number", "minimum": 1, "maximum": 100 } }, "required": [ "address" ] }, "annotations": { "readOnlyHint": true } }, { "name": "traders.score", "description": "Calculate a conviction score (0-100) for a trader across 5 dimensions: win rate, volume, consistency, experience, and diversity. Higher scores indicate more reliable traders for copy trading. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "address": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "description": "Trader's Ethereum wallet address (0x...) to score" } }, "required": [ "address" ] }, "annotations": { "readOnlyHint": true } }, { "name": "markets.check", "description": "Evaluate market quality by checking bid/ask spread, order book depth, and price range. Returns a pass/fail with specific reasons. Use before placing trades to avoid illiquid or wide-spread markets. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "token_id": { "type": "string", "description": "Market token ID from the CLOB order book" }, "max_spread": { "description": "Max acceptable spread (default: 0.10)", "type": "number", "minimum": 0, "maximum": 1 }, "min_depth": { "description": "Min $ depth per side (default: $50)", "type": "number", "minimum": 0 } }, "required": [ "token_id" ] }, "annotations": { "readOnlyHint": true } }, { "name": "flow.discover", "description": "Scan top leaderboard traders for smart money convergence signals. Identifies markets where multiple top traders are buying the same outcome simultaneously, indicating strong conviction. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "top_traders": { "default": 30, "description": "Number of top traders to scan", "type": "integer", "minimum": 5, "maximum": 100 }, "max_age_minutes": { "default": 60, "description": "Max trade age in minutes", "type": "number", "minimum": 5, "maximum": 1440 }, "min_traders": { "default": 2, "description": "Min unique traders for a signal", "type": "integer", "minimum": 2, "maximum": 20 } } }, "annotations": { "readOnlyHint": true } }, { "name": "markets.price_history", "description": "Fetch historical OHLC price data for a market token over a configurable time window (1h to 1m). Returns price points with a sparkline visualization showing the price trend. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "token_id": { "type": "string", "description": "Market token ID to fetch price history for" }, "interval": { "default": "1d", "description": "Time window: 1h, 6h, 1d, 1w, or 1m", "type": "string", "enum": [ "1h", "6h", "1d", "1w", "1m" ] } }, "required": [ "token_id" ] }, "annotations": { "readOnlyHint": true } }, { "name": "markets.watch", "description": "Manage your market watchlist: add, remove, or list watched markets with optional price alert thresholds. When a market crosses your alert price, it shows up in check_exits.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "action": { "default": "list", "description": "Action to perform: add, remove, or list watched markets", "type": "string", "enum": [ "add", "remove", "list" ] }, "condition_id": { "description": "Market condition ID to add or remove from watchlist", "type": "string" }, "title": { "description": "Friendly name for the market (shown in watchlist)", "type": "string" }, "alert_below": { "description": "Alert when price drops below this level", "type": "number", "minimum": 0, "maximum": 1 }, "alert_above": { "description": "Alert when price rises above this level", "type": "number", "minimum": 0, "maximum": 1 } } }, "annotations": { "readOnlyHint": false } }, { "name": "watchlist.rebalance", "description": "Analyze all traders on your watchlist and remove underperformers whose conviction score or win rate falls below your threshold. Use to keep your watchlist focused on high-quality traders. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "min_score": { "default": 30, "description": "Remove traders below this conviction score", "type": "number", "minimum": 0, "maximum": 100 }, "min_win_rate": { "default": 20, "description": "Remove traders below this win rate %", "type": "number", "minimum": 0, "maximum": 100 }, "dry_run": { "default": true, "description": "If true, only report — don't remove. Set false to actually remove.", "type": "boolean" } } }, "annotations": { "readOnlyHint": false } }, { "name": "orders.buy", "description": "Buy outcome shares on a Polymarket market. Specify condition_id, USDC amount, and optionally a limit price. Runs a market quality check before executing. In preview mode, simulates the trade. In live mode, places a real CLOB order.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "condition_id": { "type": "string", "description": "Polymarket market condition ID (hex string from market URL or API)" }, "amount": { "type": "number", "minimum": 0.5, "description": "Amount in USDC to spend" }, "price": { "description": "Limit price (0.01-0.99). Omit for market price from order book", "type": "number", "minimum": 0.01, "maximum": 0.99 }, "outcome": { "default": "YES", "description": "Outcome to buy: YES for the event happening, NO for it not happening", "type": "string", "enum": [ "YES", "NO" ] } }, "required": [ "condition_id", "amount" ] }, "annotations": { "readOnlyHint": false } }, { "name": "orders.sell", "description": "Sell an open position by trade_id (from get_positions) or condition_id. In live mode, places a sell order on Polymarket. In preview mode, marks the position as sold in the database and calculates realized P&L.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "trade_id": { "description": "Trade ID to sell (from get_positions)", "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "condition_id": { "description": "Condition ID to sell (finds matching open position)", "type": "string" }, "price": { "description": "Limit price (omit for current market price)", "type": "number", "minimum": 0.01, "maximum": 0.99 } } }, "annotations": { "destructiveHint": true } }, { "name": "portfolio.balance", "description": "View account balance summary: daily budget remaining, total invested, realized and unrealized P&L. No parameters needed. Use this to check how much budget is left before placing new trades.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": {} }, "annotations": { "readOnlyHint": true } }, { "name": "markets.search", "description": "Search Polymarket markets by keyword query. Returns matching markets with question, price, volume, and condition_id. Use the condition_id from results with buy, get_price, or analyze_opportunity.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "query": { "type": "string", "minLength": 1, "description": "Search query (e.g. 'bitcoin', 'election', 'UFC')" }, "limit": { "default": 10, "description": "Maximum number of markets to return", "type": "integer", "minimum": 1, "maximum": 50 }, "active_only": { "default": true, "description": "Only return active (non-resolved) markets", "type": "boolean" } }, "required": [ "query" ] }, "annotations": { "readOnlyHint": true } }, { "name": "markets.arbitrage", "description": "Scan active Polymarket markets for arbitrage opportunities where YES + NO prices don't sum to $1.00. Returns markets with the price gap and potential profit percentage.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "limit": { "default": 50, "description": "Number of top markets to scan", "type": "integer", "minimum": 10, "maximum": 200 }, "min_spread": { "default": 0.02, "description": "Minimum price spread to report (default: 2%)", "type": "number", "minimum": 0.005, "maximum": 0.5 } } }, "annotations": { "readOnlyHint": true } }, { "name": "markets.related", "description": "Find Polymarket markets related to a given condition_id or topic keyword. Useful for discovering correlated markets or building a diversified position across related events.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "condition_id": { "description": "Find markets related to this market", "type": "string" }, "query": { "description": "Keyword to find related markets (e.g. 'bitcoin', 'trump')", "type": "string" }, "limit": { "default": 10, "description": "Maximum number of related markets to return", "type": "integer", "minimum": 1, "maximum": 30 } } }, "annotations": { "readOnlyHint": true } }, { "name": "markets.holders", "description": "View the largest position holders in a Polymarket market by condition_id. Shows wallet address, position size, and side (YES/NO). Useful for gauging smart money sentiment on a market.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "condition_id": { "type": "string", "description": "Polymarket market condition ID to find top holders for" }, "limit": { "default": 10, "description": "Maximum number of top holders to return", "type": "integer", "minimum": 1, "maximum": 50 } }, "required": [ "condition_id" ] }, "annotations": { "readOnlyHint": true } }, { "name": "markets.trending", "description": "List trending Polymarket markets ranked by trading volume over a configurable period (24h, 7d, or 30d). Filter by category to focus on specific topics. Returns market question, price, and volume.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "period": { "default": "24h", "description": "Volume period to rank by", "type": "string", "enum": [ "24h", "7d", "30d" ] }, "category": { "description": "Filter by category (e.g. politics, sports, crypto)", "type": "string" }, "limit": { "default": 15, "description": "Maximum number of trending markets to return", "type": "integer", "minimum": 1, "maximum": 50 } } }, "annotations": { "readOnlyHint": true } }, { "name": "markets.analyze", "description": "Generate a BUY/SELL/HOLD recommendation for a Polymarket market by analyzing price, spread, price trend, and liquidity depth. Returns a score with detailed reasoning. Read-only analysis, does not place trades.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "condition_id": { "type": "string", "description": "Polymarket market condition ID to analyze for trading opportunity" } }, "required": [ "condition_id" ] }, "annotations": { "readOnlyHint": true } }, { "name": "portfolio.risk", "description": "Assess portfolio risk across 4 dimensions: position concentration, market diversification, stop-loss/take-profit coverage, and daily budget utilization. Returns a risk score with specific warnings. No parameters needed.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": {} }, "annotations": { "readOnlyHint": true } }, { "name": "orders.batch", "description": "Execute multiple buy/sell orders in a single call (max 10 orders). Each order specifies a condition_id, amount, optional price, and side. Returns per-order results with success/failure status.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "orders": { "minItems": 1, "maxItems": 10, "type": "array", "items": { "type": "object", "properties": { "condition_id": { "type": "string", "description": "Polymarket market condition ID (hex string)" }, "amount": { "type": "number", "minimum": 0.5, "description": "Amount in USDC to trade" }, "price": { "description": "Limit price (0.01-0.99). Omit for market price", "type": "number", "minimum": 0.01, "maximum": 0.99 }, "side": { "default": "BUY", "description": "Order side: BUY to open a position, SELL to close", "type": "string", "enum": [ "BUY", "SELL" ] } }, "required": [ "condition_id", "amount" ] }, "description": "Array of orders to execute (max 10)" } }, "required": [ "orders" ] }, "annotations": { "readOnlyHint": false } }, { "name": "config.safety_limits", "description": "Configure trading safety guardrails: maximum order size in USDC, total exposure cap, and maximum spread tolerance. These limits are enforced on all subsequent buy/sell operations. Changes persist in the database.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "max_order_size": { "description": "Max single order size in USDC", "type": "number", "minimum": 1 }, "max_exposure": { "description": "Max total open position exposure in USDC", "type": "number", "minimum": 1 }, "max_per_market": { "description": "Max investment in a single market in USDC", "type": "number", "minimum": 1 }, "min_liquidity": { "description": "Min required market liquidity in USDC", "type": "number", "minimum": 0 }, "max_spread": { "description": "Max acceptable spread (e.g. 0.10 = 10%)", "type": "number", "minimum": 0, "maximum": 1 }, "show": { "default": false, "description": "Show current limits without changing", "type": "boolean" } } }, "annotations": { "readOnlyHint": false } }, { "name": "orders.list", "description": "List all open (pending/unfilled) limit orders currently resting on Polymarket's order book for this account. Use after placing limit orders via orders.buy or wta.bid to confirm acceptance, or before orders.cancel to preview what will be removed. Returns each order's ID, market question, side (BUY/SELL), size, limit price, and age. For deeper detail on a single order, call orders.status with its order_id. Only works in live mode (returns an empty list in preview). No parameters. Pro feature.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": {} }, "annotations": { "readOnlyHint": true } }, { "name": "orders.status", "description": "Check the live state of a specific Polymarket limit order by its order_id. Use after orders.buy, orders.batch, or wta.bid to track fill progress, or to verify that an orders.cancel call succeeded. Returns the order status (OPEN, FILLED, CANCELLED, or EXPIRED), filled amount, remaining size, current limit price, and the market it was placed on. Obtain the order_id from the response of the placing tool or from orders.list. Only works in live mode.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "order_id": { "type": "string", "description": "The order ID to check status for" } }, "required": [ "order_id" ] }, "annotations": { "readOnlyHint": true } }, { "name": "markets.events", "description": "Browse Polymarket event groups to find all markets under a single event (e.g. 'US Election', 'UFC 300', 'NBA Finals'). Returns the event with all its sub-markets and their current prices.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "slug": { "description": "Event slug to look up (e.g. 'us-presidential-election-2026')", "type": "string" }, "query": { "description": "Search events by keyword", "type": "string" }, "limit": { "default": 10, "description": "Maximum number of events to return", "type": "integer", "minimum": 1, "maximum": 30 } } }, "annotations": { "readOnlyHint": true } }, { "name": "markets.compare", "description": "Compare 2-5 Polymarket markets side by side. Shows price, spread, order book depth, volume, and quality score for each market. Useful for choosing the best market to trade among similar options.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "condition_ids": { "minItems": 2, "maxItems": 5, "type": "array", "items": { "type": "string" }, "description": "2-5 condition IDs to compare" } }, "required": [ "condition_ids" ] }, "annotations": { "readOnlyHint": true } }, { "name": "markets.featured", "description": "List top Polymarket markets ranked by liquidity with optional category filter (politics, sports, crypto, pop-culture, business, science). Returns the most liquid and actively traded markets.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "category": { "description": "Filter by market category: politics, sports, crypto, pop-culture, business, or science", "type": "string", "enum": [ "politics", "sports", "crypto", "pop-culture", "business", "science" ] }, "limit": { "default": 15, "description": "Maximum number of markets to return", "type": "integer", "minimum": 1, "maximum": 30 } } }, "annotations": { "readOnlyHint": true } }, { "name": "portfolio.optimize", "description": "Analyze your open positions and generate optimization recommendations based on your chosen strategy (conservative, balanced, or aggressive). Returns SL/TP suggestions, concentration warnings, and cut/hold/take-profit actions for each position.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "strategy": { "default": "balanced", "description": "Risk strategy: conservative=tight SL/TP, balanced=moderate risk, aggressive=wider thresholds for max growth", "type": "string", "enum": [ "conservative", "balanced", "aggressive" ] } } }, "annotations": { "readOnlyHint": true } }, { "name": "markets.watch_price", "description": "Manage live WebSocket price subscriptions for real-time market updates. Subscribe to a token_id to start streaming price changes, unsubscribe to stop, or check connection status.", "inputSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "action": { "default": "status", "description": "subscribe=start streaming, unsubscribe=stop streaming, status=show connection info", "type": "string", "enum": [ "subscribe", "unsubscribe", "status" ] }, "token_id": { "description": "Market token ID to subscribe/unsubscribe. Required for subscribe/unsubscribe, omit for status", "type": "string" } } }, "annotations": { "readOnlyHint": false } } ], "prompts": [ { "name": "daily-trading-cycle", "description": "Run a complete daily trading cycle: check portfolio, scan smart money, discover opportunities, and manage positions" }, { "name": "evaluate-trader", "description": "Deep evaluation of a trader before adding to watchlist", "arguments": [ { "name": "address", "description": "Ethereum wallet address of the trader to evaluate", "required": true } ] } ], "resources": [ { "uri": "polymarket://watchlist", "name": "watchlist", "description": "Current copy trading watchlist", "mimeType": "application/json" }, { "uri": "polymarket://positions", "name": "positions", "description": "Open trading positions", "mimeType": "application/json" }, { "uri": "polymarket://budget/today", "name": "budget", "description": "Today's budget usage and remaining", "mimeType": "application/json" }, { "uri": "polymarket://trades/recent", "name": "trades", "description": "Recent trade history", "mimeType": "application/json" } ], "permissions": { "network": { "outbound": [ { "host": "data-api.polymarket.com", "protocol": "https", "purpose": "Read-only trader activity, positions, and leaderboard data", "sensitive": false }, { "host": "gamma-api.polymarket.com", "protocol": "https", "purpose": "Read-only market metadata, prices, and resolution status", "sensitive": false }, { "host": "clob.polymarket.com", "protocol": "https", "purpose": "Order book reads; signed order placement in live mode only", "sensitive": true, "writeScope": "Only active when COPY_MODE=live and user-initiated trade tools are called" }, { "host": "ws-subscriptions-clob.polymarket.com", "protocol": "wss", "purpose": "Subscribe to real-time price updates for markets the user explicitly adds via markets.watch_price", "sensitive": false, "dataFlow": "inbound-only", "authentication": "none", "scope": "Public market price streams; no wallet or user identity transmitted" }, { "host": "mcp-marketplace.io", "protocol": "https", "purpose": "One-time license key verification at startup; cached after first call", "sensitive": false, "optional": true } ], "inbound": [ { "transport": "HTTP (optional)", "port": "PORT env var (default 3000)", "purpose": "StreamableHTTP MCP transport when running in HTTP mode", "optional": true, "authentication": "Optional bearer token gated by the HTTP-auth env var documented in PERMISSIONS.md; when unset, the transport is open" } ] }, "filesystem": { "read": [ { "path": ".env", "purpose": "Load environment variables via dotenv at startup", "when": "startup only" } ], "readWrite": [ { "path": "./copytrader.db", "configurableVia": "DB_PATH env var", "purpose": "SQLite database for watchlist, trades, daily budget, config, agent cycles, and market watchlist", "sensitive": false, "note": "Never stores private keys, API secrets, or personally identifiable information" } ], "denied": [ "No access to user home directory beyond ./copytrader.db and ./.env", "No temporary files created", "No writes outside the working directory" ] }, "environmentVariables": { "authoritativeList": "PERMISSIONS.md#environment-variables", "configSchemaPointer": "serverCard.configSchema.properties", "secretSensitivityPolicy": "PERMISSIONS.md#secrets-policy", "note": "Full per-variable sensitivity, scope, and disposal rules are documented in PERMISSIONS.md. The user-facing credential form schema is published above under configSchema.properties. This block intentionally does not duplicate the variable names to keep this manifest as a pointer rather than a second source of truth." }, "process": { "spawnsChildProcesses": false, "executesShellCommands": false, "usesDynamicCodeExecution": false, "note": "Any exec() calls in the source refer to better-sqlite3 Database.exec() for SQL statements, not child_process.exec()" }, "dataHandling": { "telemetry": "none", "analytics": "none", "thirdPartyReporting": "none", "piiStored": "none", "secretsPersisted": "none", "localOnly": true } }, "security": { "trustBoundary": "single-tenant local process; not designed for multi-user hosting", "secretsPolicy": "All secrets live exclusively in environment variables loaded at startup. None are written to disk, database, logs, stdout, or any outbound request except to their designated API endpoint over HTTPS.", "defaultMode": "preview (simulated trades) — requires explicit COPY_MODE=live and all four Polymarket CLOB credentials to place real orders", "networkPolicy": "Only the five hosts listed in permissions.network.outbound are contacted. All HTTP requests use fetchWithRetry with a 10s timeout and bounded exponential backoff.", "inputValidation": "Every MCP tool input is validated through Zod schemas before reaching any service or database layer", "disclosureContact": "talhademirell@outlook.com", "disclosurePolicy": "SECURITY.md" } }