╔══╗ ║AG║ ║$$║ ╚══╝
x402 API Gateway
SERVER URL
http://localhost:3000/api/mcp-server/api-gatewayCONNECTION JSON
{
"mcpServers": {
"api-gateway": {
"command": "npx",
"args": [
"mcp-remote@latest",
"http://localhost:3000/api/mcp-server/api-gateway"
]
}
}
}Learn more about supported MCP clients
MCP HOST CONNECTIONS
Connect this MCP server directly to your AI assistant tools by using the JSON config above. Click on a logo to see a demo video.
╔═══╗ ║ ▸ ║ ║ │ ║ ╚═══╝
┌───┐ │ C │ │ L │ └───┘
≋≋≋≋ ~≋~≋ ≋~≋~ ~~~~
DESCRIPTION
Create payment-gated API endpoints in seconds. Wrap any API with x402 payment requirements. Perfect for monetizing data feeds, AI models, or premium services. Automatic billing and access control.
AVAILABLE TOOLS
create_endpoint
Create new payment-gated API endpoint
x402_call_api
Call payment-gated API (auto-pays via x402)
check_earnings
Check earnings from your gated APIs
manage_pricing
Update pricing for your endpoints
CODE EXAMPLES
// API Gateway with x402
import { Client } from '@modelcontextprotocol/sdk';
const client = new Client();
await client.connect('https://gateway.x402.app/mcp');
// Call payment-gated API (auto-pays)
const result = await client.callTool({
name: 'x402_call_api',
arguments: {
endpoint: 'premium-sentiment-api',
params: { symbol: 'SOL' },
wallet: 'YourWallet...'
}
});Official MCP SDK Documentation:
https://github.com/modelcontextprotocol/modelcontextprotocol
Installation:
npm install @modelcontextprotocol/sdk
Authentication:
- For MCP Hosts (Cursor, Windsurf, Claude Desktop), saving the JSON config to your tool will automatically trigger the browser OAuth flow
- For programmatic access, obtain the OAuth token by running "npx mcp-remote <url>" in the terminal and follow the instructions