Gatewards MCP Server

Drop-in spend governance and cross-agent dedup proxy for AI agent fleets — per-agent budget enforcement and non-custodial x402 settlement over MCP.

Documentation

@gatewards/mcp-server

An MCP server that lets any agent (Claude Desktop, Cursor, VS Code, or your own MCP client) discover and call paid APIs through Gatewards — with per-agent spend caps, cross-agent dedup, and non-custodial x402 settlement.

The agent keeps its own API key and wallet. Gatewards enforces the spend limit in the request path: a call over budget is refused before it fires, not logged after.

Install

npx @gatewards/mcp-server --api-key=gw_agent_xxx --gateway=https://api.gatewards.com

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "gatewards": {
      "command": "npx",
      "args": [
        "@gatewards/mcp-server",
        "--api-key=gw_agent_xxx",
        "--gateway=https://api.gatewards.com"
      ]
    }
  }
}

Get an agent key from your Gatewards dashboard.

Two modes

ModeHowWhat you get
Proxy (default)--api-key=gw_agent_xxxRoutes calls through the gateway. Per-agent budget enforcement, response caching, and cross-agent dedup. No wallet, no on-chain payment.
x402 (self-custody)--private-key=0x... --rpc-url=... --usdc-address=...The agent signs USDC payments itself. When an API returns 402, payment is settled on-chain and the request retries with a receipt. Keys never leave your machine.

Pick proxy mode for governance and caching. Add x402 only when you actually need to pay per call on-chain.

Tools

ToolWhat it does
gatewards_discover_servicesList paid API services on the marketplace (name, endpoint, price).
gatewards_call_apiMake a GET/POST call. Returns status, data, and cost if a payment was made.
gatewards_check_budgetCurrent daily spend, remaining budget, and active subscriptions.
gatewards_get_plansList prepaid credit plans for a service.
gatewards_subscribeBuy a credit bundle for a service (proxy mode only).

Configuration

Flags or environment variables (flags win):

FlagEnvDefaultNotes
--gatewayGATEWARDS_GATEWAY_URLhttp://localhost:3001Gateway base URL.
--api-keyGATEWARDS_API_KEYAgent key. Enables proxy mode.
--private-keyGATEWARDS_PRIVATE_KEY0x-prefixed key for x402 mode. Never sent anywhere.
--rpc-urlGATEWARDS_RPC_URLRequired for x402 mode.
--usdc-addressGATEWARDS_USDC_ADDRESSRequired for x402 mode.
--networkGATEWARDS_NETWORKbase-sepoliae.g. base, base-sepolia.
--merchantGATEWARDS_MERCHANT_URLRestrict absolute URLs to this origin.

Either --api-key or --private-key is required.

License

Apache-2.0