AgentHubAgentHub

Code Index

MCP ServerMCP Registry官方收录

io.github.achreftlili/code-index · v1.0.6

SQLite-backed hybrid (vector + FTS) code search index for Claude Code over MCP.

概览

Code Index 是一个MCP Server,收录自 官方 MCP Registry。支持 stdio 传输。本页提供 Cursor、Claude Code 等客户端的安装配置片段。

安装

选择你的平台查看安装方式

{
  "mcpServers": {
    "code-index": {
      "command": "uvx",
      "args": [
        "mcp-code-index"
      ]
    }
  }
}

环境变量

CODE_INDEX_EMBEDDER可选

Embedder backend. Only 'jina' (local jina-embeddings-v2-base-code via sentence-transformers) is supported; the variable exists for future expansion.

CODE_INDEX_EMBED_MODEL可选

HuggingFace model id. Defaults to 'jinaai/jina-embeddings-v2-base-code'. Override only if you know the model is dim-compatible.

CODE_INDEX_EMBED_DIM可选

Embedding dimension. Defaults to 768 (matches jina-embeddings-v2-base-code). Must match the model's output dim.

CODE_INDEX_DB可选

Path to the SQLite index database. Defaults to .claude/index.db relative to the working directory.

CODE_INDEX_EMBED_BATCH可选

Encode batch size (default 32). Lower (e.g. 8 or 4) to reduce peak memory if the GPU OOMs on large files.

CODE_INDEX_EMBED_DEVICE可选

Torch device override: 'cpu', 'mps', or 'cuda'. Unset = auto-detect. Set 'cpu' to avoid Apple-Silicon MPS out-of-memory errors.

相关资源

统一 Manifest

{
  "id": "io.github.achreftlili/code-index",
  "type": "mcp-server",
  "version": "1.0.6",
  "displayName": "Code Index",
  "description": "SQLite-backed hybrid (vector + FTS) code search index for Claude Code over MCP.",
  "repository": {
    "url": "https://github.com/achreftlili/code-index",
    "source": "github"
  },
  "distribution": {
    "packages": [
      {
        "registryType": "pypi",
        "identifier": "mcp-code-index",
        "version": "1.0.6",
        "transport": "stdio",
        "environmentVariables": [
          {
            "name": "CODE_INDEX_EMBEDDER",
            "description": "Embedder backend. Only 'jina' (local jina-embeddings-v2-base-code via sentence-transformers) is supported; the variable exists for future expansion."
          },
          {
            "name": "CODE_INDEX_EMBED_MODEL",
            "description": "HuggingFace model id. Defaults to 'jinaai/jina-embeddings-v2-base-code'. Override only if you know the model is dim-compatible."
          },
          {
            "name": "CODE_INDEX_EMBED_DIM",
            "description": "Embedding dimension. Defaults to 768 (matches jina-embeddings-v2-base-code). Must match the model's output dim."
          },
          {
            "name": "CODE_INDEX_DB",
            "description": "Path to the SQLite index database. Defaults to .claude/index.db relative to the working directory."
          },
          {
            "name": "CODE_INDEX_EMBED_BATCH",
            "description": "Encode batch size (default 32). Lower (e.g. 8 or 4) to reduce peak memory if the GPU OOMs on large files."
          },
          {
            "name": "CODE_INDEX_EMBED_DEVICE",
            "description": "Torch device override: 'cpu', 'mps', or 'cuda'. Unset = auto-detect. Set 'cpu' to avoid Apple-Silicon MPS out-of-memory errors."
          }
        ]
      }
    ],
    "remotes": []
  },
  "dependencies": [],
  "installTargets": [
    "claude-code",
    "claude-desktop",
    "cursor",
    "vscode"
  ],
  "keywords": [],
  "provenance": {
    "origin": "official-mcp-registry",
    "originalId": "io.github.achreftlili/code-index",
    "originalUrl": "https://registry.modelcontextprotocol.io/v0.1/servers/io.github.achreftlili%2Fcode-index/versions/latest",
    "isOfficial": true,
    "status": "active"
  }
}
Code Index — MCP Server 安装与配置 · AgentHub