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 Tenets | With Tenets |
|---|---|
| AI guesses which files to read | AI gets ranked, relevant files |
| Manual @-mentioning of files | Automatic context building |
| Context window filled with noise | Token-optimized, high-signal context |
| Each prompt starts fresh | Persistent sessions with pinned files |
Quick Setup (2 minutes)¶
Step 1: Install¶
Step 2: Configure Cursor¶
Create or edit ~/.cursor/mcp.json:
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¶
| Tool | What It Does |
|---|---|
distill | Build optimized context for any task |
rank_files | Preview file relevance scores |
examine | Analyze codebase structure |
session_create | Create persistent sessions |
session_pin_file | Pin critical files |
tenet_add | Add 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¶
Full Path (Recommended)¶
If Cursor can't find tenets-mcp, use the absolute path:
Multiple Projects¶
{
"mcpServers": {
"tenets-frontend": {
"command": "tenets-mcp",
"args": ["--path", "/projects/frontend"]
},
"tenets-backend": {
"command": "tenets-mcp",
"args": ["--path", "/projects/backend"]
}
}
}
Debug Mode¶
{
"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"¶
- Restart Cursor completely (not just reload)
- Check JSON syntax in config file
- Verify config file location is correct
"Server timeout"¶
For large codebases, add exclusions to .tenets.yml:
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