Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

cursor-local-indexing

MCP.Pizza Chef: LuotoCompany

Cursor-local-indexing is a Python-based MCP server that provides local semantic indexing and search for codebases using ChromaDB. It enables tools like Cursor to perform fast, context-aware code searches within specified project folders, running entirely locally for privacy and speed. The server supports easy setup with Docker and environment configuration, making it ideal for developers needing efficient, offline code navigation and retrieval.

Use This MCP server To

Perform semantic search on local codebases for faster code navigation Index multiple project folders locally for offline code querying Integrate with Cursor editor for enhanced code search capabilities Enable privacy-preserving code indexing without cloud dependencies Provide real-time local code context to LLM-powered developer tools

README

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

  1. Clone and enter the repository:

    git clone <repository-url>
    cd cursor-local-indexing
  2. Create a .env file by copying .env.example:

    cp .env.example .env
  3. Configure your .env file:

    PROJECTS_ROOT=~/your/projects/root    # Path to your projects directory
    FOLDERS_TO_INDEX=project1,project2    # Comma-separated list of folders to index

    Example:

    PROJECTS_ROOT=~/projects
    FOLDERS_TO_INDEX=project1,project2
  4. Start the indexing server:

    docker-compose up -d
  5. Configure Cursor to use the local search server: Create or edit ~/.cursor/mcp.json:

    {
      "mcpServers": {
        "workspace-code-search": {
          "url": "http://localhost:8978/sse"
        }
      }
    }
  6. 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.

  1. 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>
  1. Start using the Cursor Agent mode and see it doing local vector searches!

cursor-local-indexing FAQ

How do I configure which projects are indexed?
Set the PROJECTS_ROOT and FOLDERS_TO_INDEX variables in the .env file to specify project directories.
How do I start the cursor-local-indexing server?
Use docker-compose up -d in the project directory to launch the server as a background service.
Can I use this server without Cursor?
While designed for Cursor integration, the MCP server can be adapted for other tools supporting MCP protocol.
Does this server require internet access?
No, it runs locally and does not require internet, ensuring privacy and offline availability.
What technology powers the indexing?
The server uses ChromaDB for semantic vector indexing of codebases.
How do I connect Cursor to this MCP server?
Configure the ~/.cursor/mcp.json file to point to the local server URL under mcpServers.
Is the indexing real-time?
The server indexes codebases on startup; real-time updates require restarting or additional tooling.
Which LLM providers are compatible with this MCP server?
It is provider-agnostic and works with OpenAI, Anthropic Claude, and Google Gemini models.