Skip to main content

Installation

After installation, 23 MCP tools become available via natural language, and you can invoke any of the four skills explicitly using slash commands.

Skills

The plugin bundles four orchestration skills. Each skill provides structured guidance to Claude Code for a specific workflow pattern.

/nile-markets:query

Queries live protocol data through MCP tools. Claude Code selects the appropriate tool based on your question. Example prompts:
  • “What’s the current pool utilization and TVL?”
  • “Show me all open positions for 0x1234…abcd”
  • “Is the protocol operating normally?”
  • “Get the EUR/USD 1-week forward price”

/nile-markets:integrate

Generates integration code using the @nile-markets/sdk (TypeScript) or fx-contracts crate (Rust). Produces working code with correct ABIs, contract addresses, and numeric precision handling. Example prompts:
  • “Write TypeScript code to read the current share price using viem”
  • “Generate a Rust function that opens a LONG 1M position using alloy-rs”
  • “Show me how to monitor position PnL in a Node.js script”
  • “Create a script that deposits USDC into the liquidity pool”

/nile-markets:explain

Explains protocol mechanics grounded in the documentation. Returns clear, accurate explanations with links to the relevant docs pages. Example prompts:
  • “How does liquidation work in Nile Markets?”
  • “What’s the difference between initial margin and maintenance margin?”
  • “Explain the four protocol modes and when they activate”
  • “How is PnL calculated for a SHORT position?”

/nile-markets:execute

Orchestrates onchain operations with step-by-step signing guidance. Supports three signing paths: Nile CLI with OWS wallet, MCP calldata with external signing, or direct contract interaction. Example prompts:
  • “Open a 1000 USDC long 1-week EUR/USD position”
  • “Deposit 500 USDC as margin collateral”
  • “Close position #42”
  • “Deposit 10,000 USDC into the liquidity pool”
The execute skill never handles private keys or passphrases. All key management and transaction signing happen outside the plugin, in your wallet tool of choice.

MCP Tools

Once the plugin is loaded, all 23 MCP tools are available through natural language — you do not need to call them explicitly. Claude Code automatically selects the right tool based on your question.

Read Tools (14)

Write Tools (8)

Write tools return unsigned transaction calldata. Your wallet signs and broadcasts.

Natural Language Examples

You do not need to remember tool names. Ask questions naturally and Claude Code routes to the correct tool:
  • “What is the EUR/USD 1W forward price?” — calls get_forward_price with tenor: "1W"
  • “Show me all open positions for 0x1234…” — calls get_positions with account and status: "OPEN"
  • “How much margin do I need for a 5000 USDC short 1-month position?” — calls simulate_open_position
  • “What fees has the protocol collected today?” — calls get_daily_stats with days: 1
  • “Check my USDC balance” — calls get_token_balance with your address

Numeric Conventions

The plugin connects to the Nile Markets MCP server on Ethereum Sepolia. All data and transactions are testnet-only with no real-world value.