X

X402 API

by fernsugi · io.github.fernsugi/x402-api

Eight crypto and DeFi data tools for AI agents: prices, gas, one ParaSwap route quote, GoPlus token security and top-holder samples, DefiLlama yields, Hyperliquid/dYdX funding, and observed wallet balances. Inspect prices free; pay 0.001–0.008 USDC per call on Base through x402. No API key or subscription.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-fernsugi-x402-api": {
      "command": "npx",
      "args": [
        "-y",
        "@x402-api/mcp-server"
      ],
      "env": {
        "X402_API_BASE_URL": "https://x402-api.fly.dev",
        "X402_WALLET_PRIVATE_KEY": "<YOUR_VALUE>",
        "X402_MAX_PER_CALL_USDC": "0.01",
        "X402_REFERRAL_SOURCE": "glama",
        "X402_EXPECTED_PAY_TO": "<VALUE>"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-fernsugi-x402-api": {
      "command": "npx",
      "args": [
        "-y",
        "@x402-api/mcp-server"
      ],
      "env": {
        "X402_API_BASE_URL": "https://x402-api.fly.dev",
        "X402_WALLET_PRIVATE_KEY": "<YOUR_VALUE>",
        "X402_MAX_PER_CALL_USDC": "0.01",
        "X402_REFERRAL_SOURCE": "glama",
        "X402_EXPECTED_PAY_TO": "<VALUE>"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-fernsugi-x402-api": {
      "command": "npx",
      "args": [
        "-y",
        "@x402-api/mcp-server"
      ],
      "env": {
        "X402_API_BASE_URL": "https://x402-api.fly.dev",
        "X402_WALLET_PRIVATE_KEY": "<YOUR_VALUE>",
        "X402_MAX_PER_CALL_USDC": "0.01",
        "X402_REFERRAL_SOURCE": "glama",
        "X402_EXPECTED_PAY_TO": "<VALUE>"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-fernsugi-x402-api": {
      "command": "npx",
      "args": [
        "-y",
        "@x402-api/mcp-server"
      ],
      "env": {
        "X402_API_BASE_URL": "https://x402-api.fly.dev",
        "X402_WALLET_PRIVATE_KEY": "<YOUR_VALUE>",
        "X402_MAX_PER_CALL_USDC": "0.01",
        "X402_REFERRAL_SOURCE": "glama",
        "X402_EXPECTED_PAY_TO": "<VALUE>"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-fernsugi-x402-api": {
      "command": "npx",
      "args": [
        "-y",
        "@x402-api/mcp-server"
      ],
      "env": {
        "X402_API_BASE_URL": "https://x402-api.fly.dev",
        "X402_WALLET_PRIVATE_KEY": "<YOUR_VALUE>",
        "X402_MAX_PER_CALL_USDC": "0.01",
        "X402_REFERRAL_SOURCE": "glama",
        "X402_EXPECTED_PAY_TO": "<VALUE>"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-fernsugi-x402-api": {
      "command": "npx",
      "args": [
        "-y",
        "@x402-api/mcp-server"
      ],
      "env": {
        "X402_API_BASE_URL": "https://x402-api.fly.dev",
        "X402_WALLET_PRIVATE_KEY": "<YOUR_VALUE>",
        "X402_MAX_PER_CALL_USDC": "0.01",
        "X402_REFERRAL_SOURCE": "glama",
        "X402_EXPECTED_PAY_TO": "<VALUE>"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
X402_API_BASE_URL No Official API URL Default: https://x402-api.fly.dev
X402_WALLET_PRIVATE_KEY secret No Optional Base USDC client wallet for EIP-3009 auto-pay. Omit for free inspect mode.
X402_MAX_PER_CALL_USDC No Maximum USDC per call Default: 0.01
X402_REFERRAL_SOURCE No Referral attribution hint Default: glama
X402_EXPECTED_PAY_TO No Expected payment recipient; defaults to the official x402-api wallet. Change only when using a trusted alternative deployment.

Similar servers