dsh-rep-mcp
<div align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/dsh-rep-mcp-hero-en-dark.webp">
<img src="docs/assets/dsh-rep-mcp-hero-en-light.webp" width="100%" alt="dsh-rep-mcp: a sealed REP v1 record checked over stdio MCP — the manifest seal recomputes ok, the file hash is 6163d00e…, one 424-byte snapshot is reported not_checked without objectsDir, and the three claim verdicts verified / insufficient / disproven are listed on the right">
</picture>
# dsh-rep-mcp
**Verify a sealed REP record from any MCP client — without the harness.**
*`rep_verify` re-hashes the manifest seal and the file, `rep_inspect` lists every claim verdict, `rep_list` scans a directory: three read-only tools over newline-delimited JSON-RPC on stdio. No network, no write path, no DSH runtime.*
[简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
[](LICENSE)
[]()
</div>
---
## Tools
| Tool | Input | Output |
|---|---|---|
| `rep_verify` | `path`, optional `objectsDir` | manifest seal, file hash, snapshot checks, anchor quote checks, issues |
| `rep_inspect` | `path` | record id, counts, manifest summary, every claim's verdict |
| `rep_list` | `dir` (default `.`) | `*.rep.json` files (cap 200) with id/counts |
All three are read-only. There is no network access and no write path.
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/dsh-rep-mcp-flow-v5-dark.svg">
<img src="docs/assets/dsh-rep-mcp-flow-v5-light.svg" width="100%" alt="dsh-rep-mcp structure: a newline-delimited JSON-RPC request arrives over stdio, tools/call dispatches to the same verifyRecordFile the dsh-rep-verify CLI uses, which recomputes the manifest seal plus file and object hashes and anchor quotes, and returns ok and issues[]; rep_inspect and rep_list are read-only too">
</picture>
*Structure: transport → verify → report; `ok` and `issues[]` are the result, and snapshot bytes are `not_checked` unless `objectsDir` is supplied. The token labels inside the diagram are the real tool and field names, so the same picture serves all five languages.*
## Run it
```sh
# from a checkout
node lib/bin.js
# or from npm (after publish)
npx -y dsh-rep-mcp
```
The transport is MCP over stdio: one JSON-RPC message per line.
## Use it from DSH
DSH's MCP panel accepts any stdio server. Add:
```json
{
"mcpServers": {
"rep": {
"command": "npx",
"args": ["-y", "dsh-rep-mcp"]
}
}
}
```
Then ask the agent to `rep_verify` the report it just produced. The same server
works in any other MCP client (editor, desktop app, CI wrapper).
## Example
```json
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"rep_verify","arguments":{"path":"report.rep.json","objectsDir":".research-rep/objects"}}}
```
`rep_verify` without `objectsDir` still checks the manifest seal and anchor
quotes; snapshot bytes are reported as not checked.
## What it does not do
- **No writing, sealing or repairing.** It verifies and reports.
- **No network.** No Crossref, no Zotero, no telemetry.
- **No semantic checking.** Claim support is `dsh-claim-check`; this server reports what the record says.
- **No DSH plugin row.** It is a standard MCP server; DSH consumes it through the MCP panel.
## Development

*Animated: the repository's own gate after `pnpm install --ignore-scripts && pnpm run build` — `pnpm test --reporter=verbose` and `pnpm run verify:package` (re-run 2026-11-21). The seal test drives `test/fixtures/valid-sealed.rep.json` through the same handler the MCP server exposes.*
```sh
pnpm install
pnpm run check:lockfile
pnpm run typecheck
pnpm test
pnpm run build
pnpm run verify:package
```
The lockfile is committed exactly as `pnpm install --lockfile-only` writes it (two documents: pnpm's own package-manager document, then the project document), so a local install does not rewrite it. `pnpm run check:lockfile` fails when the lockfile drifts from `package.json` or loses that form.
Tests drive the handler directly and also exercise the newline-delimited stdio
loop; the fixture is a sealed REP record from `dsh-research-core`.
## License
Apache-2.0. See [LICENSE](LICENSE).
TDQS
Scored across 3 tools
The three tools have mostly distinct purposes: listing records, inspecting summaries, and verifying integrity. However, rep_verify and rep_inspect both read and analyze a REP record, so an agent may briefly hesitate between them despite the clear description differences.
All tools use the same rep_verb convention: rep_verify, rep_inspect, and rep_list. The naming is predictable and easy to scan.
Three tools are well-scoped for a read-only REP record inspection server. Each tool maps to a distinct operation: listing, summarizing, and verifying.
The core read-only audit workflow is covered by list, inspect, and verify. However, there is no tool to retrieve the raw record or filter/search across records, which may limit agents that need deeper access than summaries and verification results.