Labsco
MCP SERVER

Tenets

by jddunn

Gather the code that actually matters for a task, and re-inject your coding rules into every prompt so long conversations stop drifting.

Codebase Context Packing & Compression
Summary
The tenets are the point — standards get re-injected, not remembered.

Context retrieval is the visible half, but the thing that changes long sessions is re-injection: rules like "use Decimal for money, never float" go back into every generated context, so the model does not quietly forget them at turn forty. Two practical notes — the `[mcp]` extra is mandatory and its absence fails at runtime rather than install, and the rank tool is the cheap way to see what would be included before paying for a full distill.

What it is

A context server for coding assistants doing two jobs. It ranks and aggregates the relevant files for a request using BM25, TF-IDF, import centrality and git signals — and it injects your guiding principles, the tenets, into generated context so standards survive a long session. All processing is local; no code leaves the machine.

What you get
  • `tenets_distill` finds and returns the most relevant code with metadata; `tenets_rank_files` lists the same ranking without fetching content, at roughly 500ms against about 3s
  • `tenets_session` manages persistent sessions with `create`, `list`, `pin_file` and `pin_folder` — pinned files are always included
  • `tenets_tenet` adds and lists guiding principles at critical, high, medium or low priority, and instills them into a session
  • `tenets_system_instruction` sets a one-time instruction injected into all generated context
  • `tenets_examine` reports structure, complexity and hotspots; `tenets_chronicle` reads git history; `tenets_momentum` tracks velocity
  • `tenets_search_tools` and `tenets_get_tool_schema` let the model discover the rest on demand instead of loading every schema
  • Three ranking modes: fast for keyword and path matching, balanced with BM25 by default, thorough with ML semantic similarity and dependency graphs
Requirements

The Python package `tenets`, version 0.13.3, installed with the mcp extra — `pip install tenets[mcp]` or `pipx install tenets[mcp]`. Without that extra the `tenets-mcp` executable exists but fails at launch with an ImportError. Register it with `claude mcp add tenets -s user -- tenets-mcp`, or add `{"command": "tenets-mcp"}` to your client's MCP config. Python 3.9+. Semantic embeddings and the reranker need `tenets[ml]`, which is a 2GB+ install.

Setup effort

One command — pipx install tenets[mcp]