Work04
local-llm-mcp
An MCP server that lets Claude Code hand small text jobs (summaries, extraction, line labels, code reviews, questions about files) to models on my own GPU, and checks every answer before Claude sees it.
- Status
- In daily use
- Built
- Sep–Nov 2026
- Role
- Solo, directing Claude Code agents
- Stack
- Node, MCP SDK, Ollama, qwen3:8b, qwen3.6:35b
- Code
- Private repository
7/7
planted bugs found when the local model’s review is checked by a scanner (model alone: 5/7)
01Problem
Claude's context and usage are limited. Many jobs (summarise this log, pull these values) don't need a frontier model, but a small model's answer can't be trusted blindly.
02What I built
- Five tools: summarize_file, extract_json, classify_lines, review_files, ask_files. They read files themselves, so file contents never enter Claude's context.
- Routing by size: up to ~16k characters on qwen3:8b on the GPU; up to ~78k on qwen3.6:35b split across GPU and RAM; a cloud fallback beyond that, and anything bigger is refused, never truncated.
- Server-side verification: answers that cite lines are checked against the real file; anything that fails comes back as FAILED.
- Files that look like they hold secrets never go to the cloud.
- A built-in regex security scanner added to code reviews.
03How it was tested
60 unit tests; an end-to-end suite of 17 local checks; a review test with 7 planted bugs.
04Results
| Check | Result |
|---|---|
| Unit tests | 60/60 |
| Local end-to-end checks | 17/17 |
| Planted bugs found, model alone | 5/7 |
| Planted bugs found, with the scanner | 7/7 |
The three cloud checks failed only because the cloud account was out of credits; the cloud path is a dormant fallback.
05What I learned
Verification is the product. A small model that is checked is more useful than a big one that is trusted.
06Links
Private repository.