developer-tools

Code Context Provider

by ab498

Analyze JavaScript, TypeScript, and Python projects with Code Context Provider—advanced static code analysis and source

Analyzes project directories to extract code structure and symbols using Tree-sitter parsers, providing tools for generating directory trees and performing deep code analysis of JavaScript, TypeScript, and Python files.

github stars

22

Zero native dependencies via WebAssemblyTree-sitter powered parsing

best for

  • / AI assistants understanding codebases
  • / Code review and analysis workflows
  • / Project documentation generation
  • / Onboarding developers to new projects

capabilities

  • / Generate directory tree structure
  • / Extract code symbols from JS/TS/Python files
  • / Analyze functions, classes, variables, and imports
  • / Get complete project context overview
  • / Parse code without native dependencies

what it does

Analyzes project directories to extract code structure and symbols from JavaScript, TypeScript, and Python files using Tree-sitter parsers. Generates directory trees and provides detailed code analysis for AI assistants.

about

Code Context Provider is a community-built MCP server published by ab498 that provides AI assistants with tools and capabilities via the Model Context Protocol. Analyze JavaScript, TypeScript, and Python projects with Code Context Provider—advanced static code analysis and source It is categorized under developer tools. This server exposes 1 tool that AI clients can invoke during conversations and coding sessions.

how to install

You can install Code Context Provider in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

license

MIT

Code Context Provider is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

readme

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.

<div align="center" style="text-align:center;font-family: monospace; display: flex; align-items: center; justify-content: center; width: 100%; gap: 10px"> <a href="https://nextjs-boilerplate-ashy-nine-64.vercel.app/demo-context-provider"><img src="https://komarev.com/ghpvc/?username=AB498&label=DEMO&style=for-the-badge&color=CC0000" /></a> <a href="https://discord.gg/ZeeqSBpjU2"><img src="https://img.shields.io/discord/1095854826786668545?style=for-the-badge&color=0000CC" alt="Discord"></a> <a href="https://img.shields.io/badge/License-MIT-yellow.svg"><img src="https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge&color=00CC00" alt="License: MIT"></a> <a href="https://www.npmjs.com/package/code-context-provider-mcp"><img src="https://img.shields.io/npm/v/code-context-provider-mcp?style=for-the-badge" alt="PyPi"></a> </div>

Features

  • Generate directory tree structure
  • Analyze JavaScript/TypeScript and Python files
  • Extract code symbols (functions, variables, classes, imports, exports)
  • Compatible with the MCP protocol for seamless integration with AI assistants

Quick Usage (MCP Setup)

Installing via Smithery

To install Code Context Provider for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @AB498/code-context-provider-mcp --client claude

Windows

{
  "mcpServers": {
    "code-context-provider-mcp": {
      "command": "cmd.exe",
      "args": [
        "/c",
        "npx",
        "-y",
        "code-context-provider-mcp@latest"
      ]
    }
  }
}

MacOS/Linux

{
  "mcpServers": {
    "code-context-provider-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "code-context-provider-mcp@latest"
      ]
    }
  }
}

OR install globally with npm:

npm install -g code-context-provider-mcp

Then use it by running:

code-context-provider-mcp # if you're not using @latest, you may want to clear the cache for latest version using `Remove-Item -Path "$env:LOCALAPPDATA
pm-cache\_npx" -Recurse -Force` for windows and `rm -rf ~/.npm/_npx` for linux/macos

Available Tools

get_code_context

Analyzes a directory and returns its structure along with code symbols (optional).

Parameters:

  • absolutePath (string, required): Absolute path to the directory to analyze
  • analyzeJs (boolean, optional): Whether to analyze JavaScript/TypeScript and Python files (default: false)
  • includeSymbols (boolean, optional): Whether to include code symbols in the response (default: false)
  • symbolType (enum, optional): Type of symbols to include if includeSymbols is true (options: 'functions', 'variables', 'classes', 'imports', 'exports', 'all', default: 'all')
  • filePatterns (array of strings, optional): File patterns to analyze (e.g. ['.js', '.py', 'config.*'])
  • maxDepth (number, optional): Maximum directory depth to analyze (default: 5 levels)

Note: Anonymous functions are automatically filtered out of the results.

Example Output Text On Tool Call

Directory structure for: C:\Users\Admin\Desktop\mcp\context-provider-mcp

Code Analysis Summary:
- Files analyzed: 3
- Total functions: 29
- Total variables: 162
- Total classes: 0

Note: Symbol analysis is supported for JavaScript/TypeScript (.js, .jsx, .ts, .tsx) and Python (.py) files only.

Code analysis limited to a maximum depth of 5 directory levels (default).

├── index.js (39 KB)
│   └── [Analyzed: 22 functions, 150 variables, 0 classes]
│       Functions:
│       - initializeTreeSitter [39:0]
│       - getLanguageFromExtension [107:0]
│       - getPosition [138:24]

File Pattern Examples

You can use the filePatterns parameter to specify which files to analyze. This is useful for complex projects with multiple languages or specific files of interest.

Examples:

  • ["*.js", "*.py"] - Analyze all JavaScript and Python files
  • ["config.*"] - Analyze all configuration files regardless of extension
  • ["package.json", "*.config.js"] - Analyze package.json and any JavaScript config files
  • [".ts", ".tsx", ".py"] - Analyze TypeScript and Python files (using extension format)

The file pattern matching supports:

  • Simple glob patterns with wildcards (*)
  • Direct file extensions (with or without the dot)
  • Exact file names

Handling Large Projects

For very large projects, you can use the maxDepth parameter to limit how deeply the tool will traverse directories:

  • maxDepth: 2 - Only analyze the root directory and one level of subdirectories
  • maxDepth: 3 - Analyze the root, and two levels of subdirectories
  • maxDepth: 0 - Only analyze files in the root directory

This is particularly useful when:

  • Working with large monorepos
  • Analyzing projects with many dependencies
  • Focusing only on the main source code and not third-party libraries

Supported Languages

Code symbol analysis is supported for:

  • JavaScript (.js)
  • JSX (.jsx)
  • TypeScript (.ts)
  • TSX (.tsx)
  • Python (.py)

Using the filePatterns parameter allows you to include other file types in the directory structure, though symbolic analysis may be limited.

Development

[Development] Setting up the Development Environment

# Clone the repository
git clone https://github.com/your-username/code-context-provider-mcp.git
cd code-context-provider-mcp

# Install dependencies
npm install

# Set up WASM parsers
npm run setup

[Development] Post-Installation

After installation, the package's prepare script automatically runs to download the WASM parsers. If for some reason the download fails, users can manually run the setup:

npx code-context-provider-mcp-setup

License

MIT

For more information or help

FAQ

What is the Code Context Provider MCP server?
Code Context Provider is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
How do MCP servers relate to agent skills?
Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
How are reviews shown for Code Context Provider?
This profile displays 10 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.5 out of 5—verify behavior in your own environment before production use.
MCP server reviews

Ratings

4.510 reviews
  • Shikha Mishra· Oct 10, 2024

    Code Context Provider is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.

  • Piyush G· Sep 9, 2024

    We evaluated Code Context Provider against two servers with overlapping tools; this profile had the clearer scope statement.

  • Chaitanya Patil· Aug 8, 2024

    Useful MCP listing: Code Context Provider is the kind of server we cite when onboarding engineers to host + tool permissions.

  • Sakshi Patil· Jul 7, 2024

    Code Context Provider reduced integration guesswork — categories and install configs on the listing matched the upstream repo.

  • Ganesh Mohane· Jun 6, 2024

    I recommend Code Context Provider for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.

  • Oshnikdeep· May 5, 2024

    Strong directory entry: Code Context Provider surfaces stars and publisher context so we could sanity-check maintenance before adopting.

  • Dhruvi Jain· Apr 4, 2024

    Code Context Provider has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.

  • Rahul Santra· Mar 3, 2024

    According to our notes, Code Context Provider benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.

  • Pratham Ware· Feb 2, 2024

    We wired Code Context Provider into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.

  • Yash Thakker· Jan 1, 2024

    Code Context Provider is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.