Blog / AI agent MCP guide

How to Let an AI Agent Trade on Polymarket With Polexbot

A simple, complete MCP setup guide: install the agent server, connect a dedicated wallet, configure the strategy, start the engine, monitor real results, and stop safely.

MCP agent guide16 November 2026

The quick answer

Yes—an AI agent can now connect a wallet to Polexbot and start the Polymarket trading engine itself. The official MCP integration supports the complete workflow: wallet login, automatic developer-address derivation, balance and readiness checks, strategy configuration, engine start, positions, trades, logs, and stop.

The agent does not need your dashboard and does not receive an arbitrary “buy this now” button. It directs the existing Polexbot strategy engine, and that engine decides when an entry qualifies and signs the Polymarket orders.

What you need before starting

Node.js 20+ and an MCP client

Use an MCP-compatible agent or client that can register a local stdio server and pass environment secrets.

A dedicated Polymarket wallet

Use a separate wallet with only the funds you intend to allocate. You need its private key and available pUSD.

Clear trading limits

Decide initialBuy, maxPerTrade, maxConcurrent, bankroll, strategy, directions, and quiet hours before starting.

The official Polexbot package

Version 1.1.0 includes the MCP server, autonomous and supervised modes, a no-wallet sandbox, and reference agents.

Step 1 — Install and test the MCP server

Install the official package directly from Polexbot:

npm install -g https://www.polexbotpro.pro/downloads/polexbot-agent-integration-1.1.0.tgz

Before connecting anything real, run the sandbox. It uses 100 simulated pUSD, makes no network requests, needs no private key, and cannot place real orders:

POLEXBOT_SANDBOX=true polexbot-mcp

Step 2 — Register autonomous mode

Add this MCP server configuration in your agent client:

{
  "mcpServers": {
    "polexbot": {
      "command": "polexbot-mcp",
      "env": {
        "POLEXBOT_BASE_URL": "https://www.polexbotpro.pro",
        "POLEXBOT_AUTONOMOUS": "true"
      }
    }
  }
}

No initial bearer token or separate approval token is needed in this mode. Only enable autonomous mode for an agent you trust with the wallet key. MCP clients may retain tool arguments, so protect their logs and secret storage.

Step 3 — Let the agent connect and start

Give your agent these instructions, or adapt them into your own operating policy:

Connect my dedicated wallet with connect_wallet. If developerAddress
is omitted, derive it automatically. Never print the key or token.

Check get_balance and check_readiness. Do not continue unless ready.
Preview constellation with initialBuy 5, maxPerTrade 5, dcaMode off,
maxConcurrent 1, and bankroll 100. Stop on any validation error.

If valid, apply the patch with its unchanged previewHash. Make an
empty-patch preview and start_bot with the fresh hash.

Confirm actual state, freshness, positions, trades, and logs. Never
claim a fill without evidence. Stop_bot if limits or errors require it.
Connect the wallet

connect_wallet accepts the private key and optional developer address. The key and bearer token are not returned in the tool result.

Validate before changing anything

preview_config checks fields, ranges, entry bands, affordability, and cross-field rules. A stale hash fails closed.

Start the existing engine

start_bot requires a fresh empty-patch preview and readiness pass. It enables the strategy; it does not guarantee a trade.

Supervise the real outcome

Use state, positions, trades, and logs. stop_bot disables new activity but does not sell existing positions.

Autonomous or supervised: choose the right mode

Autonomous mode

The agent receives the private key, connects itself, applies validated settings, and starts without a second approval token. Best for a trusted agent with a dedicated wallet.

Supervised mode

A human establishes the bearer token and supplies a separate approval token for configuration and start. Best when each action needs human approval.

Read-only mode

The agent can inspect balances, configuration, state, positions, trades, logs, and readiness without changing anything.

Sandbox mode

The complete loop runs in memory without network, wallet, credentials, or real orders. Best for installation and behavior testing.

Common problems and what they mean

  • » Wallet not deployed: create and fund the Polymarket wallet first. A predicted address without deployed code cannot trade yet.
  • » Key/address mismatch: use the private key that actually owns the Polymarket developer address, not somebody else's profile address.
  • » No available pUSD: fund the wallet. Legacy USDC.e must be wrapped to pUSD before the V2 engine can use it.
  • » Bot active but no trades: inspect entry bands, consensus, skipped hours, one-direction filters, market conditions, wallet readiness, and logs. Active is not a fill guarantee.
  • » Stale preview hash: configuration changed after the preview. Preview again and use the new hash.
  • » Stopped but positions remain: that is expected. Stop prevents new activity; it does not liquidate or resolve open positions.

Safety rules worth keeping

  • » Use a dedicated limited-funds wallet, never your main treasury.
  • » Keep private keys and tokens in a secret manager and protect MCP tool-argument logs.
  • » Set hard sizing, concurrency, and bankroll limits before starting.
  • » Run one engine and one controlling writer per wallet to avoid duplicate or conflicting orders.
  • » Confirm every claimed fill in state, trades, or logs. A green botActive flag alone proves neither freshness nor execution.

Frequently asked questions

Does the agent need my Polymarket developer address?

No. It is optional. The MCP server derives the deployed Polymarket wallet candidates from the private key and selects the address with on-chain code.

Does connecting the wallet immediately start trading?

No. Connection establishes the account session. Real activity begins only after a successful start_bot call with a fresh configuration hash and readiness pass.

Can the agent place any arbitrary order?

No. It configures and controls the existing strategy engine. The engine evaluates entries, signs orders, and manages activity within the selected strategy.

Does stop_bot sell open positions?

No. It disables new bot activity. Open positions remain and must be handled through engine operation and market resolution.

Give your agent the complete operating manual

The Agents page contains the full copy-ready setup, tool reference, operating sequence, error meanings, REST examples, and security checklist. The MCP page adds supervised configuration, discovery resources, and runnable reference agents.

Start with the sandbox, then decide what to authorize.

Use a dedicated wallet, hard limits, and one controlling agent. No agent, strategy, or automation guarantees profits.

Open the complete Agents guide Open the MCP reference

Polexbot is independent software and is not affiliated with Polymarket. Trading involves real financial risk. This guide is documentation, not financial advice.