review-gate-mcp
by ravnlab
README.md
# review-gate-mcp
An MCP server that **asks a human when it isn't sure**.
Most extraction demos guess. This one implements the pattern that makes
automation safe to run on documents that matter: fields extracted with high
confidence flow through; anything uncertain is **held in a review queue** for
a person to resolve - never silently guessed into your systems.
```
document ──▶ extract_with_gate ──▶ confident fields ──▶ your system
│
└──▶ uncertain fields ──▶ review_queue ──▶ a human ──▶ resolve_review
```
## Tools
| tool | what it does |
|---|---|
| `extract_with_gate` | extract `invoice_number`, `total_amount`, `date`, `email`, `vendor_name` from text; confidence below 0.85 goes to the queue instead of the output |
| `review_queue` | list items waiting for a human decision |
| `resolve_review` | a human supplies the verified value, closing the loop |
## Run it
```
npm install
npm test # end-to-end over real MCP stdio: extract -> hold -> human resolve
```
Add to Claude Code / Claude Desktop / Cursor (any MCP client):
```json
{
"mcpServers": {
"review-gate": { "command": "node", "args": ["/path/to/review-gate-mcp/server.js"] }
}
}
```
Then ask your agent to extract fields from a pasted document and watch what
it does with the smudged one.
## The point
The extractors here are deliberately transparent heuristics - swap in a
model-backed extractor and the gate stays identical. The pattern is the
product: **a system that escalates its hard cases beats one that guesses
them.** This is the standard RavnLab builds automation to; the evaluation
side of the same idea lives in
[ravnlab-eval-harness](https://github.com/ravnlab/ravnlab-eval-harness).
MIT. Built by [RavnLab](https://ravnlab.com).
TDQS
A3.9/5.0
Scored across 3 tools
Disambiguation5/5
Each tool has a clearly distinct purpose: extraction, resolving held items, and listing the queue. No overlap or ambiguity between the three.
Naming Consistency4/5
All tool names use snake_case and follow a verb-focused pattern (extract_with_gate, resolve_review, review_queue). The 'with_gate' modifier is slightly unconventional but consistent within the set.
Tool Count4/5
Three tools is appropriate for the narrow domain of document extraction with human review. The count feels minimal but sufficient for the core workflow.
Completeness4/5
The toolset covers the primary extraction workflow (extract, review queue, resolve). Minor gaps like skipping or rejecting items are absent but not critical for the stated purpose.