# footnote MCP server

> Prevents AI hallucinations in finance and ERP data by tracing every numerical figure back to its specific database source rows.

- Repository: https://github.com/brick-byte/footnote
- Page: https://hostedmcp.org/servers/brick-byte/footnote
- Transport: stdio
- Stars: 0
- License: MIT
- Latest version: 0.2.0

## Install

### Claude Code

```sh
claude mcp add --env 'DATABASE_URL=<YOUR_DATABASE_URL>' footnote -- npx -y @brick-byte/footnote
```

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

```json
{
  "mcpServers": {
    "footnote": {
      "command": "npx",
      "args": [
        "-y",
        "@brick-byte/footnote"
      ],
      "env": {
        "DATABASE_URL": "<YOUR_DATABASE_URL>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "footnote": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@brick-byte/footnote"
      ],
      "env": {
        "DATABASE_URL": "<YOUR_DATABASE_URL>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"footnote","type":"stdio","command":"npx","args":["-y","@brick-byte/footnote"],"env":{"DATABASE_URL":"<YOUR_DATABASE_URL>"}}'
```

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

```json
{
  "mcpServers": {
    "footnote": {
      "command": "npx",
      "args": [
        "-y",
        "@brick-byte/footnote"
      ],
      "env": {
        "DATABASE_URL": "<YOUR_DATABASE_URL>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add footnote --env 'DATABASE_URL=<YOUR_DATABASE_URL>' -- npx -y @brick-byte/footnote
```

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

```toml
[mcp_servers.footnote]
command = "npx"
args = ["-y", "@brick-byte/footnote"]

[mcp_servers.footnote.env]
DATABASE_URL = "<YOUR_DATABASE_URL>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'DATABASE_URL=<YOUR_DATABASE_URL>' footnote npx -- -y @brick-byte/footnote
```

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

```json
{
  "mcpServers": {
    "footnote": {
      "command": "npx",
      "args": [
        "-y",
        "@brick-byte/footnote"
      ],
      "env": {
        "DATABASE_URL": "<YOUR_DATABASE_URL>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `DATABASE_URL` | no | yes | Postgres connection string. Omit to use the built-in SQLite sample database. |
| `PROVENANCE_ACTOR` | no | no | Identity recorded against each provenance record. In production this comes from the request's auth. |
| `PROVENANCE_DB` | no | no | Path to the SQLite provenance log. Defaults to in-memory, which discards the trail on exit. |

## FAQ

### How does footnote prevent hallucinations?

It ensures the model never generates numbers itself; instead, values are copied verbatim from structured database outputs into template slots.

### Can the server modify my existing ERP database?

No, the server uses a read-only role at the session level and enforces a statement timeout to ensure it never writes to or damages your system.

### Where is the audit trail stored?

The provenance log is stored in a separate, append-only database to ensure the audit trail is decoupled from the system being audited.

### Is the provenance log secure?

Yes, the log is tamper-evident because each record carries a hash of its predecessor.
