Skip to main content
Glama

Workspace Code Search MCP Server

by LuotoCompany

游标的本地代码索引

一个基于 Python 的实验性服务器,使用 ChromaDB在本地索引代码库,并通过 MCP(模型上下文协议)服务器为 Cursor 等工具提供语义搜索工具。

设置

  1. 克隆并进入存储库:
    git clone <repository-url> cd cursor-local-indexing
  2. 通过复制.env.example创建.env文件:
    cp .env.example .env
  3. 配置你的.env文件:
    PROJECTS_ROOT=~/your/projects/root # Path to your projects directory FOLDERS_TO_INDEX=project1,project2 # Comma-separated list of folders to index
    例子:
    PROJECTS_ROOT=~/projects FOLDERS_TO_INDEX=project1,project2
  4. 启动索引服务器:
    docker-compose up -d
  5. 配置 Cursor 以使用本地搜索服务器:创建或编辑~/.cursor/mcp.json
    { "mcpServers": { "workspace-code-search": { "url": "http://localhost:8978/sse" } } }
  6. 重新启动 Cursor IDE 以应用更改。

服务器将开始索引您指定的项目,并且当这些项目处于活动状态时,您将能够在 Cursor 中使用语义代码搜索。

  1. 打开您配置为索引的项目。

创建一个.cursorrules文件并添加以下内容:

<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. 开始使用光标代理模式并查看它进行本地向量搜索!
-
security - not tested
-
license - not tested
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

基于 Python 的本地索引服务器,使用 ChromaDB 为代码库创建语义搜索功能,允许 Cursor IDE 对您的代码执行矢量搜索,而无需将数据发送到外部服务。

  1. 设置

    Related MCP Servers

    • -
      security
      A
      license
      -
      quality
      Facilitates integration with the Cursor code editor by enabling real-time code indexing, analysis, and bi-directional communication with Claude, supporting concurrent sessions and automatic reconnection.
      Last updated -
      2
      21
      31
      TypeScript
      MIT License
    • -
      security
      A
      license
      -
      quality
      A server that provides data retrieval capabilities powered by Chroma embedding database, enabling AI models to create collections over generated data and user inputs, and retrieve that data using vector search, full text search, and metadata filtering.
      Last updated -
      157
      Python
      Apache 2.0
    • -
      security
      A
      license
      -
      quality
      A Python server that enables AI assistants to perform hybrid search queries against Apache Solr indexes through the Model Context Protocol, combining keyword precision with vector-based semantic understanding.
      Last updated -
      1
      Python
      MIT License
      • Linux
      • Apple
    • -
      security
      F
      license
      -
      quality
      A Managed Context Provider server that crawls and indexes Zerops documentation, making it available as a searchable context source for Cursor IDE.
      Last updated -
      TypeScript

    View all related MCP servers

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/LuotoCompany/cursor-local-indexing'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server