Polymarket MCP Server
Polymarket MCP Server
⚠️ お知らせ:Quantishは閉鎖予定です。 Quantishプラットフォーム(quantish.live)は間もなく終了します。このMCPサーバーはセルフホスト型であり、引き続き独立して動作しますが、Quantishチームは本プロジェクトのメンテナンスやアップデートを今後行いません。予測市場分野で活動しており、リアルタイムデータインフラが必要な場合は、polynode.devをご確認ください。
Polymarketの予測市場で取引を行うための、セルフホスト型MCPサーバーです。
概要
このパッケージは、Polygonネットワークを介してAIエージェントがPolymarketの予測市場で取引できるようにするMCP(Model Context Protocol)サーバーを提供します。
Related MCP server: polymarket-mcp
機能
完全なPolymarket取引 - あらゆるPolymarket市場で売買可能
Polygonウォレット管理 - Safe統合によるウォレットの生成と管理
ガスレス取引 - ほとんどの操作はPolymarketのリレイヤーを使用(MATICは不要)
MCP互換 - Claude、Cursor、および任意のMCPクライアントで動作
セルフホスト可能 - Railway、Fly.io、または任意のNode.jsホストで実行可能
クイックスタート
git clone https://github.com/joinQuantish/polymarket-mcp
cd polymarket-mcp
npm install環境変数
変数 | 必須 | 説明 |
| はい | PostgreSQL接続文字列 |
| はい | ウォレット暗号化用の32バイトの16進文字列 |
| はい | Polygon RPCエンドポイント |
| いいえ | 信頼済みボットHMAC認証用のシークレット |
| いいえ | サーバーポート(デフォルトは3000) |
暗号化キーの生成
# Generate ENCRYPTION_KEY (32 bytes = 64 hex chars)
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# Generate BOT_SIGNING_SECRET (for trusted bot auth)
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"データベース設定
任意のPostgreSQLデータベースが使用可能です。オプション:
プロバイダー | 注意事項 |
Railway | PostgreSQLサービスを追加し、変数から |
Supabase | supabase.comの無料枠、Settings > Databaseから接続文字列をコピー |
Neon | neon.techのサーバーレスPostgreSQL、無料枠あり |
ローカルDocker |
|
DATABASE_URLを設定した後、以下を実行:
# Generate Prisma client
npm run db:generate
# Create tables
npm run db:pushサーバーの実行
# Development
npm run dev
# Production
npm run build
npm start利用可能なツール
アカウントとウォレット
ツール | 説明 |
| 新しいウォレットでアカウントを作成(または既存のアカウントを復元) |
| Safeウォレットをデプロイし、承認を設定 |
| ウォレットのデプロイ状態と承認状態を確認 |
| USDC/MATIC残高を取得 |
| 入金用アドレスを取得(EVM、Solana、BTC) |
| ウォレットの秘密鍵をエクスポート |
| 既存のウォレットをインポート |
取引
ツール | 説明 |
| 買い注文または売り注文を出す |
| オープン注文をキャンセル |
| 全てのオープン注文をキャンセル |
| 注文履歴を取得 |
| 複数の注文をアトミックに実行 |
| 市場のbid/askを取得 |
| 市場の中間価格を取得 |
ポジション
ツール | 説明 |
| 自身のポジションを取得 |
| Polymarket APIからポジションを同期 |
| 引き出し可能な賞金を確認 |
| 確定した市場の賞金を受け取る |
| 全てのERC-1155保有分を取得(贈与された分も含む) |
送金とスワップ
ツール | 説明 |
| ブリッジされたUSDCを送金 |
| CircleネイティブUSDCを送金 |
| ERC-1155シェアを送金 |
| EOAからMATICを送金 |
| LI.FI経由でトークンをスワップ |
| スワップの見積もりを取得 |
APIキー
ツール | 説明 |
| APIキーを一覧表示 |
| 新しいAPIキーを作成 |
| APIキーを失効 |
注: 市場検索ツール(
search_markets、get_market、get_active_markets)は、Discovery MCPから利用できます。
API形式
サーバーは/mcpでJSON-RPC 2.0エンドポイントを公開します:
curl -X POST https://your-server.com/mcp \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "get_balances",
"arguments": {}
},
"id": 1
}'MCPクライアント設定
Claude Desktop / Cursor
{
"mcpServers": {
"polymarket": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://your-server.com/mcp",
"--header",
"x-api-key: YOUR_API_KEY"
]
}
}
}セキュリティ
既存ユーザー
セキュリティのため、既存ユーザー(既存のexternalId)は認証なしで新しいAPIキーを取得できません。オプション:
既存のAPIキーを使用 - 保存している場合
HMAC認証(信頼済みボットのみ) -
BOT_SIGNING_SECRETで署名:signature = HMAC-SHA256(externalId:timestamp, BOT_SIGNING_SECRET)新しいアカウント - 別の
externalIdを使用
開発
# Install dependencies
npm install
# Generate Prisma client
npm run db:generate
# Run migrations
npm run db:push
# Start development server
npm run devリソース
GitHub: joinQuantish/polymarket-mcp
Discovery MCP: joinQuantish/quantish-discovery
Polymarket Docs: docs.polymarket.com
ライセンス
このプロジェクトは、PolyForm Noncommercial License 1.0.0の下でライセンスされています。
個人使用、研究、非営利目的での使用は無料です。 商業利用にはQuantish Inc.の明示的な許可が必要です。商用ライセンスについては、hello@quantish.liveまでお問い合わせください。
Built by Quantish Inc.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceAn MCP server that gives AI agents direct access to Polymarket Crypto prediction markets, enriched with live spot prices. Discover markets, analyze order books, paper trade strategies, track activity, and execute live trades — all through natural language.1AGPL 3.0
- Alicense-qualityBmaintenanceAn MCP server and Python toolkit that provides AI agents with real-time tools for Polymarket prediction markets, including liquidity scanning, arbitrage detection, and slippage estimation. It also offers advanced wallet intelligence, portfolio risk calculation, and probabilistic reasoning to enhance market analysis and strategy.1MIT
- AlicenseCqualityBmaintenanceMCP server that provides a unified prediction market API for multiple venues like Polymarket and Kalshi, allowing AI agents to discover markets, fetch order books, and execute trades through a single interface.324388MIT
- Alicense-qualityCmaintenanceAgent-native, self-hosted MCP server for crypto trading and DeFi management. Enables agents to query balances, execute trades, and manage positions with a policy engine and secure key storage.7Apache 2.0
Related MCP Connectors
No-KYC managed MCP for AI agents: sandboxed TypeScript trading SDK, isolated sub-accounts, futures.
HiveCapital MCP Server — autonomous investment layer for AI agents
Polymarket + Hyperliquid + macro for AI agents. 38 tools, signal backtest, SSE streaming. Free tier.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/joinQuantish/polymarket-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server