Skip to main content
Glama
README.md
# recordproof

Can a digital record be trusted at face value? recordproof is a local forwarding client for the hosted Eformogi records vault MCP service: it answers `tools/list` locally from the captured tool definitions and forwards every call to the service, returning the answers exactly as the service sends them back.

With it you can check an Eformogi receipt id against the vendor's public verification register — the same check the public /verify page performs, with no login and no API key — read what Eformogi is and what it costs, and read the vendor's published open record standard, chapter by chapter or as a full list. There is no write, signup, or send tool in this surface.

## The tools

- **`verify_record`** — Verify a record by its receipt `id` (required; a prefix such as `tr_`, `cr_`, `ws_`, `att_`, `wn_`, `wl_`, or `kb_` followed by 12 hex characters). Returns the record kind, title or course fields, issued date, and the signers' names and identity levels.
- **`how_eformogi_works`** — What Eformogi is and what it costs: the thesis sentence and the pricing paragraph, plus the key public pages. Takes no arguments.
- **`read_spec`** — Read the open Eformogi record standard. With no `chapter`, lists every published chapter; with a chapter slug (for example `record-model`), returns that chapter's markdown text. `chapter` is optional.

## Install and run

As an MCP server via npm:

```bash
npx -y @reneturcios/recordproof mcp
```

MCP client configuration:

```json
{
  "mcpServers": {
    "recordproof": {
      "command": "npx",
      "args": ["-y", "@reneturcios/recordproof", "mcp"]
    }
  }
}
```

As a container:

```bash
docker run -i ghcr.io/cloudcorprecords/recordproof
docker run --rm ghcr.io/cloudcorprecords/recordproof verify_record '{"id":"tr_0123456789ab"}'
```

## CLI

One binary serves both the command line and the MCP server. Each tool is a subcommand taking a single JSON string with that tool's arguments:

```bash
recordproof verify_record '{"id":"tr_0123456789ab"}'
recordproof how_eformogi_works '{}'
recordproof read_spec '{"chapter":"record-model"}'
recordproof --version
```

Exit codes: `0` when the forwarded call succeeds, `1` when the upstream result is an error, and `2` for usage problems such as an unknown subcommand or a malformed JSON argument.

## Configuration

- `RECORDPROOF_MCP_URL` — Overrides the upstream endpoint. The default is the pinned hosted endpoint, `https://eformogi.com/api/mcp`. (The override variable is a reconstruction added by this rebuild.)

The upstream registry record declares no headers, so no authentication header is ever sent; the tool surface was captured keyless.

Upstream failures — a JSON-RPC error from the service, a non-2xx response, an unreadable body, or a request that fails outright — are reported to the caller as an error result whose text starts with `recordproof error:`.

## How forwarding works

The first forwarded call opens a session: an `initialize` request (protocol version `2025-03-26`), followed by a `notifications/initialized` notification, then the `tools/call` itself. If the service answers the initialize request with an `Mcp-Session-Id` header, that value is carried on every later request, and the open session is reused for the rest of the process. Replies are accepted either as plain JSON or as server-sent events. Successful results pass through verbatim, including any `isError` flag and any extra fields the service includes.

## Development

```bash
npm install
npm run build   # tsc -> dist/ (dist/cli.js is the bin)
npm test        # tsx --test test/*.test.ts — stubbed upstream, no network
npm run dev     # run the CLI from source
```

The test suite checks the served tool list against the captured surface (the 3 tools, deep-equal, with their `title` keys and `required` lists exactly as captured, including the tool that carries no `required` key at all), exercises the session handshake and its reuse, verifies that no `Authorization` or `X-API-Key` header is ever sent under any environment, and verifies that arguments go upstream untouched and results come back untouched.

## License

MIT — see `LICENSE`. Copyright (c) 2026 Rene Turcios.