# x402-gateway

Connect agent API requests to x402 payments in USDC on Arc. It fits workflows where an agent needs to pay for service access.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: Gentech-Labs
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Gentech-Labs/programmable-money-x402
- Updated: 2026-08-07
- HTML: https://affpapa.org/en/nevibecode/mcp/x402-gateway

## What it 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.

## Requirements
- Remote server: `https://api.gentechlabs.net/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http x402-gateway https://api.gentechlabs.net/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add x402-gateway --url https://api.gentechlabs.net/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "x402-gateway": {
            "url": "https://api.gentechlabs.net/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "x402-gateway": {
            "type": "http",
            "url": "https://api.gentechlabs.net/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http x402-gateway https://api.gentechlabs.net/mcp
```

## When to use it
- 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
- 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.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74569
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89899

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
