MCP server
The Context MCP server gives AI agents direct access to prediction markets through the Model Context Protocol. Browse markets, read orderbooks, place trades, and manage portfolios — all through natural language.25 tools
Market data, trading, portfolio, and account management
Zero-config read-only
Browse markets and get quotes without any API key
Any MCP client
Works with Claude, Cursor, VS Code, Windsurf, and more
Installation
- Claude Code
- Claude Desktop
- Cursor
- VS Code
- Windsurf
~/.config/context/config.env and shared with the CLI. Run context setup to configure your wallet, or set CONTEXT_API_KEY and CONTEXT_PRIVATE_KEY as environment variables.
Getting started
Once the MCP server is installed, follow these steps to start trading:- Generate a wallet — use
context_generate_walletto create or import a wallet. Keys are saved to the shared config automatically. - Fund your wallet — send ETH on Base to your wallet address for gas fees.
- Approve contracts — run
context_account_setupto approve the required contracts for trading. - Deposit USDC — use
context_depositto deposit USDC into your trading account.
API key setup
- Read-only tools work without any API key — browse markets, get quotes, view orderbooks
- Set
CONTEXT_API_KEYfor authenticated endpoints, or store it in~/.config/context/config.env - Set
CONTEXT_PRIVATE_KEYfor trading (order placement, cancellation, deposits), or store it in the shared config
context setup, which writes them to the shared config file (chmod 600).
Network
The MCP server defaults to mainnet. To use testnet, set theCONTEXT_CHAIN environment variable to "testnet" or add it to your ~/.config/context/config.env. See the Testnet guide.
Tool catalog
Browse all 25 available tools organized by category