# Path402 MCP server

> Enables AI agents to discover, acquire, and re-serve tokenized web content using the $402 protocol.

- Repository: https://github.com/b0ase/path402
- Page: https://hostedmcp.org/servers/b0ase/path402
- Transport: stdio
- Stars: 1
- License: MIT
- Latest version: 1.3.2

## Install

### Claude Code

```sh
claude mcp add --env 'PATH402_WALLET_WIF=<YOUR_PATH402_WALLET_WIF>' path402 -- npx -y path402
```

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

```json
{
  "mcpServers": {
    "path402": {
      "command": "npx",
      "args": [
        "-y",
        "path402"
      ],
      "env": {
        "PATH402_WALLET_WIF": "<YOUR_PATH402_WALLET_WIF>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "path402": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "path402"
      ],
      "env": {
        "PATH402_WALLET_WIF": "<YOUR_PATH402_WALLET_WIF>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"path402","type":"stdio","command":"npx","args":["-y","path402"],"env":{"PATH402_WALLET_WIF":"<YOUR_PATH402_WALLET_WIF>"}}'
```

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

```json
{
  "mcpServers": {
    "path402": {
      "command": "npx",
      "args": [
        "-y",
        "path402"
      ],
      "env": {
        "PATH402_WALLET_WIF": "<YOUR_PATH402_WALLET_WIF>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add path402 --env 'PATH402_WALLET_WIF=<YOUR_PATH402_WALLET_WIF>' -- npx -y path402
```

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

```toml
[mcp_servers.path402]
command = "npx"
args = ["-y", "path402"]

[mcp_servers.path402.env]
PATH402_WALLET_WIF = "<YOUR_PATH402_WALLET_WIF>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'PATH402_WALLET_WIF=<YOUR_PATH402_WALLET_WIF>' path402 npx -- -y path402
```

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

```json
{
  "mcpServers": {
    "path402": {
      "command": "npx",
      "args": [
        "-y",
        "path402"
      ],
      "env": {
        "PATH402_WALLET_WIF": "<YOUR_PATH402_WALLET_WIF>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `PATH402_WALLET_WIF` | no | yes | BSV wallet private key (WIF format) for on-chain acquisitions |
| `PATH402_API_URL` | no | no | Base URL of the Path402 API server (default: https://path402.com) |
| `PATH402_AUTO_ACQUIRE` | no | no |  |
| `PATH402_DEFAULT_BUDGET` | no | no | Default spending budget in satoshis for token acquisitions |
| `PATH402_LOG_LEVEL` | no | no |  |
| `PATH402_MAX_SINGLE_SPEND` | no | no |  |
| `PATH402_WALLET_KEY` | no | no |  |

## Tools (16)

- `path402_discover`
- `path402_batch_discover`
- `path402_evaluate`
- `path402_economics`
- `path402_price_schedule`
- `path402_acquire`
- `path402_set_budget`
- `path402_wallet`
- `path402_transfer`
- `path402_history`
- `path402_serve`
- `path402_servable`
- `path402_register`
- `x402_verify`
- `x402_settle`
- `x402_inscription`

## FAQ

### What is the $402 protocol?

The $402 protocol turns URL paths into tokenized markets where any path prefixed with $ becomes an economic object.

### How is the token price determined?

Prices are determined by an ascending bonding curve based on the remaining treasury rather than speculation.

### Can AI agents become self-sustaining with this server?

Yes, agents can acquire tokens, serve content to others, earn revenue, and reinvest those profits into more tokens.

### Which blockchain networks are supported?

BSV is the primary settlement layer, but the protocol also supports Base, Solana, and Ethereum for various assets.
