Polymarket Prediction Markets
by Polymarket Data
Real-time Polymarket prediction market data including trades, prices, and market activity
by Kalshi
Access Kalshi prediction markets for real-time odds on elections, economics, and world events. Supports both read-only market data and authenticated trading.
Install the x402 MCP server to let your AI agent access this data with automatic USDC payments on Base.
Required: You need a SerenDB database to store query results.
Get your connection string from the SerenDB Console under your database settings.
Add to claude_desktop_config.json:
{
"mcpServers": {
"x402": {
"command": "npx",
"args": ["@serendb/x402-mcp-server"],
"env": {
"X402_GATEWAY_URL": "https://x402.serendb.com",
"WALLET_PRIVATE_KEY": "0x...",
"BASE_RPC_URL": "https://mainnet.base.org",
"SERENDB_CONNECTION_STRING": "postgresql://..."
}
}
}
}Replace 0x... with your wallet private key and postgresql://... with your SerenDB connection string.
claude mcp add x402 \ -e X402_GATEWAY_URL=https://x402.serendb.com \ -e WALLET_PRIVATE_KEY=0x... \ -e BASE_RPC_URL=https://mainnet.base.org \ -e "SERENDB_CONNECTION_STRING=postgresql://..." \ -- npx -y @serendb/x402-mcp-server
claude mcp add x402 ` -e X402_GATEWAY_URL=https://x402.serendb.com ` -e WALLET_PRIVATE_KEY=0x... ` -e BASE_RPC_URL=https://mainnet.base.org ` -e "SERENDB_CONNECTION_STRING=postgresql://..." ` '--' npx -y @serendb/x402-mcp-server
Replace 0x... with your wallet private key and postgresql://... with your SerenDB connection string.
gemini mcp add x402 \ -e X402_GATEWAY_URL=https://x402.serendb.com \ -e WALLET_PRIVATE_KEY=0x... \ -e BASE_RPC_URL=https://mainnet.base.org \ -e "SERENDB_CONNECTION_STRING=postgresql://..." \ -- npx -y @serendb/x402-mcp-server
Replace 0x... with your wallet private key and postgresql://... with your SerenDB connection string.
codex mcp add x402 \ --env X402_GATEWAY_URL=https://x402.serendb.com \ --env WALLET_PRIVATE_KEY=0x... \ --env BASE_RPC_URL=https://mainnet.base.org \ --env "SERENDB_CONNECTION_STRING=postgresql://..." \ -- npx -y @serendb/x402-mcp-server
Important: Cursor has a 60s timeout. Pre-install globally first: npm install -g @serendb/x402-mcp-server
First, install globally to avoid timeout issues:
npm install -g @serendb/x402-mcp-server
Then add to ~/.cursor/mcp.json:
{
"mcpServers": {
"x402": {
"command": "x402-mcp-server",
"args": [],
"env": {
"X402_GATEWAY_URL": "https://x402.serendb.com",
"WALLET_PRIVATE_KEY": "0x...",
"BASE_RPC_URL": "https://mainnet.base.org",
"SERENDB_CONNECTION_STRING": "postgresql://..."
}
}
}
}Also works with Windsurf, Zed, and other MCP-compatible clients. See the full setup guide for details.
Access data directly via HTTP using the x402 payment protocol.
HTTP 402 with payment requirements (amount, wallet, EIP-712 data)X-PAYMENT header containing the signaturecurl -X POST https://x402.serendb.com/api/proxy \
-H "Content-Type: application/json" \
-d '{
"publisherId": "86809288-8bdf-47e2-835c-d5cbf3f9e96b",
"agentWallet": "0xYourWalletAddress",
"request": {
"method": "GET",
"path": "/endpoint"
}
}'This returns 402 Payment Required with the payment details you need to sign.
After signing the EIP-712 authorization, add the base64-encoded signature:
curl -X POST https://x402.serendb.com/api/proxy \
-H "Content-Type: application/json" \
-H "X-PAYMENT: <base64-encoded-signature>" \
-d '{ ... }'Copy these prompts to use with your AI assistant. Make sure you have the x402 MCP server configured.
Using the x402 MCP server, query Kalshi to show me the current open prediction markets. List the top 10 events with their titles, categories, and prediction timeframes. What are people betting on right now?
Using the x402 MCP server, analyze Kalshi's prediction market categories: fetch all open markets and group them by category (Politics, Economics, Science, World, etc.). Which category has the most active markets? What does this tell us about trader interests?
Using the x402 MCP server, examine political prediction markets on Kalshi: find all markets in the Politics category with timeframes before 2045. Show event titles, strike periods, and whether they're mutually exclusive (single winner vs multiple). What political events are traders most uncertain about?
Using the x402 MCP server, compare long-term vs short-term prediction events on Kalshi. Categorize events by timeframe: before 2045 (long-term), before 2050 (medium), specific dates (short-term). Which timeframe has more markets? What types of events appear in each bucket?
Using the x402 MCP server, find emerging prediction markets on Kalshi: identify events in Science & Technology and World categories that have not yet become mainstream. Show the most interesting fringe predictions. What unconventional bets are available?
Pay per API call via x402 protocol
by Polymarket Data
Real-time Polymarket prediction market data including trades, prices, and market activity
by Alpaca
Commission-free stock and crypto trading API. Real-time market data, trade execution, portfolio management for US equities and cryptocurrencies.
by Trading Strategy
Comprehensive vault performance and yield database with 1000+ vaults across 20+ chains and dozens of digital asset management protocols. Includes returns, Sharpe, volatility, fees, and risk ratings.