# SPR MCP server

> Records and seals AI agent payments as signed records on your local machine to ensure auditability and intent verification.

- Repository: https://github.com/luca-network/spr
- Page: https://hostedmcp.org/servers/luca-network/spr
- Transport: stdio
- Stars: 0
- License: Apache-2.0
- Latest version: 0.2.0

## Install

### Claude Code

```sh
claude mcp add --env 'SPR_AGENT_ID=<SPR_AGENT_ID>' --env 'SPR_ENTITY=<SPR_ENTITY>' spr -- npx -y @luca-network/spr-mcp
```

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

```json
{
  "mcpServers": {
    "spr": {
      "command": "npx",
      "args": [
        "-y",
        "@luca-network/spr-mcp"
      ],
      "env": {
        "SPR_AGENT_ID": "<SPR_AGENT_ID>",
        "SPR_ENTITY": "<SPR_ENTITY>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "spr": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@luca-network/spr-mcp"
      ],
      "env": {
        "SPR_AGENT_ID": "<SPR_AGENT_ID>",
        "SPR_ENTITY": "<SPR_ENTITY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"spr","type":"stdio","command":"npx","args":["-y","@luca-network/spr-mcp"],"env":{"SPR_AGENT_ID":"<SPR_AGENT_ID>","SPR_ENTITY":"<SPR_ENTITY>"}}'
```

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

```json
{
  "mcpServers": {
    "spr": {
      "command": "npx",
      "args": [
        "-y",
        "@luca-network/spr-mcp"
      ],
      "env": {
        "SPR_AGENT_ID": "<SPR_AGENT_ID>",
        "SPR_ENTITY": "<SPR_ENTITY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add spr --env 'SPR_AGENT_ID=<SPR_AGENT_ID>' --env 'SPR_ENTITY=<SPR_ENTITY>' -- npx -y @luca-network/spr-mcp
```

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

```toml
[mcp_servers.spr]
command = "npx"
args = ["-y", "@luca-network/spr-mcp"]

[mcp_servers.spr.env]
SPR_AGENT_ID = "<SPR_AGENT_ID>"
SPR_ENTITY = "<SPR_ENTITY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'SPR_AGENT_ID=<SPR_AGENT_ID>' -e 'SPR_ENTITY=<SPR_ENTITY>' spr npx -- -y @luca-network/spr-mcp
```

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

```json
{
  "mcpServers": {
    "spr": {
      "command": "npx",
      "args": [
        "-y",
        "@luca-network/spr-mcp"
      ],
      "env": {
        "SPR_AGENT_ID": "<SPR_AGENT_ID>",
        "SPR_ENTITY": "<SPR_ENTITY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `SPR_AGENT_ID` | yes | no | The agent's ID, such as agt_research |
| `SPR_ENTITY` | yes | no | The company the agent pays for |
| `SPR_BINDING` | no | no | on, to return the nonce to sign with each x402 intent |
| `SPR_DIR` | no | no | The book's folder (default ./spr-books); it holds the company's private key |
| `SPR_TIME_ZONE` | no | no | The company's time zone for accounting dates (default UTC) |

## FAQ

### Where are the payment records stored?

Records are stored locally on your own machine in a directory specified by the SPR_DIR environment variable.

### Does the MCP server send data to Luca?

No, the local packages run on your machine and do not make any calls to Luca; Luca's hosted service is a separate product.

### What information is included in a payment record?

A record includes the declared purpose, spending limits, expiration, actual amount paid, the payment rail, the recipient, and whether the payment matched the declaration.
