x402-gateway — Claude Code MCP server: payments for APIs
Connect agent API requests to x402 payments in USDC on Arc. It fits workflows where an agent needs to pay for service access.
claude mcp add --transport http x402-gateway https://api.gentechlabs.net/mcpWhat x402-gateway does
x402-gateway uses HTTP 402 to handle the payment flow: an API returns payment requirements, the agent sends USDC on Arc, and access follows once the payment is verified. The project also includes a gateway, an Agent SDK, and a Playground for testing transactions and managing wallets.
ArcAgentWallet.sol is deployed on Arc testnet. The contract can hold USDC, accept funds from any party, and carry out agent-initiated transfers with a safety timeout. Payments use USDC on Arc, so this is not a general payment flow for arbitrary tokens.
What it helps with
- add HTTP 402 payments to an API
- let an agent pay for requests in USDC on Arc
- test payment transactions in the Playground
- run agent-initiated wallet transfers with a timeout
Example prompts for the agent
- Pay for an API request through x402 using USDC on Arc.
- Run a test transaction and show the payment flow.
- Fund the agent wallet, then make a transfer with the safety timeout.
How to install x402-gateway
Platform CLI: remote server
claude mcp add --transport http x402-gateway https://api.gentechlabs.net/mcpPlatform CLI: remote server
codex mcp add x402-gateway --url https://api.gentechlabs.net/mcpConfig file
{
"mcpServers": {
"x402-gateway": {
"url": "https://api.gentechlabs.net/mcp"
}
}
}Config file
{
"servers": {
"x402-gateway": {
"type": "http",
"url": "https://api.gentechlabs.net/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http x402-gateway https://api.gentechlabs.net/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about x402-gateway
How do I install x402-gateway in Claude Code?
Run claude mcp add --transport http x402-gateway https://api.gentechlabs.net/mcp.
What does x402-gateway do?
It connects API access to HTTP 402 payments in USDC on Arc. The agent gets access after the payment is verified.
Which network does the agent wallet use?
ArcAgentWallet.sol is deployed on Arc testnet. It holds USDC and performs agent-initiated transfers with a safety timeout.