LeanRigor MCP Server

LeanRigor MCP Server

A local-first MCP gateway that reduces context overhead in coding-agent sessions by exposing only relevant tools and enforcing task-appropriate engineering gates, with privacy-first defaults and no network calls until explicitly enabled.

Category
Visit Server

README

LeanRigor

Less context. Full engineering rigor.

A local-first, cross-agent engineering harness. LeanRigor removes unnecessary context from coding-agent sessions while preserving the design, test, security and verification gates the task's risk level actually requires.

npx leanrigor init

The contract

This is the part to read before the numbers.

  • Required engineering gates are never removed to save tokens. Verification is mandatory at every risk level; a critical task cannot skip its threat model, approval or rollback plan for any reason, including a token budget.
  • Savings count only for work that passed. A reduction achieved by producing a wrong answer is not a reduction, and it is excluded from every total.
  • Every number states its measurement mode and coverage. A local estimate is never called provider usage, and two measurement modes are never added together into an unlabelled total.
  • Nothing is destroyed. Every projection carries a handle that restores the original bytes, or is explicitly marked summary-only.
  • Telemetry is off by default, and leanrigor telemetry inspect prints the exact payload before you decide.
  • Energy figures are versioned estimate ranges, never datacenter measurements. See docs/environmental-methodology.md.

Measured result

From the deterministic corpus in evals/, reproducible with one command:

npx leanrigor benchmark
Metric Value Cases Measurement
Median context reduction 93.3% 8 passing byte-only
Pass-rate delta vs baseline 0.0 points 8 deterministic verifier
Completion rate 100% 8 —

Per-case figures, the raw result and the release-gate verdict are in docs/benchmarks/. Every percentage there states the case count and the measurement mode behind it.

What this does not claim. These cases measure what LeanRigor's own transformations do to a payload — no model is involved.

Skill evaluation

The skills have now been evaluated against a real model (Codex CLI, gpt-5.5), baseline versus with-skill, with deterministic checks:

Skill Baseline With skill Uplift Reps
senior-system-design 2/6 6/6 +66.7 points 1
product-brainstorming 0/5 4/5 +80.0 points 1
verification 16/20 18/20 +10.0 points 4

All three trigger descriptions are bounded: the router selected none of them on any of the nine non-trigger prompts.

Do not quote those numbers without the caveat. Running the verification suite three times on an unchanged configuration produced +40, +20 and −20 points. A 60-point swing means anything below roughly twenty points at n=1 is noise, and the two large results above are single runs. Full write-up, including the five defects found in the evaluation harness itself and the two found in the skills, is in docs/benchmarks/skill-eval.md.

What it does

Piece Job
MCP gateway Exposes 4 tools to your host instead of 200. Tools are searched, not broadcast; large results are stored locally and returned as a compact, handle-backed projection.
TokenLeaf Engine Measures what was actually saved, per measurement mode, and refuses to count savings from failed work.
Rigor Gates Classifies task risk deterministically — no model call — and selects the smallest sufficient set of engineering gates.
Verified Skills Three portable Agent Skills with licenses, provenance records, context budgets and evaluation suites.

Supported hosts

Host Status
Claude Code supported
Codex supported
Gemini CLI not yet; adapter planned

leanrigor init detects what is installed, previews every file change, backs up anything it modifies, and never writes before you confirm.

Commands

npx leanrigor init              # install, with a preview and confirmation
npx leanrigor init --dry-run    # show the plan, write nothing
npx leanrigor init --uninstall  # restore the original files
npx leanrigor doctor            # diagnose the installation
npx leanrigor mcp serve         # run the gateway (hosts launch this)
npx leanrigor benchmark         # run the reproducible benchmark
npx leanrigor report            # local session report
npx leanrigor report --share    # local SVG card, aggregate counts only
npx leanrigor skills list
npx leanrigor skills install verification
npx leanrigor telemetry status

Privacy defaults

No account. No network call of its own until you enable telemetry. Prompts, source code, file paths, repository names and tool payloads are never sent anywhere, at any setting — the ledger and telemetry schemas have no field that could carry them. See docs/privacy.md.

Uninstall

npx leanrigor init --uninstall

Files are restored to their original bytes. The only thing left behind is an append-only audit record under .leanrigor/.

Current limitations

Stated plainly, because a harness that overstates itself is worse than none:

  • Two of the three skill-uplift results are n=1, and run-to-run variance on this suite has reached 60 points. Re-run with --repeat before relying on them.
  • Four of the five verification cases do not discriminate — the baseline passes them every time, so they measure nothing. That suite needs harder cases.
  • Ablation has not been run. No section of any skill has yet been shown to earn the context it costs.
  • Every skill number comes from one CLI and one model.
  • The benchmark's gateway+workflow and gateway+workflow+skill conditions are not implemented yet; only baseline and gateway run today.
  • Risk classification is regex-and-path based. It is deliberately conservative and will over-classify before it under-classifies, but it is not clever.
  • The Codex adapter rewrites config.toml, which drops TOML comments. The install plan warns about this and the original is backed up.
  • No Gemini CLI adapter yet.
  • The published package bundles the internal @leanrigor/* workspaces; those APIs are not stable and are not published separately.

Documentation

Contributing

Bounded, ownable extension surfaces are documented in docs/extensions/: projectors, host adapters and skill packs. Each has an acceptance contract, so a contribution can be judged against a stated bar rather than a maintainer's mood.

License

Apache-2.0. Third-party notices, and the reuse ledger, are in THIRD_PARTY_NOTICES.md. No third-party source or prose has been copied into this repository.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured