Назад к каталогу
code-index-mcp

code-index-mcp

Сообщество

от johnhuang316

0.0
0 отзывов

A Model Context Protocol (MCP) server that helps large language models index, search, and analyze code repositories with minimal setup

Установка

npx @modelcontextprotocol/inspector uv run code-index-mcp

Описание

# Code Index MCP <div align="center"> [![MCP Server](https://img.shields.io/badge/MCP-Server-blue)](https://modelcontextprotocol.io) [![Python](https://img.shields.io/badge/Python-3.10%2B-green)](https://www.python.org/) [![License](https://img.shields.io/badge/License-MIT-yellow)](LICENSE) **Intelligent code indexing and analysis for Large Language Models** Transform how AI understands your codebase with advanced search, analysis, and navigation capabilities. </div> <a href="https://glama.ai/mcp/servers/@johnhuang316/code-index-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@johnhuang316/code-index-mcp/badge" alt="code-index-mcp MCP server" /> </a> ## Overview Code Index MCP is a [Model Context Protocol](https://modelcontextprotocol.io) server that bridges the gap between AI models and complex codebases. It provides intelligent indexing, advanced search capabilities, and detailed code analysis to help AI assistants understand and navigate your projects effectively. **Perfect for:** Code review, refactoring, documentation generation, debugging assistance, and architectural analysis. ## Quick Start ### 🚀 **Recommended Setup (Most Users)** The easiest way to get started with any MCP-compatible application: **Prerequisites:** Python 3.10+ and [uv](https://github.com/astral-sh/uv) 1. **Add to your MCP configuration** (e.g., `claude_desktop_config.json` or `~/.claude.json`): ```json { "mcpServers": { "code-index": { "command": "uvx", "args": ["code-index-mcp"] } } } ``` > Optional: append `--project-path /absolute/path/to/repo` to the `args` array so the server > initializes with that repository automatically (equivalent to calling `set_project_path` > after startup). 2. **Restart your application** – `uvx` automatically handles installation and execution 3. **Start using** (give these prompts to your AI assistant): ``` Set the project path to /Users/dev/my-react-app Find all TypeScript files in this project Search for "authentication" functions Analyze the main App.tsx file ``` *If you launch with `--project-path`, you can skip the first command above - the server already knows the project location.* ### Codex CLI Configuration If you are using Anthropic's Codex CLI, add the server to `~/.codex/config.toml`. On Windows the file lives at `C:\Users\<you>\.codex\config.toml`: ```toml [mcp_servers.code-index] type = "stdio" command = "uvx" args = ["code-index-mcp"] ``` > You can append `--project-path C:/absolute/path/to/repo` to the `args` list to set the project > automatically on startup (same effect as running the `set_project_path` tool). On Windows, `uvx` needs the standard profile directories to be present. Keep the environment override in the same block so the MCP starts reliably: ```toml env = { HOME = "C:\\Users\\<you>", APPDATA = "C:\\Users\\<you>\\AppData\\Roaming", LOCALAPPDATA = "C:\\Users\\<you>\\AppData\\Local", SystemRoot = "C:\\Windows" } ``` Linux and macOS already expose the required XDG paths and `HOME`, so you can usually omit the `env` table there. Add overrides only if you run the CLI inside a restricted container. ### FastMCP & Discovery Manifests - Run `fastmcp run fastmcp.json` to launch the server via [FastMCP](https://fastmcp.wiki/) with the correct source entrypoint and dependency metadata. Pass `--project-path` (or call the `set_project_path` tool after startup) so the index boots against the right repository. - Serve or copy `.well-known/mcp.json` to share a standards-compliant MCP manifest. Clients that support the `.well-known` convention (e.g., Claude Desktop, Codex CLI) can import this file directly instead of crafting configs manually. - Publish `.well-known/mcp.llmfeed.json` when you want to expose the richer LLM Feed metadata. It references the same `code-index` server definition plus documentation/source links, which helps registries present descriptions, tags, and capabilities automatically. When sharing the manifests, remind consumers to supply `--project-path` (or to call `set_project_path`) so the server indexes the intended repository. ## Typical Use Cases **Code Review**: "Find all places using the old API" **Refactoring Help**: "Where is this function called?" **Learning Projects**: "Show me the main components of this React project" **Debugging**: "Search for all error handling related code" ## Key Features ### 🔍 **Intelligent Search & Analysis** - **Dual-Strategy Architecture**: Specialized tree-sitter parsing for 7 core languages, fallback strategy for 50+ file types - **Direct Tree-sitter Integration**: No regex fallbacks for specialized languages - fail fast with clear errors - **Advanced Search**: Auto-detects and uses the best available tool (ugrep, ripgrep, ag, or grep) - **Universal File Support**: Comprehensive coverage from advanced AST parsing to basic file indexing - **File Analysis**: De

Отзывы (0)

Пока нет отзывов. Будьте первым!