ZenithPay iconZenithPay
Integration

MCP Server

Primary integration — persistent tools across all agent sessions

ZenithPay's MCP server is the primary runtime integration. Once connected, the 6 zenithpay_* tools are available in MCP-compatible agents without re-running onboarding.

MCP server URL

https://api.usezenithpay.xyz/mcp

Prerequisites

Complete Agent Skill onboarding first to obtain:

  • agentAddress
  • apiKey

Registration by platform

Claude Code

AGENT_ADDRESS=$(cat ~/.zenithpay/config.json | grep agentAddress | cut -d'"' -f4)
ZENITHPAY_API_KEY=$(cat ~/.zenithpay/config.json | grep apiKey | cut -d'"' -f4)

claude mcp add --transport http --scope user \
  --header "Authorization: Bearer $ZENITHPAY_API_KEY" \
  --header "X-Agent-Address: $AGENT_ADDRESS" \
  zenithpay https://api.usezenithpay.xyz/mcp

Restart Claude Code. The zenithpay_* tools appear in your tool list immediately.

Cursor / Windsurf

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

{
  "mcpServers": {
    "zenithpay": {
      "type": "http",
      "url": "https://api.usezenithpay.xyz/mcp",
      "headers": {
        "Authorization": "Bearer <your-api-key>",
        "X-Agent-Address": "<your-agent-address>"
      }
    }
  }
}

Claude Desktop

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

{
  "mcpServers": {
    "zenithpay": {
      "type": "http",
      "url": "https://api.usezenithpay.xyz/mcp",
      "headers": {
        "Authorization": "Bearer <your-api-key>",
        "X-Agent-Address": "<your-agent-address>"
      }
    }
  }
}

Gemini CLI

Add to ~/.gemini/settings.json:

{
  "mcpServers": {
    "zenithpay": {
      "httpUrl": "https://api.usezenithpay.xyz/mcp",
      "headers": {
        "Authorization": "Bearer <your-api-key>",
        "X-Agent-Address": "<your-agent-address>"
      }
    }
  }
}

OpenAI Agents SDK

from agents.mcp import MCPServerHTTP

zenithpay = MCPServerHTTP(
    url="https://api.usezenithpay.xyz/mcp",
    headers={
        "Authorization": "Bearer <your-api-key>",
        "X-Agent-Address": "<your-agent-address>"
    }
)

agent = Agent(
    name="spending-agent",
    mcp_servers=[zenithpay],
)

Tools exposed

ToolDescription
zenithpay_balanceUSDG + OKB balances + remaining daily budget
zenithpay_get_limitsRead current onchain spend policy
zenithpay_verify_merchantOKX security scan + allowlist check
zenithpay_pay_servicePolicy-gated x402 payment with auto-swap
zenithpay_set_limitsDeploy/update SpendPolicy.sol (human EOA required)
zenithpay_ledgerFull transaction audit trail

Required call order every session

1. zenithpay_get_limits()       → understand policy before any spend
2. zenithpay_balance()          → confirm funds available
3. zenithpay_verify_merchant()  → safety check the merchant
4. zenithpay_pay_service()      → execute payment
5. zenithpay_ledger()           → review audit trail at end

Notes for production

  • Keep X-Agent-Address stable per session to avoid cross-agent confusion.
  • Approval queue actions stay REST-only by design.
  • Use zenithpay_get_limits before autonomous spending loops.

On this page