# X402 Bazaar MCP

> X402 Bazaar MCP is an open-source MCP server. Check, then act, on Base and NEAR: token-safety gates, then swaps at the best price — over x402. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Repository:** https://github.com/sukrutkrdg/x402-bazaar-mcp
- **MCP Registry name:** io.github.sukrutkrdg/x402-bazaar-mcp
- **Listing updated:** 2026-11-13

## About

Check, then act, on Base and NEAR: token-safety gates, then swaps at the best price — over x402.

## Install

### Claude Code (Terminal)

```sh
claude mcp add x402-bazaar-mcp --env X402_CREDIT_TOKEN='<X402_CREDIT_TOKEN>' --env AGENT_PRIVATE_KEY='<AGENT_PRIVATE_KEY>' -- npx -y x402-bazaar-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "x402-bazaar-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "x402-bazaar-mcp"
      ],
      "env": {
        "X402_CREDIT_TOKEN": "<X402_CREDIT_TOKEN>",
        "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "x402-bazaar-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "x402-bazaar-mcp"
      ],
      "env": {
        "X402_CREDIT_TOKEN": "<X402_CREDIT_TOKEN>",
        "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "x402-bazaar-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "x402-bazaar-mcp"
      ],
      "env": {
        "X402_CREDIT_TOKEN": "<X402_CREDIT_TOKEN>",
        "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "x402-bazaar-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "x402-bazaar-mcp"
      ],
      "env": {
        "X402_CREDIT_TOKEN": "<X402_CREDIT_TOKEN>",
        "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "x402-bazaar-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "x402-bazaar-mcp"
      ],
      "env": {
        "X402_CREDIT_TOKEN": "<X402_CREDIT_TOKEN>",
        "AGENT_PRIVATE_KEY": "<AGENT_PRIVATE_KEY>"
      }
    }
  }
}
```

## FAQ

### Is X402 Bazaar MCP free?

Yes. X402 Bazaar MCP is open source, so you can use and self-host it for free.

### How do I add X402 Bazaar MCP to Claude Code?

Run this command in your terminal: claude mcp add x402-bazaar-mcp --env X402_CREDIT_TOKEN='<X402_CREDIT_TOKEN>' --env AGENT_PRIVATE_KEY='<AGENT_PRIVATE_KEY>' -- npx -y x402-bazaar-mcp

## Where this comes from

- Description: from the official MCP Registry entry.
- Install steps: from the official MCP Registry entry.

---
Source: https://ai-powered.com/mcp/x402-bazaar-mcp
