Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

© 2026 TrackMCP. All rights reserved.

Built with ❤️ by Krishna Goyal

    Dependency Mcp

    A Model Context Protocol (MCP) server for analyzing code dependencies

    14 stars
    JavaScript
    Updated Sep 7, 2025

    Table of Contents

    • Features
    • Installation
    • Configuration
    • Available Tools
    • analyze_dependencies
    • get_dependency_graph
    • get_file_metadata
    • get_architectural_score
    • Example Output
    • Dependency Graph (JSON)
    • Architectural Score
    • Development
    • Project Structure
    • Adding Support for New Languages
    • License

    Table of Contents

    • Features
    • Installation
    • Configuration
    • Available Tools
    • analyze_dependencies
    • get_dependency_graph
    • get_file_metadata
    • get_architectural_score
    • Example Output
    • Dependency Graph (JSON)
    • Architectural Score
    • Development
    • Project Structure
    • Adding Support for New Languages
    • License

    Documentation

    DependencyMCP Server

    A Model Context Protocol (MCP) server that analyzes codebases to generate dependency graphs and architectural insights. This server helps understand code structure, dependencies, and architectural patterns across multiple programming languages.

    Features

    • Multi-Language Support: Analyzes dependencies in TypeScript, JavaScript, C#, Python, and more
    • Dependency Graph Generation: Creates detailed dependency graphs in JSON or DOT format
    • Architectural Analysis: Infers architectural layers and validates against rules
    • File Metadata: Extracts imports, exports, and other metadata from source files
    • Scoring System: Evaluates codebase against architectural rules and patterns

    Installation

    1. Clone the repository

    2. Install dependencies:

    bash
    npm install

    3. Build the project:

    bash
    npm run build

    Configuration

    Add to your MCP settings file (usually located at ~/.config/cline/mcp_settings.json or equivalent):

    code
    json { mcpServers: { \DependencyMCP: { \command: \node, \args: [\path/to/dependency-mcp/dist/index.js], \env: { \MAX_LINES_TO_READ: \1000, \CACHE_DIR: \path/to/dependency-mcp/.dependency-cache, \CACHE_TTL: \3600000 } } }

    Environment Variables:

    • MAX_LINES_TO_READ: Maximum number of lines to read from each file (default: 1000)
    • CACHE_DIR: Directory to store dependency cache files (default: .dependency-cache)
    • CACHE_TTL: Cache time-to-live in milliseconds (default: 1 hour = 3600000)

    Available Tools

    analyze_dependencies

    Analyzes dependencies in a codebase and generates a dependency graph.

    typescript
    const result = await client.callTool("DependencyMCP", "analyze_dependencies", {
      path: "/path/to/project",
      excludePatterns: ["node_modules", "dist"], // optional
      maxDepth: 10, // optional
      fileTypes: [".ts", ".js", ".cs"] // optional
    });

    get_dependency_graph

    Gets the dependency graph for a codebase in JSON or DOT format.

    typescript
    const result = await client.callTool("DependencyMCP", "get_dependency_graph", {
      path: "/path/to/project",
      format: "dot" // or "json" (default)
    });

    get_file_metadata

    Gets detailed metadata about a specific file.

    typescript
    const result = await client.callTool("DependencyMCP", "get_file_metadata", {
      path: "/path/to/file.ts"
    });

    get_architectural_score

    Scores the codebase against architectural rules and patterns.

    typescript
    const result = await client.callTool("DependencyMCP", "get_architectural_score", {
      path: "/path/to/project",
      rules: [
        {
          pattern: "src/domain/**/*",
          allowed: ["src/domain/**/*"],
          forbidden: ["src/infrastructure/**/*"]
        }
      ]
    });

    Example Output

    Dependency Graph (JSON)

    json
    {
      "src/index.ts": {
        "path": "src/index.ts",
        "imports": ["./utils", "./services/parser"],
        "exports": ["analyze", "generateGraph"],
        "namespaces": [],
        "architecturalLayer": "Infrastructure",
        "dependencies": ["src/utils.ts", "src/services/parser.ts"],
        "dependents": []
      }
    }

    Architectural Score

    json
    {
      "score": 85,
      "violations": [
        "src/domain/user.ts -> src/infrastructure/database.ts violates architectural rules"
      ],
      "details": "Score starts at 100 and deducts 5 points per violation"
    }

    Development

    The server is built with TypeScript and uses:

    • Zod for schema validation
    • diff for file comparison
    • minimatch for glob pattern matching

    Project Structure

    code
    dependency-mcp/
    ├── src/
    │   └── index.mts    # Main server implementation
    ├── package.json
    ├── tsconfig.json
    └── README.md

    Adding Support for New Languages

    To add support for a new programming language:

    1. Add file extensions to the default fileTypes array

    2. Implement language-specific regex patterns in parseFileImports and parseFileExports

    3. Add any language-specific architectural patterns to inferArchitecturalLayer

    License

    MIT

    Similar MCP

    Based on tags & features

    • WA

      Waha Mcp

      JavaScript00
    • WI

      Wizzy Mcp Tmdb

      JavaScript00
    • RI

      Rijksmuseum Mcp

      JavaScript·
      59
    • MC

      Mcp Server Playwright

      JavaScript·
      262

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • WA

      Waha Mcp

      JavaScript00
    • WI

      Wizzy Mcp Tmdb

      JavaScript00
    • RI

      Rijksmuseum Mcp

      JavaScript·
      59
    • MC

      Mcp Server Playwright

      JavaScript·
      262

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k