Code Context Provider MCP
Code-Kontextanbieter MCP
MCP-Server, der Codekontext und -analyse für KI-Assistenten bereitstellt. Extrahiert Verzeichnisstruktur und Codesymbole mithilfe von WebAssembly Tree-Sitter-Parsern ohne native Abhängigkeiten.
Merkmale
Verzeichnisbaumstruktur generieren
Analysieren Sie JavaScript/TypeScript- und Python-Dateien
Codesymbole extrahieren (Funktionen, Variablen, Klassen, Importe, Exporte)
Kompatibel mit dem MCP-Protokoll für die nahtlose Integration mit KI-Assistenten
Related MCP server: git-project-xray-mcp
Schnelle Verwendung (MCP-Setup)
Installation über Smithery
So installieren Sie Code Context Provider für Claude Desktop automatisch über Smithery :
npx -y @smithery/cli install @AB498/code-context-provider-mcp --client claudeWindows
{
"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"
]
}
}
}ODER global mit npm installieren:
npm install -g code-context-provider-mcpVerwenden Sie es dann, indem Sie Folgendes ausführen:
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\npm-cache\_npx" -Recurse -Force` for windows and `rm -rf ~/.npm/_npx` for linux/macosVerfügbare Tools
get_code_context
Analysiert ein Verzeichnis und gibt seine Struktur zusammen mit Codesymbolen zurück (optional).
Parameter:
absolutePath(Zeichenfolge, erforderlich): Absoluter Pfad zum zu analysierenden VerzeichnisanalyzeJs(boolesch, optional): Ob JavaScript-/TypeScript- und Python-Dateien analysiert werden sollen (Standard: false)includeSymbols(Boolesch, optional): Ob Codesymbole in die Antwort aufgenommen werden sollen (Standard: „false“)symbolType(Aufzählung, optional): Typ der einzuschließenden Symbole, wenn includeSymbols wahr ist (Optionen: „Funktionen“, „Variablen“, „Klassen“, „Importe“, „Exporte“, „alle“, Standard: „alle“)filePatterns(Array von Zeichenfolgen, optional): Zu analysierende Dateimuster (z. B. [' .js', ' .py', 'config.*'])maxDepth(Zahl, optional): Maximale Verzeichnistiefe für die Analyse (Standard: 5 Ebenen)
Hinweis: Anonyme Funktionen werden automatisch aus den Ergebnissen herausgefiltert.
Beispiel für Ausgabetext beim Tool-Aufruf
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]Beispiele für Dateimuster
Mit dem Parameter filePatterns können Sie angeben, welche Dateien analysiert werden sollen. Dies ist nützlich für komplexe Projekte mit mehreren Sprachen oder bestimmten Dateien.
Beispiele:
["*.js", "*.py"]– Analysieren Sie alle JavaScript- und Python-Dateien["config.*"]- Analysieren Sie alle Konfigurationsdateien unabhängig von der Erweiterung["package.json", "*.config.js"]– Analysieren Sie package.json und alle JavaScript-Konfigurationsdateien[".ts", ".tsx", ".py"]– TypeScript- und Python-Dateien analysieren (unter Verwendung des Erweiterungsformats)
Der Dateimusterabgleich unterstützt:
Einfache Glob-Muster mit Platzhaltern (*)
Direkte Dateierweiterungen (mit oder ohne Punkt)
Genaue Dateinamen
Abwicklung großer Projekte
Bei sehr großen Projekten können Sie den Parameter maxDepth verwenden, um zu begrenzen, wie tief das Tool Verzeichnisse durchsucht:
maxDepth: 2- Analysieren Sie nur das Stammverzeichnis und eine Ebene der UnterverzeichnissemaxDepth: 3- Analysieren Sie das Stammverzeichnis und zwei Ebenen von UnterverzeichnissenmaxDepth: 0– Analysieren Sie nur Dateien im Stammverzeichnis
Dies ist insbesondere in folgenden Fällen nützlich:
Arbeiten mit großen Monorepos
Analysieren von Projekten mit vielen Abhängigkeiten
Konzentrieren Sie sich nur auf den Hauptquellcode und nicht auf Bibliotheken von Drittanbietern
Unterstützte Sprachen
Die Codesymbolanalyse wird unterstützt für:
JavaScript (.js)
JSX (.jsx)
TypeScript (.ts)
TSX (.tsx)
Python (.py)
Durch die Verwendung des Parameters filePatterns können Sie andere Dateitypen in die Verzeichnisstruktur einschließen, die symbolische Analyse kann jedoch eingeschränkt sein.
Entwicklung
Einrichten der Entwicklungsumgebung
# 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 setupNach der Installation
Nach der Installation wird das prepare des Pakets automatisch ausgeführt, um die WASM-Parser herunterzuladen. Sollte der Download aus irgendeinem Grund fehlschlagen, können Benutzer das Setup manuell ausführen:
npx code-context-provider-mcp-setupLizenz
MIT
Weitere Informationen oder Hilfe
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to understand and navigate codebases through structural analysis. Provides code mapping, symbol search, and impact analysis using ast-grep for accurate parsing of Python, JavaScript, TypeScript, and Go projects.452MIT
- AlicenseAqualityCmaintenanceProvides AI assistants with progressive code intelligence to explore repository structure, find symbols, and assess the impact of changes using ast-grep.3MIT
- Alicense-qualityDmaintenanceEnables code analysis of JavaScript, TypeScript, TSX, Python, and Rust files using Tree-sitter, providing symbol listing, definition/reference lookup, AST queries, LSP-style features, and SQLite indexing for efficient cross-file searches.34MIT
- Alicense-qualityCmaintenanceProvides a semantic understanding of your codebase by parsing with tree-sitter and building a graph of symbols and dependencies. Enables AI assistants to navigate code, analyze changes, and discover architecture using 18 tools with minimal context overhead.121MIT
Related MCP Connectors
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Securely search and manage workspace context files for AI agents and teams.
Provide your AI coding tools with token-efficient access to up-to-date technical documentation for…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AB498/code-context-provider-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server