Install the official MCP package
One versioned package contains the server, sandbox, and four reference agents.
connect_wallet derives the deployed Polymarket developer address when it is omitted.npm install -g https://www.polexbot24.com/downloads/polexbot24-agent-integration-1.1.0.tgz
Register polexbot24-mcp as a stdio MCP server in your MCP-compatible client. Use the client's environment-secret support rather than putting tokens in command arguments.
Test the complete loop without a wallet
The in-memory sandbox makes no network requests and cannot place real orders.
POLEXBOT24_SANDBOX=true polexbot24-mcp
The sandbox starts with 100 simulated pUSD, no positions, and no trade history. It supports balance, readiness, configuration preview and validation, simulated wallet login, configuration and start, state/logs, and stop.
sandbox:true.Connect live read-only access
A human establishes the account first; the agent receives only its bearer token.
Connect through Settings or the documented /api/wallet/connect exchange, then store the returned account token in your MCP client's secret environment. Connecting alone never starts trading.
{
"mcpServers": {
"polexbot24": {
"command": "polexbot24-mcp",
"env": {
"POLEXBOT24_BASE_URL": "https://www.polexbot24.com",
"POLEXBOT24_TOKEN": "existing-account-bearer-token"
}
}
}
}| Tool | Purpose |
|---|---|
get_account | Safe account, current configuration, recent trades, and statistics. |
get_balance | pUSD, USDC.e, positions value, bankroll, warnings, and restrictions. |
get_bot_state · get_positions | Requested and actual engine state, freshness, and open positions. |
get_trades · get_logs | Persisted results, engine events, skips, and errors. |
check_readiness | Wallet deployment, pairing, collateral, and readiness without a transaction. |
preview_config | Validated proposed configuration, exact diff, warnings, and previewHash; never saves. |
get_public_prices | Public crypto prices without account credentials. |
Choose supervised or fully autonomous trading
Both modes validate configuration and wallet readiness before starting the existing engine.
Autonomous: agent connects the wallet and starts by itself
Enable POLEXBOT24_AUTONOMOUS=true. No initial bearer token or approval token is needed.
{
"mcpServers": {
"polexbot24": {
"command": "polexbot24-mcp",
"env": {
"POLEXBOT24_BASE_URL": "https://www.polexbot24.com",
"POLEXBOT24_AUTONOMOUS": "true"
}
}
}
}- Call
connect_walletwithprivateKey. The optionaldeveloperAddressis derived automatically when omitted. - The tool caches only the returned bearer token in memory; neither the private key nor token appears in its result.
- Call
preview_config, thenapply_configwith the unchanged hash. No separate approval token is required. - Make an empty-patch preview and call
start_botwith its fresh hash. Start still requires a successful readiness check. - Monitor state, positions, trades, and logs. Use
stop_botat any time.
Supervised: bearer token plus owner approval
{
"mcpServers": {
"polexbot24": {
"command": "polexbot24-mcp",
"env": {
"POLEXBOT24_BASE_URL": "https://www.polexbot24.com",
"POLEXBOT24_TOKEN": "existing-account-bearer-token",
"POLEXBOT24_ENABLE_CONTROLS": "true",
"POLEXBOT24_APPROVAL_TOKEN": "owner-created-approval-secret"
}
}
}
}- Call
preview_configand show the owner the exact diff. - Pass its
previewHashand the owner-provided approval token toapply_config. - For
start_bot, make an empty-patch preview, then pass its hash and approval token after a fresh readiness check. - Use
stop_botto disable new activity. No approval token is required for stop.
maxPerTrade < initialBuy.Run the reference agents
Unpack the same versioned package to inspect and run working examples.
mkdir polexbot24-agent && cd polexbot24-agent curl -fsSLO https://www.polexbot24.com/downloads/polexbot24-agent-integration-1.1.0.tgz tar -xzf polexbot24-agent-integration-1.1.0.tgz cd package npm install # Read-only account monitor node examples/read-only-monitor.mjs --sandbox # Read-only configuration preview node examples/supervised-agent.mjs --sandbox # Full simulated preview → approval → start → logs → stop node examples/supervised-agent.mjs --sandbox --approve # Autonomous key login → configure → start → logs → stop node examples/autonomous-agent.mjs --sandbox # State-change alerts; optionally set ALERT_WEBHOOK_URL node examples/alert-agent.mjs --sandbox
The supervised and autonomous examples stop immediately after their demonstrations unless --keep-running is supplied. For a live autonomous run, set POLEXBOT24_PRIVATE_KEY in the environment and add --execute. The alert agent supports ALERT_WEBHOOK_URL, ALERT_INTERVAL_MS, and ALERT_ITERATIONS.
Machine discovery and documentation
Give agents structured contracts instead of asking them to scrape HTML.
| Resource | Address |
|---|---|
| OpenAPI 3.1 | polexbot24.com/openapi.json |
| LLM discovery | polexbot24.com/llms.txt |
| Markdown integration guide | polexbot24.com/agents.md |
| REST and authentication guide | polexbot24.com/agents |
| OAuth resource metadata | /.well-known/oauth-protected-resource |
| Versioned integration package | Download tarball |
ok; many failures use HTTP 200 with ok:false. Readiness can be ok:true with ready:false. botActive is only the requested flag — confirm freshness and fills through state, trades, and logs.