Base URL:
Service homepage: https://mcp-gateway.swarms.world/
x402 clients handle 402 flows automatically (detect payment, construct headers, retry). Provide a wallet signer via
https://mcp-gateway.swarms.world/Service homepage: https://mcp-gateway.swarms.world/
x402 clients handle 402 flows automatically (detect payment, construct headers, retry). Provide a wallet signer via
PRIVATE_KEY or a server wallet.
Learn more at the x402 docs.1
Prerequisites
- An EVM wallet with sufficient USDC on Base
- Either:
- Node.js 18+ and npm
- Python 3.9+ and pip
- Env var:
PRIVATE_KEY(hex0x…) for signing x402 payments
2
Install Dependencies
- Python
- TypeScript
3
Configure Environment
4
Use the Research Agent (POST /research-agent)
- Python
- TypeScript
5
Discover MCP Tools (GET /mcp/tools)
Query parameters:
url— Target MCP server URLformat—openai|mcp(defaultopenai)
- Python
- TypeScript
6
Discover MCP Tools (POST /mcp/tools)
JSON body:
url— Target MCP server URLformat—openai|mcp(optional)authorization_token— Bearer token passed to the MCP server (optional)
- Python
- TypeScript
7
Proxy a Tool Call (POST /mcp/request)
JSON body:
url— Target MCP server URLtool_name— Name of tool to callarguments— Tool arguments (object)authorization_token— Bearer token for target MCP (optional)
- Python
- TypeScript
You’re ready to integrate paid endpoints with x402. Use the hosted base URL above or point to your local server if self-hosting.
Links:
Links:
- Service homepage: https://mcp-gateway.swarms.world/