Polmexbot MCP Server
OfficialProvides wallet readiness and approval capabilities on Polygon, including inspecting pUSD and POL balances, Exchange V2 allowance, approval caps, and gas estimates, and optionally broadcasting a capped pUSD approval for direct EOA wallets.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Polmexbot MCP Server Check if my wallet is ready, then preview the current bot config."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Polmexbot MCP Server
Official Model Context Protocol (MCP) server, no-wallet in-memory sandbox, and reference AI agents for Polmexbot (also compatible with polmexbot.pro) — an automated Polymarket trading engine for 5-minute crypto up/down rounds (BTC, ETH, SOL, XRP, DOGE, BNB).
Polmexbot exposes structured tools for wallet readiness, configuration preview & validation, engine start/stop, positions, trades, and live logs. It controls Polmexbot's existing strategy engine (constellation, aistrat, aces, custom) and does not expose arbitrary buy/sell or market-making order placement.
Quickstart (No Wallet Required — Sandbox)
Run directly with npx (Node.js 20+ required) — zero setup, zero network calls, 100 simulated pUSD:
Claude Desktop / Cursor / Claude Code / Windsurf
Add this to your MCP client config (claude_desktop_config.json, .cursor/mcp.json, or .mcp.json):
{
"mcpServers": {
"polmexbot": {
"command": "npx",
"args": ["-y", "github:PolmexBot/polmexbot-mcp"],
"env": {
"POLMEXBOT_SANDBOX": "true"
}
}
}
}Or install globally from GitHub:
npm install -g github:PolmexBot/polmexbot-mcp
POLMEXBOT_SANDBOX=true polmexbot-mcpOfficial site endpoints: Default API base URL is
https://www.polmexbot.xyz. To targetpolmexbot.pro, set"POLMEXBOT_BASE_URL": "https://www.polmexbot.pro". LegacyPOLMEXBOTXYZ_*andPOLMEXBOTPRO_*environment prefixes are also supported automatically.
Region note for live API calls: Live Polmexbot API endpoints follow Polymarket regional restrictions (US IPs receive HTTP
451). Sandbox mode works anywhere with no network calls; for live trading, run your MCP client / agent server outside the US (e.g. EU or Asia).
Related MCP server: Polymarket MCP Server
Operating Modes
1. Live Read-Only Mode (Default)
A human connects their account via Polmexbot Settings (or polmexbot.pro/settings) and passes only the bearer token:
{
"mcpServers": {
"polmexbot": {
"command": "npx",
"args": ["-y", "github:PolmexBot/polmexbot-mcp"],
"env": {
"POLMEXBOT_BASE_URL": "https://www.polmexbot.xyz",
"POLMEXBOT_TOKEN": "your-account-bearer-token"
}
}
}
}Connecting alone never starts trading. Only read-only and configuration-preview tools are registered.
2. Supervised Approval-Gated Controls
Require an explicit human approval token + immutable previewHash before applying configuration changes or starting the engine:
{
"mcpServers": {
"polmexbot": {
"command": "npx",
"args": ["-y", "github:PolmexBot/polmexbot-mcp"],
"env": {
"POLMEXBOT_BASE_URL": "https://www.polmexbot.xyz",
"POLMEXBOT_TOKEN": "your-account-bearer-token",
"POLMEXBOT_ENABLE_CONTROLS": "true",
"POLMEXBOT_APPROVAL_TOKEN": "owner-created-approval-secret"
}
}
}
}Call
preview_configand show the owner the exact diff.Call
apply_configwith the unchangedpreviewHashand ownerapprovalToken.Call
preview_configwith{}and thenstart_botwith the freshpreviewHash+approvalToken(requires a passingcheck_readiness).Call
stop_botat any time without an approval token (stops new activity; does not sell open positions).
3. Autonomous Mode (Dedicated Wallet Key)
For trusted autonomous agents managing a dedicated, limited-funds Polygon wallet:
{
"mcpServers": {
"polmexbot": {
"command": "npx",
"args": ["-y", "github:PolmexBot/polmexbot-mcp"],
"env": {
"POLMEXBOT_BASE_URL": "https://www.polmexbot.xyz",
"POLMEXBOT_AUTONOMOUS": "true"
}
}
}
}Call
connect_walletwithprivateKey(optionaldeveloperAddressis derived automatically for Polymarket deposit/proxy wallets). Neither key nor bearer token is returned in tool results.Call
check_readinessandpreview_config.Call
apply_configwith the unchangedpreviewHash, then an emptypreview_config→start_bot.Confirm live execution via
get_bot_state,get_positions,get_trades, andget_logs.
4. Direct EOA Mode (No Polymarket Website Required)
If a dedicated EOA already holds pUSD (and a little POL for approval gas) on Polygon:
Call
connect_wallet({ privateKey, walletMode: "eoa" })(omitdeveloperAddress).Call
prepare_eoa_wallet({ approve: false })to inspect pUSD, POL, Exchange V2 allowance, cap, and estimated gas without broadcasting.If allowance is required, call
prepare_eoa_wallet({ approve: true })to broadcast a capped pUSD approval.Proceed with
check_readiness→preview_config→apply_config→ emptypreview_config→start_bot.
Available MCP Tools
Tool | Mode | Purpose |
| Read-only | Returns integration mode, active base URL, mirrors, and doc links (no auth). |
| Read-only | Public BTC, ETH, SOL, XRP, and BNB price snapshot (no auth). |
| Read-only | Authenticated account, strategy config, wallet-link metadata, stats (keys redacted). |
| Read-only | pUSD, USDC.e, POL, open-position value, live bankroll, warnings, restrictions. |
| Read-only | Requested & live engine state, freshness, positions, recent trades, notices. |
| Read-only | Current open positions plus engine freshness flags. |
| Read-only | Up to 200 persisted resolved trades and aggregate statistics. |
| Read-only | Engine activity, skips, errors, and trade-result logs. |
| Read-only | Verifies deployment, key/wallet pairing, collateral, and readiness (no tx). |
| Read-only | Validates a partial config patch and returns diff, warnings, and |
| Autonomous | Connects a dedicated wallet key (Polymarket account or direct EOA) in memory. |
| Control | Inspects or sends a capped pUSD Exchange V2 approval in direct EOA mode. |
| Control | Saves validated configuration after matching |
| Control | Starts strategy execution after fresh empty preview + readiness pass. |
| Control | Stops new engine activity without approval token (does not liquidate positions). |
Reference Agents & Local Development
git clone https://github.com/PolmexBot/polmexbot-mcp.git
cd polmexbot-mcp
npm install
npm test
# Sandbox reference agents (zero network calls)
node examples/read-only-monitor.mjs --sandbox
node examples/supervised-agent.mjs --sandbox
node examples/supervised-agent.mjs --sandbox --approve
node examples/autonomous-agent.mjs --sandbox
node examples/autonomous-agent.mjs --sandbox --eoa
node examples/alert-agent.mjs --sandboxMachine Discovery & Official Links
Resource | polmexbot.xyz | polmexbot.pro |
MCP Guide | ||
REST API Guide | ||
OpenAPI 3.1 | ||
| ||
Markdown Guide | ||
OAuth Metadata | https://www.polmexbot.xyz/.well-known/oauth-protected-resource | https://www.polmexbot.pro/.well-known/oauth-protected-resource |
Security
Always use a dedicated, limited-funds wallet for automated trading.
Never place private keys or bearer tokens in prompts, command-line arguments, or source control.
Protect MCP client logs, as some clients record tool call arguments.
Never use Hardhat/Anvil/example test keys in live mode.
Stopping the bot disables new trades; it does not liquidate existing open positions.
License
Available Tools
14 toolsapply_configApply an approved strategy changeADestructiveIdempotent
Saves real strategy configuration. First call preview_config and show the owner the exact diff. Requires the owner-provided approvalToken and the unchanged previewHash.
Inputs: patch (required), previewHash (required), approvalToken (required).
check_readinessCheck trading readinessARead-onlyIdempotent
Verifies wallet deployment, key/developer-address pairing, collateral, and trading readiness without submitting a transaction or starting the bot.
Inputs: no named parameters.
get_accountGet account and configurationARead-onlyIdempotent
Gets the authenticated account, current strategy configuration, wallet-link metadata, recent trades, and statistics. Private keys are redacted by the API.
Inputs: no named parameters.
get_balanceGet wallet balanceBRead-onlyIdempotent
Gets pUSD, USDC.e, POL, open-position value, live bankroll, deployment, wallet-link warnings, and restrictions.
Inputs: no named parameters.
get_bot_stateGet engine stateARead-onlyIdempotent
Gets requested and actual engine state, freshness, open positions, recent trades, notices, and statistics.
Inputs: no named parameters.
get_logsGet activity logsBRead-onlyIdempotent
Gets engine activity, skips, errors, and durable trade-result logs.
Inputs: no named parameters.
get_positionsGet open positionsARead-onlyIdempotent
Gets open positions from the current engine state. An empty array does not prove the wallet is flat if the engine state is stale; inspect get_bot_state and Polymarket before reporting.
Inputs: no named parameters.
get_public_pricesGet public crypto pricesARead-onlyIdempotent
Gets the current public BTC, ETH, SOL, XRP, and BNB price snapshot. No account credentials required.
Inputs: no named parameters.
get_server_infoGet Polmexbot integration informationARead-onlyIdempotent
Returns integration mode, documentation links, and whether control tools are enabled. No credentials required.
Inputs: no named parameters.
get_tradesGet persisted tradesARead-onlyIdempotent
Gets up to 200 persisted resolved trades and all-time aggregate statistics.
Inputs: no named parameters.
prepare_eoa_walletCheck or approve direct EOA collateralADestructiveIdempotent
For an account connected with walletMode=eoa. Reads pUSD, POL, estimated approval gas, and the pUSD allowance to Polymarket Exchange V2. approve=false sends no transaction. approve=true explicitly broadcasts a capped pUSD approval from the user EOA; it never wraps, swaps, or starts the bot.
Inputs: approve, amountUsd, approvalToken.
preview_configPreview and validate a strategy changeARead-onlyIdempotent
Read-only. Merges a partial strategy patch with the current configuration, validates keys, ranges, affordability, and cross-field rules, and returns the exact diff plus a previewHash required for apply_config or start_bot. No settings are saved.
Inputs: patch (required).
start_botStart the real trading engineADestructiveIdempotent
Starts real Polymarket strategy execution after a fresh configuration preview, readiness check, and owner approval. There is no arbitrary buy/sell tool. Requires approvalToken and a previewHash from preview_config with an empty patch.
Inputs: previewHash (required), approvalToken (required).
stop_botStop new bot activityADestructiveIdempotent
Stops new strategy activity without requiring an approval token. This does not sell existing positions or guarantee immediate cancellation of already-submitted activity.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Most tools have clear distinct purposes, but the read-side cluster (get_account, get_balance, get_bot_state, get_trades, get_positions) overlaps heavily, since several return positions, trades, and statistics from different sources. The descriptions do explain the difference (persisted trades vs live engine state vs staleness caveat), so an agent can reason it out, but it takes careful reading.
All 14 tools use snake_case verb-first names (get_*, check_*, start_*, stop_*, preview_*, prepare_*, apply_*), forming a predictable pattern. There are no mixed conventions or cryptic abbreviations beyond the standard 'eoa' qualifier.
At 14 tools the surface is well within the ideal range and each tool maps to a real operation (read state, validate config, mutate config, lifecycle control, wallet prep). Nothing appears to be filler, and the read tools, while numerous, correspond to genuinely different data sources.
The control loop is covered (preview -> apply -> readiness -> start/stop), but there is no path to exit or manage existing positions, no order cancellation or inspection, and stop_bot explicitly does not sell. The absence of any sell/close tool is a deliberate safety design, yet it leaves a notable dead end for an agent asked to unwind exposure.
Maintenance
Related MCP Connectors
Calibrated world model for AI agents. 40 tools: world state, markets, trading. Kalshi + Polymarket.
Polymarket + Hyperliquid + macro for AI agents. 38 tools, signal backtest, SSE streaming. Free tier.
The trading toolkit for your AI. Strategies, settings, and reported activity in one workspace.
Trading tools for AI agents: token risk checks, swap quotes, unsigned swaps, holdings on 5 chains.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables Claude to autonomously trade, analyze, and manage positions on Polymarket prediction markets with 45 comprehensive tools including market discovery, real-time monitoring, portfolio management, and AI-powered trading recommendations with enterprise-grade safety features.25755MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to autonomously trade, analyze, and manage positions on Polymarket prediction markets with 45 comprehensive tools covering market discovery, analysis, trading execution, portfolio management, and real-time monitoring with enterprise-grade safety features.MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to discover prediction markets, view real-time data, execute trades (market/limit orders), and manage portfolios on Polymarket.631 npm3MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to autonomously trade, analyze, and manage positions on Polymarket prediction markets with 45 tools, real-time WebSocket monitoring, and enterprise-grade safety features.MIT