Get the FREE Ultimate OpenClaw Setup Guide →

tenets

Local-first MCP server for intelligent context that feeds your prompts

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jddunn-tenets pipx run tenets[mcp]

How to use

tenets is an MCP server that powers AI coding assistants with intelligent code context and automatic guiding principles. It ingests your local codebase, finds and ranks relevant files using BM25, TF-IDF, and lightweight ML signals, then summarizes and injects your defined tenets (coding standards, architecture rules, and security requirements) into prompts automatically. This helps keep conversations focused on the most pertinent code while ensuring your team’s standards are consistently applied across prompts and sessions. The server exposes tools such as distill (builds a context slice from your repository), rank (previews what would be included in a context window), and examine (inspects candidate files). It also offers session-focused commands (session_pin_folder, session_), tenet_ tools for manipulating injected tenets, and a get_tool_schema / search_tools set for on-demand discovery. MCP transports include stdio, SSE, and HTTP, and the server can be integrated with Cursor, Claude Desktop, Windsurf, and VS Code via the MCP protocol.

How to install

Prerequisites: Python 3.9 or newer, pip (or pipx for isolated tooling), and a working network isolated from external API calls if you want 100% local processing. Recommended installation uses pipx to install the MCP-enabled CLI and server. Steps:

  1. Install prerequisites:

    • Ensure Python 3.9+ is installed
    • Install pipx (if not already installed):
      • macOS/Linux: python3 -m pip install --user pipx && python3 -m pipx ensurepath
      • Windows: py -m pip install --user pipx && pipx ensurepath
  2. Install the MCP-enabled Tenets package:

    • Using pipx (recommended): pipx install tenets[mcp]
  3. Run the MCP server:

    • Start the server (this launches the MCP server process): tenets-mcp
  4. Alternative installation (non-pipx):

    • With pip (MCP dependencies included): pip install tenets[mcp] tenets-mcp
  5. Configure your MCP client configuration to point at the server transport you choose (stdio, SSE, or HTTP) as described in the Tenets MCP docs: https://tenets.dev/MCP/

  6. Optional: install additional extras as needed (viz, ml, etc.): pip install tenets[mcp,ml,viz] # if you want ML embeddings and visualization features

Additional notes

Notes and tips:

  • The MCP server is designed for 100% local processing; ensure your environment has access to your codebase and dependencies without uploading data externally.
  • If you encounter ImportError: MCP dependencies not installed, ensure you installed with the [mcp] extra and that tenets-mcp is on your PATH.
  • When using pipx, you can run the MCP server with a dedicated virtual environment for isolation and easier updates.
  • The MCP tool surface includes distill, rank, examine, session_* commands, tenet_* commands, and tools like search_tools and get_tool_schema for dynamic discovery.
  • For IDE integrations, follow the docs at https://tenets.dev/MCP/ to configure your transport (stdio/SSE/HTTP) and ensure the client has access to the server binary.

Related MCP Servers

Sponsor this space

Reach thousands of developers