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/mcpPrerequisites
Complete Agent Skill onboarding first to obtain:
agentAddressapiKey
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/mcpRestart 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
| Tool | Description |
|---|---|
zenithpay_balance | USDG + OKB balances + remaining daily budget |
zenithpay_get_limits | Read current onchain spend policy |
zenithpay_verify_merchant | OKX security scan + allowlist check |
zenithpay_pay_service | Policy-gated x402 payment with auto-swap |
zenithpay_set_limits | Deploy/update SpendPolicy.sol (human EOA required) |
zenithpay_ledger | Full 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 endNotes for production
- Keep
X-Agent-Addressstable per session to avoid cross-agent confusion. - Approval queue actions stay REST-only by design.
- Use
zenithpay_get_limitsbefore autonomous spending loops.