Unstable API (v0.3.0) — Tool schemas, endpoint paths, and response formats may change without notice during the M2 milestone.
Integration Surfaces
Six surfaces expose the same protocol operations with different transports, auth models, and target audiences.| Surface | Transport | Tools / Endpoints | Auth | Best For |
|---|---|---|---|---|
| MCP Server | Streamable HTTP | 22 MCP tools (14 read, 8 write) | None | AI agents with MCP support (Claude, ChatGPT, Cursor, VS Code) |
| x402 API | REST (HTTP) | 22 endpoints (14 GET, 8 POST) | Free reads; $0.01 USDC per write via x402 | Programmatic clients, pay-per-request agents |
| CLI Agent Mode | stdin/stdout, JSON output | 30+ commands | None (local binary) | Shell-based agents, scripting, CI pipelines |
| Claude Code Plugin | Claude Code skills | 4 skills (query, execute, explain, integrate) | None (local plugin) | Claude Code users building on the protocol |
| OpenClaw Skill | ClawhHub registry | 1 skill (MCP-backed) | None | OpenClaw agents via clawhub install |
| Graph MCP | Streamable HTTP | Subgraph queries | None | Direct GraphQL access to indexed protocol data |
Which Surface Should You Use?
Building an AI agent that trades or queries positions? Start with the MCP Server. It has the richest tool set, works with every major AI platform, and requires no auth. Connect in one command:nile binary outputs structured JSON with --output json and works zero-config on Sepolia.
Using Claude Code for protocol development? Install the Claude Code Plugin for four specialized skills that understand protocol internals.
Want raw subgraph access? The Graph MCP shim exposes the protocol’s subgraph directly for custom GraphQL queries beyond what the MCP tools provide.
Two MCP Servers
Nile Markets operates two separate MCP servers:| Server | URL | Purpose |
|---|---|---|
| Nile MCP | mcp.nilemarkets.com/api/mcp | Protocol data — 22 tools for positions, oracle prices, pool state, transaction calldata |
| Mintlify MCP | docs.nilemarkets.com/mcp | Documentation search — semantic search over these docs pages |
Surface Pages
MCP Server
22 tools via Streamable HTTP — connect from Claude, ChatGPT, Cursor, VS Code, and more
x402 API
REST API with free reads and $0.01 micropayment writes via the x402 protocol
CLI Agent Mode
30+ commands with JSON output for shell-based agents and CI pipelines
Claude Code Plugin
4 skills for querying, executing, explaining, and integrating with the protocol
OpenClaw Skill
One-command install via ClawhHub for OpenClaw-compatible agents
Graph MCP
Direct subgraph access for custom GraphQL queries over indexed protocol data
Shared Conventions
All surfaces share these conventions regardless of transport:- Amounts: Strings in smallest unit —
"1000000000"= 1,000 USDC (6 decimals),"1085000000000000000"= 1.085 (18 decimals for prices) - Write operations: Return unsigned transaction calldata (
to,data,value,chainId) — signing and broadcasting happen externally via your wallet - Response metadata: Every response includes
protocol(name + version),network, and optionallyblockNumberandsource("rpc","subgraph", or"rpc+subgraph") - Pagination: List endpoints support
first(page size, default 25, max 1000) andskip(offset) - Rate limits: 100 requests/minute per IP (MCP and x402 free endpoints)