{
  "markdown": "# Code Index MCP Server\n\nAn MCP (Model Context Protocol) server for fast local source code searching using [Zoekt](https://github.com/sourcegraph/zoekt).\n\n## Features\n\n- **Fast code search**: Uses Zoekt's trigram-based indexing for fast substring and regex matching\n- **Per-directory indexes**: Each indexed directory gets its own index stored in the user profile\n- **Rich query language**: Supports regex, file filters, language filters, and boolean operators\n- **Cross-platform**: Works on macOS and Linux\n\n## Installation\nThis server is available on the [MCP Registry](https://registry.modelcontextprotocol.io/?q=trondhindenes%2Fcode-index).\n\n### Download Pre-built MCPB bundle (experimental)\n\nDownload the appropriate `.mcpb` bundle for your platform from the [GitHub Releases](https://github.com/trondhindenes/code-index-mcp/releases) page:\n\n- `code-index-mcp-darwin-arm64.mcpb` - macOS Apple Silicon\n- `code-index-mcp-darwin-amd64.mcpb` - macOS Intel\n- `code-index-mcp-linux-amd64.mcpb` - Linux x64\n- `code-index-mcp-linux-arm64.mcpb` - Linux ARM64\n\nThe `.mcpb` file is a ZIP archive containing the binary and manifest. You can open it directly in Claude Desktop in order to install it\n\n\n### Manual installation (recommended)\nIn order to get the binary onto your computer, you can do one of the following:\n#### Download from releases\nGo to [GitHub Releases](https://github.com/trondhindenes/code-index-mcp/releases) and download \nthe appropriate file (not mcpb but the tar/gzipped ones corresponding to your platform).\nFor example:\n```shell\ncurl -sL https://github.com/trondhindenes/code-index-mcp/releases/download/1.0.13/code-index-mcp-darwin-arm64.tar.gz | tar xz\nchmod +x code-index-mcp\n```\n\n#### Using Go\n\n```bash\ngo install github.com/trondhindenes/code-index-mcp@latest\n```\n\n#### Build from Source\n\n```bash\ngit clone https://github.com/trondhindenes/code-index-mcp\ncd code-index-mcp\ngo build -o code-index-mcp .\n```\n\n\n## Configuration\nNow that you have the binary installed locally, you can register it in your tools of choice. \nThis should not be necessary if you installed via mcpb bundle but your mileage may vary.\n\n### Claude Desktop\n\nAdd to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):\n\n```json\n{\n  \"mcpServers\": {\n    \"code-index\": {\n      \"command\": \"/path/to/code-index-mcp\"\n    }\n  }\n}\n```\n\n### Claude Code\nRun the following:\n```shell\nclaude mcp add --scope user --transport stdio code-index /path/to/code-index-mcp\n```\n\n### Environment Variables\n\n- `CODE_INDEX_DIR`: Override the default index storage location\n\nDefault index locations:\n- macOS: `~/Library/Application Support/code-index/`\n- Linux: `~/.local/share/code-index/` or `$XDG_DATA_HOME/code-index/`\n\n## Available Tools\n\n### `index_directory`\n\nIndex a source code directory for fast searching.\n\n**Parameters:**\n- `directory` (required): The path to the directory to index\n\n**Example:**\n```\nIndex the directory /Users/me/projects/myapp\n```\n\n### `search_code`\n\nSearch for code across indexed directories. Returns compact grep-like output to minimize context window usage.\n\n**Parameters:**\n- `query` (required): The search query using Zoekt syntax\n- `directory` (optional): Limit search to a specific indexed directory\n- `max_files` (optional): Maximum files to return (default: 20)\n- `max_lines_per_file` (optional): Maximum matches per file (default: 3)\n- `files_only` (optional): Only return file paths, no line content (default: false)\n\n**Output Format:**\n```\n/path/to/file.go:42: matching line content here\n/path/to/file.go:58: another matching line\n  ... and 5 more matches in this file\n```\n\n**Query Syntax Examples:**\n- `func main` - Simple text search\n- `file:\\.go$ func main` - Search only in .go files\n- `lang:python class.*Model` - Search in Python files\n- `-test func main` - Exclude files containing \"test\"\n- `case:yes MyFunc` - Case-sensitive search\n\n### `list_indexes`\n\nList all indexed directories and their locations.\n\n### `delete_index`\n\nDelete the index for a specific directory.\n\n**Parameters:**\n- `directory` (required): The path to the directory whose index should be deleted\n\n### `index_info`\n\nGet information about the indexing configuration, including storage location.\n\n## Skipped Directories\n\nThe following directories are automatically skipped during indexing:\n- Hidden directories (starting with `.`)\n- `node_modules`, `vendor`, `__pycache__`\n- `target`, `build`, `dist`\n- `venv`, `.venv`, `env`, `.env`\n\n## Skipped Files\n\nBinary files and common non-code files are automatically skipped, including:\n- Executables (`.exe`, `.dll`, `.so`, `.dylib`)\n- Archives (`.zip`, `.tar`, `.gz`)\n- Images (`.png`, `.jpg`, `.gif`)\n- Documents (`.pdf`, `.doc`, `.docx`)\n\n## License\n\nMIT\n",
  "bytes": 4748,
  "sha": "2ef23aa3366e3407a784b3c779edc2c40fa3d48ed7ea37eba635107bc9c561e1",
  "repo_slug": "trondhindenes/code-index-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_trondhindenes_code_index_mcp_a53f88ef/readme"
}