Skip to content

MCP Integration

Overview

x402 Relay provides a native MCP (Model Context Protocol) server that exposes the catalog as tools for Claude, OpenClaw, and other MCP-compatible agents.

Setup

Claude Desktop

Add to claude_desktop_config.json:

{
"mcpServers": {
"x402-relay": {
"command": "node",
"args": ["/path/to/x402-relay/dist/mcp-server.js"]
}
}
}

OpenClaw

Add to your skill configuration:

{
"transport": "stdio",
"command": "node /path/to/x402-relay/dist/mcp-server.js"
}

Available Tools

search_services

Search x402-enabled services by keyword or category.

ParameterTypeRequiredDescription
querystringNoSearch keyword
categorystringNoCategory ID filter
limitnumberNoMax results (default: 20)

get_service_detail

Get detailed information about a specific service.

ParameterTypeRequiredDescription
serviceIdstringYesService ID

list_categories

List all service categories with counts. No parameters.

check_service_status

Check the current status and trust score of a service.

ParameterTypeRequiredDescription
serviceIdstringYesService ID

why_this_api

Get an AI-generated explanation of why a specific API is recommended for a query.

ParameterTypeRequiredDescription
serviceIdstringYesService ID
querystringNoOriginal search context

Example Conversation

User: Find me an API for image generation that accepts crypto payments
Agent: [calls search_services with query="image generation"]
Found 3 services. Let me check the top result...
[calls get_service_detail with serviceId="svc-neural-api-1"]
[calls check_service_status with serviceId="svc-neural-api-1"]
NeuralAPI offers image generation at $0.003/request via USDC on Base.
Trust Score: 85/100 (verified). Uptime: 99.2%.