mcpField
L
Local Code Indexing for Cursor

Local Code Indexing for Cursor

Remote
github.com/LuotoCompanyDeveloper Tools33Updated 84w ago
Repository

About Local Code Indexing for Cursor

Local Code Indexing for Cursor is an experimental Python server that indexes codebases locally with ChromaDB. It exposes a semantic search tool over MCP for clients such as Cursor, keeping index data on the user's machine.

Key features

  1. 01Local indexing with ChromaDB
  2. 02Semantic search tool exposed over MCP
  3. 03Configurable project folders via .env
  4. 04Docker Compose startup

Use cases

  1. 01Searching indexed project code by meaning from Cursor Agent mode
  2. 02Reducing reliance on grep-style command line searches

MCP support

This is an MCP server that serves a @search_code tool over an SSE endpoint at http://localhost:8978/sse for clients such as Cursor.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttp://localhost:8978/sse
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

Tools

Details

From the project 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!

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.