by japp-fi
polymarket mcp server market discovery and analysis via public APIs; optional authenticated trading and portfolio tools when your wallet derives (or supplies) CLOB L2 credentials polymarket mcp server market discovery and analysis via public APIs; optional authenticated trading and portfolio tools when your wallet derives (or supplies) CLOB L2
# Add to your Claude Code skills
git clone https://github.com/japp-fi/polymarket-mcp-serverGuides for using mcp servers skills like polymarket-mcp-server.
Last scanned: 5/30/2026
{
"issues": [
{
"type": "clone-failed",
"message": "Could not clone repository",
"severity": "medium"
}
],
"status": "WARNING",
"scannedAt": "2026-05-30T16:14:25.124Z",
"npmAuditRan": false,
"pipAuditRan": false
}polymarket-mcp-server is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by japp-fi. polymarket mcp server market discovery and analysis via public APIs; optional authenticated trading and portfolio tools when your wallet derives (or supplies) CLOB L2 credentials polymarket mcp server market discovery and analysis via public APIs; optional authenticated trading and portfolio tools when your wallet derives (or supplies) CLOB L2. It has 142 GitHub stars.
polymarket-mcp-server returned warnings in SkillsLLM's automated security scan. It has no critical vulnerabilities, but review the flagged issues in the Security Report section before adding it to your workflow.
Clone the repository with "git clone https://github.com/japp-fi/polymarket-mcp-server" and add it to your Claude Code skills directory (see the Installation section above).
polymarket-mcp-server is primarily written in TypeScript. It is open-source under japp-fi on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh polymarket-mcp-server against similar tools.
No comments yet. Be the first to share your thoughts!
Requires a passing catalog security scan. Resolve the flagged issues and resubmit to enable featuring.
Model Context Protocol (MCP) server for Polymarket: market discovery and analysis via public APIs; optional authenticated trading and portfolio tools when your wallet derives (or supplies) CLOB L2 credentials.
Requires Node.js 18+.
| Area | Requires L2 / wallet |
|---|---|
Resources (polymarket://status, polymarket://config, polymarket://rate-limits) |
Partial (status reflects auth) |
| Market discovery (search, trending, categories, …) | No |
| Market analysis (order book, prices, volume, …) | No (some calls use anonymous CLOB) |
| Trading (place/cancel orders, smart trade, …) | Yes |
| Portfolio (positions, PnL, history, …) | Yes |
| Realtime WebSocket subscriptions | User streams need API credentials + auth |
Trading and portfolio handlers are registered only after the CLOB client has L2 credentials (derived from your signing key via deriveApiKey with a createApiKey fallback, or supplied manually — see below).
This codebase does not bundle @jsr/hk__polymarket or fastmcp; Gamma/Data API flows use plain HTTP like the rest of the server.
Feature parity additions inspired by @iqai/mcp-polymarket include: POLYGON_RPC_URL, POLYMARKET_PRIVATE_KEY (alias), CHAIN_ID / CLOB_API_BASE, POLYMARKET_FUNDER / FUNDER_ADDRESS, SIGNATURE_TYPE (defaults to GNOSIS-safe style when a funder is set), Gamma tools (get_market_by_slug, get_event_by_slug, gamma_public_search, tag listing, paginated markets), get_positions (Data API), CLOB get_balance_allowance / update_balance_allowance, place_limit_order_token / place_market_order_token, approve_allowances, redeem_positions, optional approval checks before mutating trades, and NegRisk-aware Polygon contract addresses.
From the repo root:
git clone https://github.com/japp-fi/polymarket-mcp-server
cd polymarket-mcp-server
npm install
npm run build
Development (TypeScript directly):
npm run dev
Production (compiled):
npm start
The server reads environment variables via dotenv (place a .env file in the working directory).
.env.exampleCopy .env.example to .env and fill in values. Never commit real keys.
DEMO_MODE=true skips a funded wallet. Gamma/Data discovery (including get_positions) remains available unless a tool explicitly needs credentials.
Live trading
Provide POLYGON_ADDRESS plus POLYGON_PRIVATE_KEY (or POLYMARKET_PRIVATE_KEY, IQAI-compatible alias). Optionally set POLYGON_RPC_URL (defaults https://polygon-rpc.com) for on-chain approve_allowances / redeem_positions.
Browser-wallet users commonly fund a Polymarket proxy / Safe separately from the EIP-1193 signer. Mirror their env:
POLYMARKET_FUNDER or FUNDER_ADDRESS – USDC custodian address shown in the Polymarket UI (0x…)SIGNATURE_TYPE – 2 selects POLY_GNOSIS_SAFE ordering (the default whenever a non-empty POLYMARKET_FUNDER is present). Use 1 (POLY_PROXY) for Magic-email flows.| Variable | Meaning |
|---|---|
POLYGON_RPC_URL |
JSON-RPC endpoint for Polygon (on-chain tooling + faster reads) |
POLYMARKET_PRIVATE_KEY |
Alias of POLYGON_PRIVATE_KEY |
CHAIN_ID |
Overrides POLYMARKET_CHAIN_ID when supplied |
CLOB_API_BASE |
Overrides / fills CLOB_API_URL (IQAI spelling) |
Polymarket’s ApiKeyCreds have three separate fields: key, secret, and passphrase. Set:
| Variable | Maps to |
|---|---|
POLYMARKET_API_KEY |
API key (key) |
POLYMARKET_SECRET |
HMAC secret (secret) |
POLYMARKET_PASSPHRASE |
Passphrase (passphrase) |
If you previously used POLYMARKET_API_KEY_NAME as the key string, you can still set only that (with POLYMARKET_API_KEY empty) — it is treated as an alias for key. You must also set POLYMARKET_SECRET and POLYMARKET_PASSPHRASE; the secret and passphrase are not interchangeable.
If any of the three are missing, the server falls back to derive from the wallet (recommended in the official CLOB client README).
Defaults are in src/config.ts. Notable env vars:
MAX_ORDER_SIZE_USD, MAX_TOTAL_EXPOSURE_USD, MAX_POSITION_SIZE_PER_MARKETMIN_LIQUIDITY_REQUIRED, MAX_SPREAD_TOLERANCEENABLE_AUTONOMOUS_TRADING, REQUIRE_CONFIRMATION_ABOVE_USD, AUTO_CANCEL_ON_LARGE_SPREADCLOB_API_URL, GAMMA_API_URL (defaults point at Polymarket production)This server speaks stdio MCP. Example for Cursor mcp.json:
{
"mcpServers": {
"polymarket": {
"command": "node",
"args": ["/absolute/path/to/polymarket-mcp-server/dist/server.js"],
"env": {
"DEMO_MODE": "true"
}
}
}
}
For live trading, remove DEMO_MODE and pass POLYGON_PRIVATE_KEY (or POLYMARKET_PRIVATE_KEY), POLYGON_ADDRESS, optional POLYGON_RPC_URL / POLYMARKET_FUNDER / SIGNATURE_TYPE, and optionally explicit CLOB credentials via env or a .env next to the process working directory.
.env only on trusted machines, and review Polymarket’s own docs for key rotation.MIT (see package metadata).