Code Context Provider MCP
@AB498
关于 Code Context Provider MCP
MCP server that provides code context and analysis for AI assistants. Extracts directory structure and code symbols using WebAssembly Tree-sitter parsers with Zero Native Dependencies.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"code-context-provider-mcp": {
"command": "npx",
"args": [
"code-context-provider-mcp"
]
}
}
}工具
1Returns Complete Context of a given project directory, including directory tree, and code symbols. Useful for getting a quick overview of a project. Use this tool when you need to get a comprehensive overview of a project's codebase. Useful at the start of a new task.
概览
What is Code Context Provider MCP?
Code Context Provider MCP is a Model Context Protocol server that provides code context and analysis for AI assistants. It extracts directory structure and code symbols using WebAssembly Tree-sitter parsers with zero native dependencies, compatible with the MCP protocol for seamless integration with AI assistants.
How to use Code Context Provider MCP?
Install via Smithery, npx, or npm global (code-context-provider-mcp@latest). Configure as an MCP server in your client’s mcpServers JSON with command npx -y code-context-provider-mcp@latest. Once connected, call the get_code_context tool with an absolute directory path and optional parameters for code analysis, symbol extraction, file patterns, and depth.
Key features of Code Context Provider MCP
- Generates directory tree structure
- Analyzes JavaScript/TypeScript and Python files
- Extracts code symbols (functions, variables, classes, imports, exports)
- Compatible with the MCP protocol for AI assistant integration
- Zero native dependencies (WebAssembly Tree-sitter)
- Configurable analysis depth and file patterns
Use cases of Code Context Provider MCP
- Provide a full codebase snapshot to an AI coding assistant
- Extract functions and classes from a project for refactoring
- Analyze specific file types in a large monorepo using file patterns
- Limit traversal depth to focus on root-level source code in huge projects
- Give AI assistants structured context about a directory’s contents
FAQ from Code Context Provider MCP
What programming languages does Code Context Provider MCP support?
Code symbol analysis supports JavaScript (.js), JSX (.jsx), TypeScript (.ts), TSX (.tsx), and Python (.py) files. Other file types can be included in the directory structure via filePatterns, though symbol extraction may be limited.
What parameters does the get_code_context tool accept?
It requires absolutePath (string) and accepts optional booleans analyzeJs and includeSymbols, an enum symbolType (functions, variables, classes, imports, exports, all), an array filePatterns, and a number maxDepth (default 5). Anonymous functions are automatically filtered from results.
How can I handle large projects with Code Context Provider MCP?
Use the maxDepth parameter to limit directory traversal: maxDepth: 0 for root only, 2 for one subdirectory level, etc. This is useful for monorepos or projects with many dependencies.
How do I install Code Context Provider MCP?
You can install via Smithery (npx -y @smithery/cli install @AB498/code-context-provider-mcp --client claude), run with npx directly, or install globally with npm install -g code-context-provider-mcp and then run code-context-provider-mcp.
Does Code Context Provider MCP require any native dependencies?
No. It uses WebAssembly Tree-sitter parsers, so it has zero native dependencies and runs out of the box with Node.js.
开发工具 分类下的更多 MCP 服务器
MCP-Bridge
SecretiveShellA middleware to provide an openAI compatible endpoint that can call MCP tools
Stakpak Agent CLI
stakpakShip your code, on autopilot. An open source agent that lives on your machines 24/7 and keeps your apps running. 🦀
Serena
oraiosA powerful MCP toolkit for coding, providing semantic retrieval and editing capabilities - the IDE for your agent
sentry-mcp
getsentryAn MCP server for interacting with Sentry via LLMs.
test
harlancA simple,high performance and secure live media server in pure Rust (RTMP[cluster]/RTSP/WebRTC[whip/whep]/HTTP-FLV/HLS).🦀
评论