{"_id":"@c0pilot/mcp-polymarket","_rev":"5-a4276ba9f459e4ff8088113de0e5f298","name":"@c0pilot/mcp-polymarket","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@c0pilot/mcp-polymarket","version":"1.0.0","keywords":["mcp","polymarket","prediction-markets","trading","crypto","clob","model-context-protocol"],"author":{"name":"unsanction"},"license":"MIT","_id":"@c0pilot/mcp-polymarket@1.0.0","maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"homepage":"https://github.com/unsanction/mcp-polymarket#readme","bugs":{"url":"https://github.com/unsanction/mcp-polymarket/issues"},"bin":{"mcp-polymarket":"build/index.js"},"dist":{"shasum":"c1d59d9223aaf915506140f65eac1655ceecc9ac","tarball":"https://registry.npmjs.org/@c0pilot/mcp-polymarket/-/mcp-polymarket-1.0.0.tgz","fileCount":20,"integrity":"sha512-6Qth06AWYiqI+B2sOkvGV4hhC3caKOlHeHVltlAOjKpehewlJZvyILBGDP8jn58qRsGb+EC5Ar8o15ZE27T2XQ==","signatures":[{"sig":"MEUCIG9eLfJmEY/1o5H078lHFwY91LFvb9mc1gGuAfvG6tPLAiEAlnNpVPWUZsRAej4GbRpnFwCiquBrZWB2+zkfqofCwLU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32388},"main":"./build/index.js","type":"module","types":"./build/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./build/index.d.ts","default":"./build/index.js"},"./types":{"types":"./build/types.d.ts","default":"./build/types.js"},"./client":{"types":"./build/client.d.ts","default":"./build/client.js"},"./config":{"types":"./build/config.d.ts","default":"./build/config.js"}},"gitHead":"aa655a4ed1224e6715f36ceedb040d97de55234e","scripts":{"test":"vitest run","build":"tsc && chmod 755 build/index.js","clean":"rm -rf build","start":"node build/index.js","test:e2e":"vitest run e2e","prepublishOnly":"npm run build"},"_npmUser":{"name":"c0pilot","email":"5349983@gmail.com"},"repository":{"url":"git+https://github.com/unsanction/mcp-polymarket.git","type":"git"},"_npmVersion":"11.7.0","description":"MCP server and client library for Polymarket prediction markets - trade, browse markets, manage positions","directories":{},"_nodeVersion":"24.5.0","dependencies":{"zod":"^3.22.0","ethers":"^6.16.0","@polymarket/clob-client":"^5.2.1","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"dotenv":"^17.2.3","vitest":"^4.0.18","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-polymarket_1.0.0_1770225884087_0.8421150082475255","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@c0pilot/mcp-polymarket","version":"1.0.1","keywords":["mcp","polymarket","prediction-markets","trading","crypto","clob","model-context-protocol"],"author":{"name":"c0pilot"},"license":"MIT","_id":"@c0pilot/mcp-polymarket@1.0.1","maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"homepage":"https://github.com/unsanction/mcp-polymarket#readme","bugs":{"url":"https://github.com/unsanction/mcp-polymarket/issues"},"bin":{"mcp-polymarket":"build/index.js"},"dist":{"shasum":"2a97eb55184bf0498acc324e6b0a2364c139919a","tarball":"https://registry.npmjs.org/@c0pilot/mcp-polymarket/-/mcp-polymarket-1.0.1.tgz","fileCount":20,"integrity":"sha512-PFH+ecsZAMdx+B3Af3Y2H/2o6LHInPQ/cPRHPVJiFTgHxIjVAIwSgdaJ5DfiszgzkBUhyYCjSLZJNCLYpp68mQ==","signatures":[{"sig":"MEUCIQCPAX/etHcoJ6+SX0epUznMcRsnA6OXN15fpZ1261lwwAIgWEvfeLkwmfRsK52MKsc66Uegw2pLHg9B6O076hvhahE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32530},"main":"./build/index.js","type":"module","types":"./build/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./build/index.d.ts","default":"./build/index.js"},"./types":{"types":"./build/types.d.ts","default":"./build/types.js"},"./client":{"types":"./build/client.d.ts","default":"./build/client.js"},"./config":{"types":"./build/config.d.ts","default":"./build/config.js"}},"gitHead":"1a1847b6dfa5ea229a0c24f4153f22fdb11e99b8","scripts":{"test":"vitest run","build":"tsc && chmod 755 build/index.js","clean":"rm -rf build","start":"node build/index.js","test:e2e":"vitest run e2e","prepublishOnly":"npm run build"},"_npmUser":{"name":"c0pilot","email":"5349983@gmail.com"},"repository":{"url":"git+https://github.com/unsanction/mcp-polymarket.git","type":"git"},"_npmVersion":"11.7.0","description":"MCP server and client library for Polymarket prediction markets - trade, browse markets, manage positions","directories":{},"_nodeVersion":"24.5.0","dependencies":{"zod":"^3.22.0","ethers":"^6.16.0","@polymarket/clob-client":"^5.2.1","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"dotenv":"^17.2.3","vitest":"^4.0.18","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-polymarket_1.0.1_1770234341617_0.7099131071609903","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@c0pilot/mcp-polymarket","version":"1.0.2","keywords":["mcp","polymarket","prediction-markets","trading","crypto","clob","model-context-protocol"],"author":{"name":"c0pilot"},"license":"MIT","_id":"@c0pilot/mcp-polymarket@1.0.2","maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"homepage":"https://github.com/unsanction/mcp-polymarket#readme","bugs":{"url":"https://github.com/unsanction/mcp-polymarket/issues"},"bin":{"mcp-polymarket":"build/index.js"},"dist":{"shasum":"946546038a302c091159439bc714c27e686a2dc5","tarball":"https://registry.npmjs.org/@c0pilot/mcp-polymarket/-/mcp-polymarket-1.0.2.tgz","fileCount":20,"integrity":"sha512-1RlVT0CU5v+3pqH0uK6m37aqAS7Kvw2Amqh3bCuiX6PlJgm0uGERdlXWvocacqla3bYnGZ2gJB2j6/GG2skcpQ==","signatures":[{"sig":"MEUCIAPWbWc8vEabJObWlrwJ0gnkyKwQiqiciZt/7p/aIjFXAiEA7hJ/t/c7o7s85RvuE/ZFa0L03O2gPdr97VqXX2APHIc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32650},"main":"./build/index.js","type":"module","types":"./build/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./build/index.d.ts","default":"./build/index.js"},"./types":{"types":"./build/types.d.ts","default":"./build/types.js"},"./client":{"types":"./build/client.d.ts","default":"./build/client.js"},"./config":{"types":"./build/config.d.ts","default":"./build/config.js"}},"gitHead":"9ea988b89ea70722ac665f4e350b90832e1aaf4c","scripts":{"test":"vitest run","build":"tsc && chmod 755 build/index.js","clean":"rm -rf build","start":"node build/index.js","test:e2e":"vitest run e2e","prepublishOnly":"npm run build"},"_npmUser":{"name":"c0pilot","email":"5349983@gmail.com"},"repository":{"url":"git+https://github.com/unsanction/mcp-polymarket.git","type":"git"},"_npmVersion":"11.7.0","description":"MCP server and client library for Polymarket prediction markets - trade, browse markets, manage positions","directories":{},"_nodeVersion":"24.5.0","dependencies":{"zod":"^3.22.0","ethers":"^6.16.0","@polymarket/clob-client":"^5.2.1","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"dotenv":"^17.2.3","vitest":"^4.0.18","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-polymarket_1.0.2_1770248906087_0.34067880793743277","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@c0pilot/mcp-polymarket","version":"1.0.3","keywords":["mcp","polymarket","prediction-markets","trading","crypto","clob","model-context-protocol"],"author":{"name":"c0pilot"},"license":"MIT","_id":"@c0pilot/mcp-polymarket@1.0.3","maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"homepage":"https://github.com/unsanction/mcp-polymarket#readme","bugs":{"url":"https://github.com/unsanction/mcp-polymarket/issues"},"bin":{"mcp-polymarket":"build/index.js"},"dist":{"shasum":"14e7ce6bdd47f049095d6abf52448a969ade5bfa","tarball":"https://registry.npmjs.org/@c0pilot/mcp-polymarket/-/mcp-polymarket-1.0.3.tgz","fileCount":20,"integrity":"sha512-NxNQylRxcz+O/U0vd9uTKwoK+WSTMf+EeluySquBx4Mx7NMA8OUAgjOsFSeM9lXvas5IrtxvtgBuxXDY/tuMmg==","signatures":[{"sig":"MEUCIBwdtTDC67JuV0LYZrPj7D8UE3/kstwO4Aol/BWglBWPAiEA2D2tG/22bjHIZy9wX6UYfyeFKfqWgoyA1CDej8IsxSg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38654},"main":"./build/index.js","type":"module","types":"./build/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./build/index.d.ts","default":"./build/index.js"},"./types":{"types":"./build/types.d.ts","default":"./build/types.js"},"./client":{"types":"./build/client.d.ts","default":"./build/client.js"},"./config":{"types":"./build/config.d.ts","default":"./build/config.js"}},"gitHead":"865b9e6ed0ff4ca26b6559f23d8bddbd45ec6f11","scripts":{"test":"vitest run","build":"tsc && chmod 755 build/index.js","clean":"rm -rf build","start":"node build/index.js","test:e2e":"vitest run e2e","prepublishOnly":"npm run build"},"_npmUser":{"name":"c0pilot","email":"5349983@gmail.com"},"repository":{"url":"git+https://github.com/unsanction/mcp-polymarket.git","type":"git"},"_npmVersion":"11.7.0","description":"MCP server and client library for Polymarket prediction markets - trade, browse markets, manage positions","directories":{},"_nodeVersion":"24.5.0","dependencies":{"zod":"^3.22.0","ethers":"^6.16.0","@polymarket/clob-client":"^5.2.1","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"dotenv":"^17.2.3","vitest":"^4.0.18","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-polymarket_1.0.3_1770410967409_0.47023225626321463","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@c0pilot/mcp-polymarket","version":"1.0.4","description":"MCP server and client library for Polymarket prediction markets - trade, browse markets, manage positions","type":"module","main":"./build/index.js","types":"./build/index.d.ts","exports":{".":{"types":"./build/index.d.ts","default":"./build/index.js"},"./client":{"types":"./build/client.d.ts","default":"./build/client.js"},"./config":{"types":"./build/config.d.ts","default":"./build/config.js"},"./types":{"types":"./build/types.d.ts","default":"./build/types.js"}},"bin":{"mcp-polymarket":"build/index.js"},"scripts":{"build":"tsc && chmod 755 build/index.js","start":"node build/index.js","test":"vitest run","test:e2e":"vitest run e2e","clean":"rm -rf build","prepublishOnly":"npm run build"},"keywords":["mcp","polymarket","prediction-markets","trading","crypto","clob","model-context-protocol"],"author":{"name":"c0pilot"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unsanction/mcp-polymarket.git"},"homepage":"https://github.com/unsanction/mcp-polymarket#readme","bugs":{"url":"https://github.com/unsanction/mcp-polymarket/issues"},"engines":{"node":">=18.0.0"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","@polymarket/clob-client":"^5.2.1","ethers":"^6.16.0","zod":"^3.22.0"},"devDependencies":{"@types/node":"^20.0.0","dotenv":"^17.2.3","typescript":"^5.0.0","vitest":"^4.0.18"},"gitHead":"8966fbdf2c25f9d7e39d0d252c2424ca7a86c9f0","_id":"@c0pilot/mcp-polymarket@1.0.4","_nodeVersion":"24.5.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-GXRzqTP9i4SCoLF7D5qQ9b7STdKngUOD+Kro49/ss9yg7G6uUIqt6VWc9WFfXQqtZlidmpZtw68VY50UP0uLOQ==","shasum":"b48de78ab76b6a8b647fed8c72e6f674c8f6f6b3","tarball":"https://registry.npmjs.org/@c0pilot/mcp-polymarket/-/mcp-polymarket-1.0.4.tgz","fileCount":22,"unpackedSize":44039,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD9qQOjWfcEAH87atVL4BqguKkkTCZi/rggGfQe8C+XUAIgKNe6IhRDoQhpb8kj4rxNAJn9Y963U2iuI6IOno4jMhg="}]},"_npmUser":{"name":"c0pilot","email":"5349983@gmail.com"},"directories":{},"maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-polymarket_1.0.4_1770662844116_0.34280028998543366"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-04T17:24:43.993Z","modified":"2026-02-09T18:47:24.383Z","1.0.0":"2026-02-04T17:24:44.269Z","1.0.1":"2026-02-04T19:45:41.769Z","1.0.2":"2026-02-04T23:48:26.252Z","1.0.3":"2026-02-06T20:49:27.578Z","1.0.4":"2026-02-09T18:47:24.291Z"},"bugs":{"url":"https://github.com/unsanction/mcp-polymarket/issues"},"author":{"name":"c0pilot"},"license":"MIT","homepage":"https://github.com/unsanction/mcp-polymarket#readme","keywords":["mcp","polymarket","prediction-markets","trading","crypto","clob","model-context-protocol"],"repository":{"type":"git","url":"git+https://github.com/unsanction/mcp-polymarket.git"},"description":"MCP server and client library for Polymarket prediction markets - trade, browse markets, manage positions","maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"readme":"# @c0pilot/mcp-polymarket\n\nMCP (Model Context Protocol) server and client library for [Polymarket](https://polymarket.com) prediction markets.\n\n[![npm version](https://badge.fury.io/js/@c0pilot/mcp-polymarket.svg)](https://www.npmjs.com/package/@c0pilot/mcp-polymarket)\n\n## Features\n\n- **MCP Server**: Run as a standalone MCP server for AI agents\n- **Client Library**: Import and use in your own projects\n- Browse and search prediction markets\n- View order books and market prices\n- Check wallet balance and positions\n- Place and cancel orders\n- Full integration with Polymarket's CLOB API\n\n## Installation\n\n```bash\nnpm install @c0pilot/mcp-polymarket\n```\n\n## Usage\n\n### As MCP Server\n\n#### With Claude Desktop\n\nAdd to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"polymarket\": {\n      \"command\": \"npx\",\n      \"args\": [\"mcp-polymarket\"],\n      \"env\": {\n        \"POLYMARKET_PRIVATE_KEY\": \"0x...\",\n        \"POLYMARKET_FUNDER\": \"0x...\"\n      }\n    }\n  }\n}\n```\n\n#### Standalone\n\n```bash\nexport POLYMARKET_PRIVATE_KEY=\"0x...\"\nexport POLYMARKET_FUNDER=\"0x...\"\nnpx mcp-polymarket\n```\n\n### As Library\n\n```typescript\nimport { ClobClientWrapper } from 'mcp-polymarket/client';\nimport { createConfig } from 'mcp-polymarket/config';\n\n// Create config\nconst config = createConfig({\n  privateKey: '0x...',\n  funder: '0x...',      // optional\n  readonly: false,       // optional\n});\n\n// Initialize client\nconst client = new ClobClientWrapper(config);\nawait client.initialize();\n\n// Use the client\nconst clobClient = client.getClient();\nconst orderbook = await clobClient.getOrderBook(tokenId);\n```\n\n## Configuration\n\n### Environment Variables\n\n| Variable | Required | Default | Description |\n|----------|----------|---------|-------------|\n| `POLYMARKET_PRIVATE_KEY` | Yes | - | Wallet private key for signing |\n| `POLYMARKET_FUNDER` | No | derived | Proxy wallet address |\n| `POLYMARKET_API_KEY` | No | derived | API key (auto-derived if not set) |\n| `POLYMARKET_API_SECRET` | No | derived | API secret (auto-derived if not set) |\n| `POLYMARKET_PASSPHRASE` | No | derived | API passphrase (auto-derived if not set) |\n| `POLYMARKET_CHAIN_ID` | No | 137 | Polygon mainnet |\n| `POLYMARKET_READONLY` | No | false | Disable trading tools |\n\n### Finding Your Funder Address\n\nYour \"funder\" is your Polymarket proxy wallet - the address shown on polymarket.com when logged in. If you deposited through Polymarket's UI, funds are in this proxy wallet.\n\n## Available MCP Tools\n\n### Read-Only\n\n| Tool | Description |\n|------|-------------|\n| `polymarket_get_markets` | List active prediction markets |\n| `polymarket_get_market` | Get details for a specific market |\n| `polymarket_get_orderbook` | View order book for a token |\n| `polymarket_get_balance` | Check wallet USDC balance |\n| `polymarket_get_positions` | View open orders and positions |\n| `polymarket_get_trades` | Get recent trade history |\n\n### Trading\n\n| Tool | Description |\n|------|-------------|\n| `polymarket_place_order` | Place a limit order (BUY/SELL) |\n| `polymarket_cancel_order` | Cancel an open order |\n\n## API Exports\n\n```typescript\n// Main MCP server entry\nimport mcp from '@c0pilot/mcp-polymarket';\n\n// Client wrapper for Polymarket CLOB\nimport { ClobClientWrapper } from '@c0pilot/mcp-polymarket/client';\n\n// Configuration utilities\nimport { createConfig, getConfig, Config } from '@c0pilot/mcp-polymarket/config';\n\n// Type definitions\nimport { MarketInfo, OrderbookInfo, Position } from '@c0pilot/mcp-polymarket/types';\n```\n\n## Security\n\n- Private keys are never logged\n- Use `POLYMARKET_READONLY=true` for safe exploration\n- API credentials auto-derived from private key\n- Input validation on all parameters\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build\nnpm run build\n\n# Run tests\nnpm test\n\n# Run E2E tests (requires env vars)\nnpm run test:e2e\n```\n\n## Related\n\n- [@c0pilot/openclaw-polymarket](https://www.npmjs.com/package/@c0pilot/openclaw-polymarket) - OpenClaw plugin using this library\n- [GitHub](https://github.com/unsanction/mcp-polymarket)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}