DependencyMCP Server logo

DependencyMCP Server

by mkearl

DependencyMCP Server analyzes codebases to generate dependency graphs and architectural insights. It helps understand code structure, dependencies, and architectural patterns across multiple programming languages.

View on GitHub

Last updated: N/A

What is DependencyMCP Server?

DependencyMCP Server is a Model Context Protocol (MCP) server that analyzes codebases to generate dependency graphs and architectural insights. It extracts imports, exports, and other metadata from source files to provide a comprehensive view of code dependencies and architecture.

How to use DependencyMCP Server?

  1. Clone the repository. 2. Install dependencies using npm install. 3. Build the project using npm run build. 4. Configure the server in your MCP settings file, providing the path to the built index.js file and setting environment variables for cache and file reading limits. 5. Use the available tools (analyze_dependencies, get_dependency_graph, get_file_metadata, get_architectural_score) through the MCP client by calling them with appropriate parameters.

Key features of DependencyMCP Server

  • Multi-Language Support

  • Dependency Graph Generation

  • Architectural Analysis

  • File Metadata Extraction

Use cases of DependencyMCP Server

  • Understanding complex codebases

  • Identifying architectural violations

  • Visualizing dependencies between modules

  • Improving code maintainability

  • Enforcing architectural rules

FAQ from DependencyMCP Server

What programming languages are supported?

The server supports TypeScript, JavaScript, C#, Python, and more.

How do I configure the server?

Add the server configuration to your MCP settings file, specifying the command, arguments, and environment variables.

What is the purpose of the cache?

The cache stores dependency information to speed up subsequent analysis.

How do I add support for a new language?

Add the file extensions to the fileTypes array and implement language-specific regex patterns in parseFileImports and parseFileExports.

What is the scoring system?

The scoring system evaluates the codebase against architectural rules and patterns, deducting points for violations.