How to Use CCE with Cursor
+Set up Code Context Engine in Cursor. Works alongside built-in indexing. One command, no conflicts.
+ +Why add CCE to Cursor?
+Cursor has built-in code indexing. So why add CCE? Three reasons:
+-
+
- Cross-session memory. Cursor starts fresh every session. CCE remembers decisions, architectural context, and code areas across sessions. +
- Token savings tracking. Cursor doesn't tell you how many tokens it used. CCE tracks every query with dollar amounts. +
- Multi-editor portability. If you also use Claude Code, VS Code, or Gemini CLI, CCE's index follows you. Cursor's doesn't. +
CCE does not replace Cursor's indexing. They run side by side. Cursor's built-in features (tab completion, inline edits, apply) still use its own index. CCE adds MCP-based semantic search on top.
+Setup (2 minutes)
+ +Install CCE
+uv tool install code-context-engine+
Or pipx install code-context-engine. Requires Python 3.11+.
Initialize in your project
+cd /path/to/your/project +cce init+
CCE auto-detects Cursor and writes .cursor/mcp.json plus .cursorrules with search instructions.
Restart Cursor
+That's it. Cursor now has access to CCE's 9 MCP tools. The AI will use context_search automatically when exploring your code.
What gets created
+| File | Purpose |
|---|---|
.cursor/mcp.json | Registers CCE as an MCP server |
.cursorrules | Tells Cursor's AI to use context_search instead of reading files |
.gitignore | CCE entries added (local cache, settings) |
Verify it works
+cce search "your feature name"+
If results come back with token counts, CCE is working. In Cursor, ask the AI any question about your codebase. It should call context_search instead of reading entire files.
Check your savings
+cce savings+
Shows tokens saved, dollar amounts, and per-layer breakdown. Run after a few Cursor sessions to see the impact.
+ +What CCE gives Cursor's AI
+| Tool | What it does |
|---|---|
context_search | Semantic search across your codebase |
expand_chunk | Get full source for a compressed result |
related_context | Find imports, callers, dependencies |
session_recall | Recall past decisions |
record_decision | Save decisions for next session |
CCE vs Cursor indexing: what handles what
+| Feature | Cursor built-in | CCE |
|---|---|---|
| Tab completion | Yes | No |
| Inline edits | Yes | No |
| Semantic code search | Yes | Yes (MCP) |
| Cross-session memory | No | Yes |
| Token savings tracking | No | Yes |
| Works in other editors | No | Yes (6 editors) |
| Code stays local | No (cloud) | Yes |
Troubleshooting
+ +Cursor doesn't use context_search
+Check that .cursor/mcp.json exists and Cursor was restarted after cce init. Cursor needs a restart to pick up new MCP servers.
Index seems stale
+Git hooks reindex on every commit. If you haven't committed, run cce index manually. Or run cce watch in a separate terminal for real-time updates.
Want to remove CCE
+cce uninstall+
Removes all CCE files, config, hooks, and index data. Cursor's built-in indexing is unaffected.
+ +Try it now
+One command. Works alongside Cursor's built-in indexing. No conflicts.
+uv tool install code-context-engine && cce init+ View on GitHub +