GuidesDeveloper IDEs

Developer IDEs (Cursor, Windsurf, Claude Code)

Setup guide for developers integrating y0 MCP into their development workflow.

Cursor / Windsurf

Add to your project’s .cursor/mcp.json (or global config):

{
  "mcpServers": {
    "y0": {
      "command": "npx",
      "args": ["-y", "@y0exchange/mcp"],
      "env": {
        "Y0_API_KEY": "y0_your_api_key_here"
      }
    }
  }
}

Restart Cursor. The y0 tools will be available to the AI agent.

Claude Code

claude mcp add --transport http y0 https://mcp.y0.exchange/mcp?key=YOUR_API_KEY

Or for local stdio mode:

claude mcp add y0 -- npx -y @y0exchange/mcp

Then set the API key as an environment variable: Y0_API_KEY=y0_your_key.

Any MCP Client (stdio)

Y0_API_KEY=y0_... npx @y0exchange/mcp

The server communicates over stdio — compatible with any MCP client.

Optional API Keys

The y0 MCP server works out of the box with just Y0_API_KEY. Additional keys unlock extra functionality:

VariableDescriptionUsed by
ZEROX_API_KEY0x swap API keyget_quote, swap
ONEINCH_API_KEY1inch swap API key (fallback)get_quote, swap
COINGECKO_API_KEYCoinGecko Pro key (optional, free tier works)get_price, get_portfolio
ETHERSCAN_API_KEYEtherscan API keyget_history

Pass them as environment variables in the env block of your MCP config:

{
  "mcpServers": {
    "y0": {
      "command": "npx",
      "args": ["-y", "@y0exchange/mcp"],
      "env": {
        "Y0_API_KEY": "y0_your_api_key_here",
        "ZEROX_API_KEY": "your-0x-key",
        "COINGECKO_API_KEY": "your-coingecko-key",
        "ETHERSCAN_API_KEY": "your-etherscan-key"
      }
    }
  }
}

Read-only Mode

Without Y0_API_KEY, all read-only tools (balances, prices, gas, quotes, history) still work. Useful for building read-only dashboards or experimenting with the tools.