code-graph-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| VERBOSE | No | Enable verbose logging (true/false) | |
| PROJECT_ROOT | No | Root directory of the project (optional, defaults to current directory) | |
| NO_FILE_WATCHER | No | Disable file watcher (true/false) | |
| CODE_GRAPH_MCP_LOG_LEVEL | No | Set logging level (e.g., DEBUG, INFO, WARNING, ERROR) | |
| CODE_GRAPH_MCP_MAX_FILES | No | Maximum number of files to track (default 10000) | |
| CODE_GRAPH_MCP_CACHE_SIZE | No | Maximum cache size in entries (default 300000) | |
| CODE_GRAPH_MCP_FILE_WATCHER | No | Enable or disable file watcher (true/false) | |
| CODE_GRAPH_MCP_DEBOUNCE_DELAY | No | Debounce delay in seconds before re-analysis (default 2.0) |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_usage_guideA | š Get comprehensive guidance on effectively using code analysis tools. šÆ PURPOSE: Provides detailed instructions, best practices, and workflow recommendations for optimal tool usage. š§ USAGE: Call this FIRST if you need guidance on tool selection, sequencing, or best practices. ā” PERFORMANCE: Lightweight operation - provides strategic guidance without analysis overhead. š WORKFLOW: Use before starting complex analysis tasks to understand optimal tool orchestration. |
| analyze_codebaseA | š Perform comprehensive codebase analysis with metrics and structure overview. šÆ PURPOSE: Builds the foundational code graph and provides project-wide insights including file counts, language distribution, complexity metrics, and architectural overview. š§ USAGE: Run this FIRST before using other analysis tools - it builds the code graph that powers all subsequent operations. ā” PERFORMANCE: Expensive operation (10-60s for large codebases) - results are cached for subsequent tool calls. Progress is shown during analysis. š WORKFLOW: analyze_codebase ā specific analysis tools (find_definition, complexity_analysis, etc.) ā insights and recommendations. š” TIP: Use rebuild_graph=true only if code has changed significantly since last analysis. |
| find_definitionA | šÆ Find the definition location of a symbol (function, class, variable, method). šÆ PURPOSE: Locates where a symbol is originally defined, providing file path, line number, and context. š§ USAGE: Use after analyze_codebase when you need to understand where a specific symbol is implemented. ā” PERFORMANCE: Fast operation (sub-second) - leverages cached code graph for instant lookups. š WORKFLOW: analyze_codebase ā find_definition ā examine definition context ā find_references/find_callers for usage patterns. š” TIP: Works with partial names - 'MyClass' will find 'MyClass', 'MyClassImpl', etc. Use exact names for precision. |
| find_referencesA | š Find all references to a symbol throughout the codebase. šÆ PURPOSE: Discovers everywhere a symbol is used, imported, or referenced, showing usage patterns and dependencies. š§ USAGE: Use after find_definition to understand how a symbol is used across the codebase. ā” PERFORMANCE: Fast operation (1-3s) - efficiently searches the indexed code graph. š WORKFLOW: find_definition ā find_references ā analyze usage patterns ā complexity_analysis for refactoring insights. š” TIP: Essential for impact analysis before refactoring - shows all code that would be affected by changes. |
| find_callersA | š Find all functions that call the specified function. šÆ PURPOSE: Identifies the call hierarchy - which functions depend on the target function, essential for understanding code dependencies. š§ USAGE: Use when analyzing function dependencies, planning refactoring, or understanding code flow patterns. ā” PERFORMANCE: Fast operation (1-2s) - uses pre-built call graph for efficient traversal. š WORKFLOW: find_definition ā find_callers ā analyze call patterns ā find_callees for complete dependency picture. š” TIP: Crucial for refactoring - shows all functions that would break if you change the target function's signature. |
| find_calleesA | š± Find all functions called by the specified function. šÆ PURPOSE: Maps function dependencies - what other functions does the target function rely on, revealing complexity and coupling. š§ USAGE: Use to understand function complexity, identify potential extraction opportunities, or analyze dependency chains. ā” PERFORMANCE: Fast operation (1-2s) - leverages indexed call relationships for instant results. š WORKFLOW: find_definition ā find_callees ā complexity_analysis ā identify refactoring opportunities. š” TIP: High callee count often indicates functions that are doing too much and could benefit from decomposition. |
| complexity_analysisA | š Analyze code complexity and identify refactoring opportunities. šÆ PURPOSE: Calculates cyclomatic complexity, identifies code smells, and suggests specific refactoring opportunities with priority rankings. š§ USAGE: Use after basic analysis to identify problematic code areas that need attention. Essential for code quality assessment. ā” PERFORMANCE: Moderate operation (5-15s) - analyzes complexity metrics across the entire codebase. š WORKFLOW: analyze_codebase ā complexity_analysis ā examine high-complexity functions ā find_callers/find_callees for refactoring impact. š” TIP: Start with threshold=15 for critical issues, lower to 10 for comprehensive analysis. Focus on functions with complexity >20 first. |
| dependency_analysisA | š Analyze module dependencies and import relationships. šÆ PURPOSE: Maps module interdependencies, identifies circular dependencies, and reveals architectural patterns and potential issues. š§ USAGE: Use for architectural analysis, identifying tightly coupled modules, or planning module restructuring. ā” PERFORMANCE: Moderate operation (3-10s) - analyzes import relationships and builds dependency graph. š WORKFLOW: analyze_codebase ā dependency_analysis ā identify problematic dependencies ā complexity_analysis for detailed insights. š” TIP: Look for circular dependencies and modules with high fan-in/fan-out ratios - these often indicate architectural problems. |
| project_statisticsA | š Get comprehensive project statistics and health metrics. šÆ PURPOSE: Provides high-level project overview including file counts, language distribution, complexity trends, and overall health score. š§ USAGE: Use for project assessment, progress tracking, or generating project reports. Great for understanding project scale and characteristics. ā” PERFORMANCE: Fast operation (1-3s) - aggregates pre-calculated metrics from the code graph. š WORKFLOW: analyze_codebase ā project_statistics ā drill down with specific analysis tools based on findings. š” TIP: Use regularly to track code quality trends over time. Health score below 7/10 indicates areas needing attention. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/eas4ai/code-graph-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server