code-context-provider-mcp

code-context-provider-mcp

MCP server that provides code context and analysis by extracting directory structures and code symbols using WebAssembly

20
Stars
4
Forks
0
Releases

Overview

The Code Context Provider MCP is an MCP server designed to give AI assistants a view into a project's code context. It generates a directory tree structure and analyzes source files to extract code symbols such as functions, variables, classes, imports, and exports. It uses WebAssembly Tree-sitter parsers with zero native dependencies to perform the parsing, enabling code analysis without native tooling. The server supports JavaScript, TypeScript, and Python analysis, and is compatible with the MCP protocol for seamless integration with AI assistants. Quick usage includes installing via Smithery or npm and configuring an MCP server entry point. The get_code_context tool analyzes a directory and can optionally include symbol information, filter by file patterns, and limit traversal depth. Parameters include absolutePath (required), analyzeJs (default false), includeSymbols (default false), symbolType (default all), filePatterns, and maxDepth (default 5). Example behavior and output illustrate directory structure with optional analysis details. Development notes cover setting up the WASM parsers and post-install steps, with language support for JS/JSX, TS/TSX, and PY files.

Details

Owner
AB498
Language
JavaScript
License
MIT License
Updated
2025-12-07

Features

Generate directory tree structure

Creates a navigable representation of the project directory hierarchy.

Analyze JavaScript/TypeScript and Python files

Parses and analyzes code files to extract structure and symbols.

Extract code symbols

Identifies functions, variables, classes, imports, and exports within analyzed files.

MCP protocol compatibility

Designed to integrate smoothly with AI assistants via the MCP protocol.

Tags

Code contextMCP protocoltree-sitterWebAssemblyzero native dependenciesJavaScriptTypeScriptPythondirectory structurecode symbolsAI assistants