request_api_keyLABSCO SUMMARY
An agent that can hold a wallet and take a position.
This is the full trading path rather than a data feed — wallet custody, order placement and payout claiming all live here, which is why the encryption key and the database are yours and not a vendor's. Quantish has said it is winding down the platform, and the server is self-hosted precisely so it keeps running without them.
What it is
A self-hosted trading server for Polymarket. It manages the Polygon wallet, holds its key encrypted in your own database, and exposes market data, order placement, positions and settlement as calls. Most operations go through Polymarket's relayer, so they do not need MATIC for gas.
What you get
- Wallet setup with Safe integration, deposit addresses, balances and wallet status
- Private key import and export, and an API key requested for the trading account
- Live price and order book for a market
- Orders placed, listed, cancelled singly or all at once, and several submitted atomically
- Positions read on-chain or synced, and USDC or shares transferred
- Winnings listed and claimed once a market resolves
Requirements
You host it: a PostgreSQL database, a Polygon RPC endpoint, and an encryption key for the wallets it stores. Runs on any Node.js host.
Setup effort
Build from source — git clone https://github.com/joinQuantish/polymarket-mcp
USE CASES
Getting an agent ready to trade
Create the wallet, read the deposit addresses, fund it, and confirm the status and balances before any order exists.
Checking a market before taking a side
Read the current price and the order book depth, so the decision accounts for what it would cost to actually fill rather than the headline number.
Placing and managing a position
Place the order, watch the open orders, and cancel the one that is no longer wanted — or clear them all when the thesis changes.
Entering several legs at once
Submit the orders atomically when a strategy only makes sense filled together, instead of hoping three separate submissions land.
Collecting after a market resolves
List what is claimable and claim it, then move the USDC where it belongs.
Reconciling what you actually hold
Read positions from the chain and sync them against the server's record — the check worth running before you trust a balance you are about to trade on.
28 tools
Listed in project docs. Your client may show a different list.
setup_walletget_wallet_statusget_balancesget_deposit_addressesexport_private_keyimport_private_keyplace_ordercancel_ordercancel_all_ordersget_ordersexecute_atomic_ordersget_orderbookget_priceget_positionssync_positionsget_claimable_winningsclaim_winningsget_onchain_sharestransfer_usdctransfer_native_usdctransfer_sharessend_maticswap_tokensget_swap_quotelist_api_keyscreate_additional_api_keyrevoke_api_keyBEFORE YOU INSTALL
What to know first
Tools you get
28 tools named in the project's documentation.
Requires
- npx on PATH
- ENCRYPTION_KEY in your environment
- DATABASE_URL in your environment
- POLYGON_RPC_URL in your environment
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
This one is built from source rather than installed with a single command.
Server setup
git clone https://github.com/joinQuantish/polymarket-mcp
cd polymarket-mcp
npm installSet DATABASE_URL (any PostgreSQL connection string), ENCRYPTION_KEY and POLYGON_RPC_URL in the server's environment. Generate ENCRYPTION_KEY with: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
npm run db:generate
npm run db:push
npm run build
npm startMCP Clients
Claude Desktop, Cursor
Quantish's own platform is shutting down, so point this at the instance you deployed above: <YOUR_SERVER_URL> is its address (the server listens on PORT, 3000 by default, and serves MCP at /mcp) and <YOUR_API_KEY> an API key issued by that instance (its request_api_key tool creates the account and key).
{
"mcpServers": {
"polymarket": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"<YOUR_SERVER_URL>/mcp",
"--header",
"x-api-key: <YOUR_API_KEY>"
]
}
}
}The configuration on this page does not set DATABASE_URL, ENCRYPTION_KEY or POLYGON_RPC_URL, because they are not client settings. They are environment variables of the server you deploy yourself, listed in the README's Environment Variables table. The client block needs only your deployment's URL and API key.