Skip to main content
Sepolia Testnet Only — All integration surfaces connect to Ethereum Sepolia. Token balances and positions have no real-world value.
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.
SurfaceTransportTools / EndpointsAuthBest For
MCP ServerStreamable HTTP22 MCP tools (14 read, 8 write)NoneAI agents with MCP support (Claude, ChatGPT, Cursor, VS Code)
x402 APIREST (HTTP)22 endpoints (14 GET, 8 POST)Free reads; $0.01 USDC per write via x402Programmatic clients, pay-per-request agents
CLI Agent Modestdin/stdout, JSON output30+ commandsNone (local binary)Shell-based agents, scripting, CI pipelines
Claude Code PluginClaude Code skills4 skills (query, execute, explain, integrate)None (local plugin)Claude Code users building on the protocol
OpenClaw SkillClawhHub registry1 skill (MCP-backed)NoneOpenClaw agents via clawhub install
Graph MCPStreamable HTTPSubgraph queriesNoneDirect 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:
claude mcp add nile-markets --transport http https://mcp.nilemarkets.com/api/mcp
Building a traditional API integration? Use the x402 API. Standard REST with JSON responses — reads are free, writes cost $0.01 USDC via the x402 micropayment protocol. Automating from a shell or CI pipeline? Use the CLI in agent mode. The 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:
ServerURLPurpose
Nile MCPmcp.nilemarkets.com/api/mcpProtocol data — 22 tools for positions, oracle prices, pool state, transaction calldata
Mintlify MCPdocs.nilemarkets.com/mcpDocumentation search — semantic search over these docs pages
You can connect both simultaneously. They serve different purposes and do not overlap.

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 optionally blockNumber and source ("rpc", "subgraph", or "rpc+subgraph")
  • Pagination: List endpoints support first (page size, default 25, max 1000) and skip (offset)
  • Rate limits: 100 requests/minute per IP (MCP and x402 free endpoints)