# footnote

Prevents fabricated figures in finance and ERP queries by tying every output number to underlying database records.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: brick-byte
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/brick-byte/footnote
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/footnote

## What it does

The server changes how the model interacts with enterprise records. Instead of letting the language model write raw SQL or aggregate totals, it forces the assistant to pick typed operations from a strict catalog. Parameter validation and query execution run deterministically in the database engine, and values are injected directly into structured slots.

Every result gets saved into an append-only log with hash chaining. This audit trail records the exact entity rows, timestamps, and parameters behind each statement, making the claims tamper-evident and inspectable by human reviewers.

Running the server requires Node.js 22.5+ to utilize built-in SQLite support. An external PostgreSQL connection is entirely optional, since test seeds can run directly on the local SQLite setup.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `DATABASE_URL`, `PROVENANCE_DB`, `PROVENANCE_ACTOR` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env DATABASE_URL=<DATABASE_URL> --env PROVENANCE_DB=<PROVENANCE_DB> --env PROVENANCE_ACTOR=<PROVENANCE_ACTOR> --transport stdio footnote -- npx -y @brick-byte/footnote
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add footnote --env DATABASE_URL=<DATABASE_URL> --env PROVENANCE_DB=<PROVENANCE_DB> --env PROVENANCE_ACTOR=<PROVENANCE_ACTOR> -- npx -y @brick-byte/footnote
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "footnote": {
            "command": "npx",
            "args": [
                "-y",
                "@brick-byte/footnote"
            ],
            "env": {
                "DATABASE_URL": "<DATABASE_URL>",
                "PROVENANCE_DB": "<PROVENANCE_DB>",
                "PROVENANCE_ACTOR": "<PROVENANCE_ACTOR>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "footnote": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@brick-byte/footnote"
            ],
            "env": {
                "DATABASE_URL": "<DATABASE_URL>",
                "PROVENANCE_DB": "<PROVENANCE_DB>",
                "PROVENANCE_ACTOR": "<PROVENANCE_ACTOR>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e DATABASE_URL=<DATABASE_URL> -e PROVENANCE_DB=<PROVENANCE_DB> -e PROVENANCE_ACTOR=<PROVENANCE_ACTOR> footnote npx -y @brick-byte/footnote
```
Replace <…> with your own values

## When to use it
- Eliminate hallucinated figures during automated financial reviews
- Build tamper-evident audit trails for LLM responses over business data
- Prevent arbitrary SQL generation on production database tables
- Safely report empty query results without triggering model fabrication

## Example prompts
- List all overdue balances for Bergmann with underlying invoice IDs
- Review open support tickets and fetch their severity records from ERP
- Calculate total outstanding balance across unpaid vendor accounts

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44591
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5469
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2817
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2197
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
