Lucyd MCP Server
OfficialEnables on-chain interaction on the Ethereum Sepolia testnet: signing orders with EIP-712, approving the Exchange contract, holding outcome tokens via ConditionalTokens, checking ETH/USDC balances and approvals, and redeeming payouts of resolved markets through the AutoRedeemer contract.
Click 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., "@Lucyd MCP ServerBuy 10 up tokens in the current 15m market at 0.55 or better"
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.
Lucyd MCP server
Connect an AI agent (Claude, Cursor or any MCP client) to Lucyd, a prediction markets exchange. Ask in plain language to browse markets, read the order book, trade, close positions and collect winnings.
Lucyd currently runs on the Ethereum Sepolia testnet with test USDC.
What it can do
Tool | What it does |
| Markets with filters by state and period |
| One market: rules, strike, end date, outcome token ids |
| Bids and asks of an outcome, best bid, best ask, mid |
| Recent trades, by market or trader |
| Tokens held, average price, value and profit |
| Profit, volume, win rate of a wallet |
| Profit over time |
| Leaderboard |
| Whether the service, settlement and live trades are healthy |
| Your address, ETH and USDC balances, approvals |
| Your resting orders |
| Your past and current orders with status and fills |
| Limit or market order (buy or sell up or down) |
| Sell everything you hold on a market right away |
| Cancel by id, all on a market, or all |
| One-time approvals for the Exchange contract |
| Turn automatic payout of winnings on or off |
| Collect the payout of a resolved market |
Example requests:
"Show the open 1h markets and the order book of the current one"
"Buy 10 up tokens in the current 15m market at 0.55 or better"
"Close my position in the 5m market"
"What are my positions and total profit this week?"
"Cancel all my orders"
Without a wallet key the server works read-only: markets, books, trades and any wallet's public stats.
Related MCP server: polymarket-mcp
Hosted, read-only
For market data only, nothing to install: add https://mcp.lucyd.trade/mcp as a custom connector (remote MCP server, no authentication) in Claude, ChatGPT or any client that supports Streamable HTTP. It has the market data tools: markets, order books, trades, and positions and stats of any wallet address. Trading needs your own wallet key, so it works only with the local server below.
To run your own hosted copy, set LUCYD_HTTP_ADDR (for example 0.0.0.0:3006) and LUCYD_HTTP_HOSTS (the host names it answers to); the server then serves MCP at /mcp and refuses to start with a wallet key.
Install
The easiest way needs only Node.js 18 or newer: the client runs npx -y @lucyd/mcp, which downloads the binary for your system on first run and checks its SHA-256. Nothing else to install, see the configs below.
Without Node.js, download the binary for your system from data.testnet.lucyd.trade/mcp (open the latest version folder; SHA256SUMS there lists the checksums) and put it anywhere, for example ~/bin/lucyd-mcp (lucyd-mcp.exe on Windows). On macOS and Linux make it executable with chmod +x lucyd-mcp. Then use its path instead of npx in the configs below.
Or build from source with Rust:
cargo install --git https://github.com/lucyd-trade/mcp-serverConnect your agent
Replace the key with your trading wallet key. Restart the client afterwards.
Claude Code
claude mcp add lucyd -e LUCYD_PRIVATE_KEY=0xYOUR_KEY -- npx -y @lucyd/mcpClaude Desktop: edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\).
Cursor: edit ~/.cursor/mcp.json.
Both use the same format:
{
"mcpServers": {
"lucyd": {
"command": "npx",
"args": ["-y", "@lucyd/mcp"],
"env": {
"LUCYD_PRIVATE_KEY": "0xYOUR_KEY"
}
}
}
}If the client on Windows cannot start npx, use "command": "cmd" with "args": ["/c", "npx", "-y", "@lucyd/mcp"].
Before the first trade
The wallet needs USDC to buy and a little Sepolia ETH to pay gas for one-time approvals and redemptions. Then ask the agent to check your wallet and approve trading, or call approve_trading directly. Trading itself costs no gas: the exchange settles fills on chain.
Settings
Variable | Default | Meaning |
| none | Wallet key that signs orders and transactions. Without it trading tools are off |
|
| Largest buy order in USDC |
|
|
|
|
| Sepolia RPC node |
|
| Markets API |
|
| Order book |
Safety
The key never leaves your machine. The server signs locally and sends only signed orders and transactions.
Use a separate wallet for the agent and keep only what you are ready to trade in it.
The server tells the agent to ask you before trading, but that is up to the agent. Set
LUCYD_MAX_ORDER_USDlow, orLUCYD_READ_ONLY=trueif you only want data.
How it works
The server runs locally and talks to the agent over stdio. Market data comes from the public API. Orders are signed with EIP-712 and sent to the order book over WebSocket (protocol in the API docs). Approvals and redemptions are plain transactions on Sepolia.
Contract | Address |
Exchange |
|
ConditionalTokens (outcome tokens) |
|
USDC (6 decimals) |
|
AutoRedeemer |
|
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Historical tick, order book and settlement data for Polymarket and Predict.fun crypto up/down markets, plus smart-money lists and backtest quotes, over a read-only MCP server.
Hosted MCP for Kalshi prediction markets: search, odds, order books, settlement rules, and trading.
Live prices, perps, prediction markets and a paper trading desk over one MCP.
- FensoryOAuthcom.fensory
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
Related MCP Servers
- AlicenseCqualityDmaintenanceMCP 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.3223 npm8MIT
- FlicenseAqualityBmaintenanceAI-agent ready FastMCP server for Polymarket market discovery, wallet analytics, and public CLOB data, providing a read-only interface for querying markets, wallets, and order books.22-
- AlicenseAqualityCmaintenanceA read-only MCP server exposing Polymarket's public prediction-market data. Search markets, read live odds and order books, pull historical probability time-series, and inspect public wallet positions.1463 PyPIMIT
- AlicenseNot gradedqualityCmaintenanceMCP server for querying and optionally trading across prediction markets (Polymarket, Kalshi, Limitless, Manifold) through a unified API.31MIT