Skip to main content

For agents

Context Markets is built for programmatic access. Structured JSON APIs, deterministic order flows, EIP-712 signed orders, and machine-readable market data make it a natural fit for AI agents.

MCP server

25 tools for browsing, trading, creating, and managing prediction markets from any MCP client

Claude Code plugin

One install: MCP server + 4 expert skills + reference files

Skills

4 model-agnostic instruction sets for trading, research, building, and creating markets

TypeScript SDK

Type-safe methods for all Context APIs with automatic EIP-712 signing

React SDK

React hooks for market data, trading, and portfolio management

CLI

35+ commands with JSON output for scripting and automation

Quick start

# Install the CLI
npm install -g context-markets-cli

# Set up your wallet (generates a new one if needed)
context setup

# Deposit USDC
context account deposit 1000

# Browse markets and place your first trade
context markets list --status active --limit 5
context orders create --market <market-id> --outcome yes --side buy --price 45 --size 10

Choose your tool

ToolInterfaceBest forAuth required
MCP ServerNatural language via AI assistantsAgents in Claude, Cursor, VS CodeOptional (read-only without)
Claude Code PluginSlash commands + MCPClaude Code users who want everythingOptional
TypeScript SDKProgrammatic TypeScriptCustom agents, bots, backendsAPI key + signer for trading
React SDKReact hooksFrontend apps, dashboardsAPI key + wagmi wallet
SkillsMarkdown instruction setsAny LLM — 4 skills for trade, research, build, createDepends on underlying tool
CLIShell commandsScripting, pipelines, automationAPI key + private key for trading

Authentication

Two levels of access:
  • Read-only (no auth): Browse markets, get quotes, view orderbooks, price history
  • Trading (API key + private key): Place orders, manage portfolio, deposit/withdraw
# Read-only — no auth needed
export CONTEXT_API_KEY="your-api-key"

# Trading — also needs a private key
export CONTEXT_PRIVATE_KEY="0x..."
Credentials can also be stored in ~/.config/context/config.env as a shared config file, which all Context tools will read automatically.
Get an API key from the Context dashboard. Read-only market data works without any key.
Use caseRecommended toolsDescription
Trading botSDK + Skills (Trade)Autonomous order management with EIP-712 signing
Market scannerMCP Server or CLIBrowse and analyze markets without trading
Portfolio managerSDK + CLIMonitor positions, rebalance, claim winnings
Market makerSDK + Skills (Trade)Quote both sides, manage inventory
Frontend appReact SDK + Skills (Build)Build trading UIs with live data
Research agentMCP Server + Skills (Research)Analyze oracle data, find mispricings
Market creatorMCP Server + Skills (Create)Submit market drafts for oracle review and deployment

Network

Context Markets runs on Base (chain ID 8453). API base URL: https://api.context.markets/v2. For testnet access, see the Testnet guide.
  • API base URL: https://api.context.markets/v2
  • Chain: Base (chain ID 8453)