# Agent Commerce Gateway MCP server

> Expose an existing HTTP API to AI agents for discovery, calls, and payments without modifying the backend.

- Repository: https://github.com/devlab-group/agent-commerce
- Page: https://hostedmcp.org/servers/devlab-group/agent-commerce
- Official: yes
- Transport: stdio
- Stars: 71
- License: Apache-2.0

## Install

### Claude Code

```sh
claude mcp add agent-commerce -- npx -y @devlab.group/agent-commerce
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "agent-commerce": {
      "command": "npx",
      "args": [
        "-y",
        "@devlab.group/agent-commerce"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "agent-commerce": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@devlab.group/agent-commerce"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"agent-commerce","type":"stdio","command":"npx","args":["-y","@devlab.group/agent-commerce"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "agent-commerce": {
      "command": "npx",
      "args": [
        "-y",
        "@devlab.group/agent-commerce"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add agent-commerce -- npx -y @devlab.group/agent-commerce
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.agent-commerce]
command = "npx"
args = ["-y", "@devlab.group/agent-commerce"]
```

### Gemini CLI

```sh
gemini mcp add -s user agent-commerce npx -- -y @devlab.group/agent-commerce
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "agent-commerce": {
      "command": "npx",
      "args": [
        "-y",
        "@devlab.group/agent-commerce"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `DISABLE_TELEMETRY` | no | no |  |

## FAQ

### How do I expose my existing HTTP API to AI agents?

You run the gateway in your infrastructure and describe each endpoint in YAML, or import an OpenAPI spec to generate draft resource definitions. Resources can then be served over HTTP, MCP, or A2A.

### Does the gateway hold my private keys or buyer funds?

No. It is non-custodial: payments go directly to the merchant wallet and the gateway needs neither the buyer's nor the merchant's private key.

### Which payment protocols does Agent Commerce Gateway support?

Paid resources use x402 or experimental MPP, and can additionally require an AP2 mandate proving the buyer approved the purchase.

### What Node version does the gateway require?

It requires Node >= 22. The package ships an agent-commerce CLI with commands such as init, validate, start, doctor, and import openapi.

### Can I try it without real money or API keys?

Yes. The quickstart uses Docker Compose to bring up a disposable local stack with Anvil, MockUSDC, a demo merchant API, the gateway, and a dashboard, then runs a demo where an agent buys something.
