Skip to content

Tenets MCP Server for Cursor IDE

Free, open source MCP server that gives Cursor's AI the intelligent code context it needs. NLP-powered ranking finds relevant files automatically.

Why Use Tenets with Cursor?

Without TenetsWith Tenets
AI guesses which files to readAI gets ranked, relevant files
Manual @-mentioning of filesAutomatic context building
Context window filled with noiseToken-optimized, high-signal context
Each prompt starts freshPersistent sessions with pinned files

Quick Setup (2 minutes)

Step 1: Install

Bash
pip install tenets[mcp]

Step 2: Configure Cursor

Create or edit ~/.cursor/mcp.json:

JSON
{
  "mcpServers": {
    "tenets": {
      "command": "tenets-mcp"
    }
  }
}

Step 3: Restart Cursor

Quit and reopen Cursor for the MCP server to connect.

Step 4: Use It

In Cursor's AI chat, try:

"Use tenets to find the authentication code"

Cursor will call the Tenets MCP server and get ranked, relevant files.

What Tenets Provides to Cursor

Tools

ToolWhat It Does
distillBuild optimized context for any task
rank_filesPreview file relevance scores
examineAnalyze codebase structure
session_createCreate persistent sessions
session_pin_filePin critical files
tenet_addAdd coding guidelines

Example Interactions

Find code:

"Use tenets to find the payment processing code"

Build context for a task:

"Use tenets distill to get context for implementing OAuth2"

Pin important files:

"Use tenets to pin src/auth/ to session auth-feature"

Add guidelines:

"Use tenets to add a tenet: Always validate user input"

Advanced Configuration

If Cursor can't find tenets-mcp, use the absolute path:

Bash
# Find the path
which tenets-mcp
JSON
{
  "mcpServers": {
    "tenets": {
      "command": "/usr/local/bin/tenets-mcp"
    }
  }
}

Multiple Projects

JSON
{
  "mcpServers": {
    "tenets-frontend": {
      "command": "tenets-mcp",
      "args": ["--path", "/projects/frontend"]
    },
    "tenets-backend": {
      "command": "tenets-mcp",
      "args": ["--path", "/projects/backend"]
    }
  }
}

Debug Mode

JSON
{
  "mcpServers": {
    "tenets": {
      "command": "tenets-mcp",
      "env": {
        "TENETS_LOG_LEVEL": "DEBUG"
      }
    }
  }
}

Troubleshooting

"Command not found"

Use absolute path to tenets-mcp. Find it with which tenets-mcp.

"Tools not showing"

  1. Restart Cursor completely (not just reload)
  2. Check JSON syntax in config file
  3. Verify config file location is correct

"Server timeout"

For large codebases, add exclusions to .tenets.yml:

YAML
scanner:
  exclude:
    - node_modules/
    - dist/
    - build/

Why Tenets?

  • Free & open source — MIT license, no cost
  • 100% local — Your code never leaves your machine
  • NLP-powered — BM25, TF-IDF, import graph analysis
  • Fast — Analyzes thousands of files in seconds

Next Steps


Tenets is 100% free and open source.

MIT License · GitHub · PyPI