Context MCP Server
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Context MCP Serverlist active prediction markets"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Quick Start
Claude Code
claude mcp add context-markets -- npx context-markets-mcpClaude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"context-markets": {
"command": "npx",
"args": ["context-markets-mcp"]
}
}
}No environment variables needed — the server walks you through setup on first use.
Related MCP server: polymarket-mcp
Getting Started
The first time you (or your agent) use a trading tool, the server will guide you through onboarding:
Wallet —
context_generate_walletcreates a new wallet or imports an existing private keySave credentials — persists to
~/.config/context/config.env(chmod 600, shared with the CLI)API key — pass your Context API key (get one at context.markets) via the
apiKeyparamApprove contracts —
context_account_setupapproves on-chain (requires ETH on Base for gas)Deposit USDC —
context_depositdeposits USDC into the exchange
If anything fails (no ETH, rate limit, etc.), you can re-run the same tool — it detects your existing config and picks up where you left off.
Manual setup
If you prefer to configure manually:
# Option 1: Environment variables
export CONTEXT_API_KEY="your-api-key"
export CONTEXT_PRIVATE_KEY="0x..."
# Option 2: Config file (created by context_generate_wallet or `context setup` in the CLI)
# ~/.config/context/config.envCredentials are loaded in order: env vars > config file.
Need an API key? Visit context.markets.
Available Tools
Read-only (no wallet needed)
Tool | Description | Key Params |
| List and search prediction markets on Context Markets |
|
| Get detailed information about a specific prediction market |
|
| Get current bid/ask/last prices for a market's YES and NO outcomes |
|
| Get the orderbook (bid/ask ladder) for a market |
|
| Simulate a trade to estimate fill price, cost, and slippage |
|
| Get historical price data for a market over a specified timeframe |
|
| Get the AI oracle's resolution analysis for a market |
|
| Get recent trading activity across all markets | -- |
Account setup and funding
Tool | Description | Key Params |
| Generate a new wallet or import an existing key |
|
| Get address, balances, and approval status | -- |
| Approve USDC spending and operator permissions | -- |
| Deposit USDC into the exchange |
|
| Withdraw USDC from the exchange back to your wallet |
|
| Mint test USDC on Base Sepolia |
|
Trading and orders
Tool | Description | Key Params |
| Place a buy or sell order on a prediction market |
|
| Cancel an open order |
|
| Atomically cancel an existing order and place a new one |
|
| List your open orders |
|
| Create multiple orders in a single atomic batch |
|
| Cancel multiple open orders in a single batch |
|
| Atomically create and cancel orders in a single batch |
|
Portfolio
Tool | Description | Key Params |
| Get positions with P&L |
|
| Get USDC balance and token holdings | -- |
Market creation
Tool | Description | Key Params |
| Create a market from a question |
|
| Submit a fully formed market draft, wait for oracle approval, and create it on-chain |
|
Key Concepts
Prices are in cents (1–99). A price of 65 means $0.65 per share.
Outcomes are yes or no. Each market is a binary question.
Read-only tools work with zero config. Trading tools need a wallet — run
context_generate_walletfirst.Shared config. The MCP server and CLI share
~/.config/context/config.env, so you only set up once.
Documentation
Tool Catalog — full list of tools with parameters and examples
MCP Guide — setup, configuration, and usage patterns
Ecosystem
Package | Description |
TypeScript SDK for trading | |
React hooks for market data and trading | |
MCP server for AI agents | |
CLI for trading from the terminal | |
AI agent skill files | |
Claude Code plugin |
License
MIT — see LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Calibrated world model for AI agents. 40 tools: world state, markets, trading. Kalshi + Polymarket.
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Trade across 22+ exchanges and brokers from any MCP-capable AI agent, no install required.
100+ MCP tools for AI agents: content metadata, trade intelligence, business-expertise analysis.
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceEnables AI agents to interact with the Polymarket prediction market platform to discover markets, analyze real-time pricing, and monitor public portfolio data. It provides comprehensive access to market analytics, implied probabilities, and order books through the Model Context Protocol.5917 npm-
- AlicenseAqualityCmaintenanceEnables AI agents to discover and analyze prediction markets, execute trades, and manage positions on Polymarket via the Model Context Protocol.751 npm20MIT
- AlicenseAqualityDmaintenanceProvides search, trending, odds, arbitrage, and category browsing for prediction markets (Polymarket & Kalshi) via the Model Context Protocol, enabling AI agents to access live market data without API keys.51MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to trade on Limitless prediction markets on Base via MCP, with tools for wallet management, market discovery, order placement, and portfolio tracking.-