Local Code Indexing for Cursor
A Python-based server that locally indexes codebases using ChromaDB to provide semantic search for tools like Cursor.
Local Code Indexing for Cursor
An experimental Python-based server that locally indexes codebases using ChromaDB and provides a semantic search tool via an MCP (Model Context Protocol) server for tools like Cursor.
Setup
-
Clone and enter the repository:
git clone <repository-url> cd cursor-local-indexing -
Create a
.envfile by copying.env.example:cp .env.example .env -
Configure your
.envfile:PROJECTS_ROOT=~/your/projects/root # Path to your projects directory FOLDERS_TO_INDEX=project1,project2 # Comma-separated list of folders to indexExample:
PROJECTS_ROOT=~/projects FOLDERS_TO_INDEX=project1,project2 -
Start the indexing server:
docker-compose up -d -
Configure Cursor to use the local search server: Create or edit
~/.cursor/mcp.json:{ "mcpServers": { "workspace-code-search": { "url": "http://localhost:8978/sse" } } } -
Restart Cursor IDE to apply the changes.
The server will start indexing your specified projects, and you'll be able to use semantic code search within Cursor when those projects are active.
- Open a project that you configured as indexed.
Create a .cursorrules file and add the following:
<instructions>
For any request, use the @search_code tool to check what the code does.
Prefer that first before resorting to command line grepping etc.
</instructions>
- Start using the Cursor Agent mode and see it doing local vector searches!
Related Servers
iOS Simulator
Provides programmatic control over iOS simulators through a standardized interface.
Authless Remote MCP Server
A remote MCP server without authentication, deployable on Cloudflare Workers or locally with npm.
Translator AI
Translate JSON i18n files using Google Gemini or local Ollama models, with incremental caching support.
MCP Server Automation CLI
A CLI tool to automate packaging MCP servers as Docker images and deploying them to AWS ECS.
Cloudflare MCP Server
An example MCP server designed for easy deployment on Cloudflare Workers, operating without authentication.
MalwareBazaar MCP
Interface with Malware Bazaar to get real-time threat intelligence and sample metadata for cybersecurity research.
Markdown Sidecar MCP Server
An MCP server to access markdown documentation for locally installed NPM, Go, and PyPi packages.
LLM API Benchmark MCP Server
Benchmark LLM APIs for throughput and Time To First Token (TTFT) under various concurrency levels.
MCP Yeoman Server
Search for and run Yeoman generator templates programmatically.
PowerShell
Execute PowerShell scripts for Windows automation, system maintenance, data processing, and network monitoring.