
MCP (Model Context Protocol) server for Alpha Arcade prediction markets on Algorand.
概览
MCP (Model Context Protocol) server for Alpha Arcade prediction markets on Algorand. Lets AI agents (Claude, Cursor, Copilot, etc.) browse markets, fetch full API-backed orderbooks, place orders, manage positions, and trade on-chain prediction markets. - : low-level TypeScript primitives for bots, backends, and apps. - : exposes the same capabilities as MCP tools for AI agents. - : human terminal UX with table/json output, prompts, and --dry-run/--yes safety rails. The CLI and MCP both use the same runtime/client setup logic so behavior stays aligned. The CLI package lives in alpha-cli/ in this repo and can be published independently as @alpha-arcade/cli. - Write commands prompt for confirmation by default. - --dry-run prints payloads (and market-order matching estimate) without submitting. - --yes bypasses prompts for non-interactive automation. - Price validation enforces (0,1) dollars and caps unusually high slippage.
README
以下为原文 README 节选,完整内容请查看原文。
@alpha-arcade/mcp
MCP (Model Context Protocol) server for Alpha Arcade prediction markets on Algorand.
Lets AI agents (Claude, Cursor, Copilot, etc.) browse markets, fetch full API-backed orderbooks, place orders, manage positions, and trade on-chain prediction markets.
SDK vs MCP vs CLI
- SDK (
@alpha-arcade/sdk): low-level TypeScript primitives for bots, backends, and apps. - MCP (
@alpha-arcade/mcp): exposes the same capabilities as MCP tools for AI agents. - CLI (
@alpha-arcade/cli): human terminal UX withtable/jsonoutput, prompts, and--dry-run/--yessafety rails.
The CLI and MCP both use the same runtime/client setup logic so behavior stays aligned.
Alpha CLI (terminal)
The CLI package lives in alpha-cli/ in this repo and can be published independently as @alpha-arcade/cli.
Quickstart
cd alpha-cli
npm install
npm run build
node dist/index.js markets list --limit 5
Common commands
# Read-only
node dist/index.js markets list --limit 5
node dist/index.js markets get
node dist/index.js orderbook
node dist/index.js positions --wallet-address
# Trading (requires ALPHA_MNEMONIC)
node dist/index.js trade limit --market --position yes --side buy --price 0.52 --quantity 10
node dist/index.js trade market --market --position no --side buy --price 0.45 --quantity 20 --slippage 0.05
node dist/index.js orders amend --market --escrow-app-id --price 0.60 --quantity 3
node dist/index.js orders cancel --market --escrow-app-id --order-owner
CLI safety model
- Write commands prompt for confirmation by default.
--dry-runprints payloads (and market-order matching estimate) without submitting.--yesbypasses prompts for non-interactive automation.- Price validation enforces
(0,1)dollars and caps unusually high slippage.
Tools
| Tool | Description | Requires Wallet |
|---|---|---|
get_agent_guide |
Returns the agent guide — data model, units, mechanics, workflows, pitfalls | No |
get_live_markets |
Fetch all live tradeable markets | No |
get_market |
Fetch a single market by ID | No |
get_orderbook |
Get the unified on-chain orderbook for a market app | No |
get_full_orderbook |
Get the full processed orderbook snapshot from the Alpha REST API for a market | No |
get_routed_orderbook |
Get native AA + routed Polymarket liquidity for a market | No |
request_rfq |
Request a fresh routed-liquidity RFQ quote | No* |
request_combo_rfq |
Request a competitive arbitrary-combo RFQ quote | No* |
place_combo_rfq |
Quote, sign, and submit a competitive combo RFQ | Yes* |
get_open_orders |
Get open orders for a wallet on a market | No |
get_positions |
Get YES/NO token positions for a wallet | No |
create_limit_order |
Place a limit order on a market | Yes |
安装
npx -y @alpha-arcade/mcp配置
{
"mcpServers": {
"alpha-arcade": {
"command": "npx",
"args": ["-y", "@alpha-arcade/mcp"]
}
}
}