Skip to main content
Glama
mkearl

DependencyMCP Server

by mkearl

DependencyMCP 서버

코드베이스를 분석하여 종속성 그래프와 아키텍처 통찰력을 생성하는 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버는 여러 프로그래밍 언어의 코드 구조, 종속성 및 아키텍처 패턴을 이해하는 데 도움을 줍니다.

특징

  • 다국어 지원 : TypeScript, JavaScript, C#, Python 등의 종속성을 분석합니다.

  • 종속성 그래프 생성 : JSON 또는 DOT 형식으로 자세한 종속성 그래프를 생성합니다.

  • 아키텍처 분석 : 아키텍처 계층을 추론하고 규칙에 따라 검증합니다.

  • 파일 메타데이터 : 소스 파일에서 가져오기, 내보내기 및 기타 메타데이터를 추출합니다.

  • 점수 시스템 : 코드베이스를 아키텍처 규칙 및 패턴에 따라 평가합니다.

Related MCP server: mcp-codebase-oracle

설치

  1. 저장소를 복제합니다

  2. 종속성 설치:

지엑스피1

  1. 프로젝트를 빌드하세요:

npm run build

구성

MCP 설정 파일(일반적으로 ~/.config/cline/mcp_settings.json 또는 이와 동등한 위치에 있음)에 다음을 추가합니다.

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 } } }

환경 변수:

  • MAX_LINES_TO_READ: 각 파일에서 읽을 수 있는 최대 줄 수(기본값: 1000)

  • CACHE_DIR: 종속성 캐시 파일을 저장할 디렉토리(기본값: .dependency-cache)

  • CACHE_TTL: 캐시 수명(밀리초)(기본값: 1시간 = 3600000)

사용 가능한 도구

종속성 분석

코드베이스의 종속성을 분석하고 종속성 그래프를 생성합니다.

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

JSON 또는 DOT 형식으로 코드베이스의 종속성 그래프를 가져옵니다.

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

파일_메타데이터 가져오기

특정 파일에 대한 자세한 메타데이터를 가져옵니다.

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

아키텍처 점수 얻기

코드베이스를 아키텍처 규칙과 패턴에 맞춰 평가합니다.

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

출력 예

종속성 그래프(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": []
  }
}

건축 점수

{
  "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"
}

개발

서버는 TypeScript로 구축되었으며 다음을 사용합니다.

  • 스키마 검증을 위한 Zod

  • 파일 비교를 위한 diff

  • 글로브 패턴 매칭을 위한 미니매치

프로젝트 구조

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

새로운 언어에 대한 지원 추가

새로운 프로그래밍 언어에 대한 지원을 추가하려면:

  1. 기본 fileTypes 배열에 파일 확장자 추가

  2. parseFileImportsparseFileExports 에서 언어별 정규식 패턴 구현

  3. inferArchitecturalLayer 에 언어별 아키텍처 패턴을 추가합니다.

특허

MIT

Available Tools

6 tools
check_version_existsA

Check if a specific version exists. Use for dependency validation, CI/CD checks, or ensuring version compatibility. Returns whether the version exists with package details and timestamp.

ParametersJSON Schema
NameRequiredDescriptionDefault
package_nameYesName of the package to check
versionYesVersion to check for existence
registryYesPackage registry/manager to check

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the primary behavior: the tool returns whether the version exists along with package details and timestamp. The verb 'check' implies read-only operation, though it does not explicitly state side-effect-freeness or auth requirements, which are unlikely to be a concern for this type of lookup.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long and delivers the core purpose, and then direct use cases, and the return outcome. Every sentence contributes value without redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the tool's purpose, usage scenarios, and what the caller receives. The schema is complete with all parameters described. It does not differentiate from check_versions_exist explicitly, but the simple nature of the tool means the description is sufficiently complete for an agent to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema covers 100% of parameters with descriptions, so the tool description adds little extra meaning. The phrase 'specific version' aligns with package_name and version but does not enrich understanding beyond what the schema already provides. This is the baseline for full schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Check if a specific version exists,' which clearly identifies the action (checking) and resource (version existence). The word 'specific' distinguishes it from sibling tools like check_versions_exist, and it does not confuse with get_package_info or get_latest_version.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states 'Use for dependency validation, CI/CD checks, or ensuring version compatibility,' giving clear context for when to invoke the tool. It does not mention alternatives or exclusions, but the use cases are specific enough to guide the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

check_versions_existA

Check if specific versions exist for multiple packages. Use for bulk dependency validation, CI/CD pipeline checks, or ensuring multiple package version compatibility. Processes up to 100 packages in parallel with individual error handling.

ParametersJSON Schema
NameRequiredDescriptionDefault
packagesYesArray of package objects with name and version
registryYesPackage registry/manager to check

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description discloses important behavioral traits: parallel processing, a limit of 100 packages, and individual error handling. This adds meaningful context beyond the name and schema, though it does not mention return format or read-only confirmation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with purpose, then usage examples, then behavior. Every sentence earns its place with zero fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple check tool with two well-documented parameters and no output schema, the description covers purpose, use cases, and key behavioral constraints. It is complete enough for an agent to select and invoke correctly. A minor gap is the lack of return value description, but this is not essential for a boolean-like existence check.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already describes both parameters thoroughly (100% coverage). The description adds value by explaining the batch nature ('multiple packages', 'up to 100 packages') and the parallel processing, which gives practical meaning to the 'packages' parameter without contradicting the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Check'), resource ('specific versions for multiple packages'), and scope (bulk), distinguishing it from singular sibling tools. It also adds use cases like 'bulk dependency validation' and 'CI/CD pipeline checks', leaving no ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit use cases are given ('bulk dependency validation, CI/CD pipeline checks, or ensuring multiple package version compatibility'). It does not explicitly name alternatives or when not to use, but the 'multiple packages' scope versus siblings like check_version_exists implies a clear contrast.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_latest_versionA

Get the latest version of a package. Use for dependency updates, version checks, or when you need the most recent stable release. Returns package name, latest version, description, and timestamp.

ParametersJSON Schema
NameRequiredDescriptionDefault
package_nameYesName of the package to check
registryYesPackage registry/manager to check

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Since no annotations are provided, the description must carry the full burden of behavioral disclosure. It does disclose what is returned ('Returns package name, latest version, description, and timestamp'), which is useful. However, it does not explicitly state that this is a read-only operation, mention failure modes, or address prerequisites, leaving gaps in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two well-structured sentences. The first sentence states the core purpose, and the second sentence gives both usage guidance and return information. Every word earns its place, with no fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is low-complexity (2 parameters, no output schema), and the description covers the essential aspects: what it does, when to use it, and what it returns. It could be more complete by explicitly noting that it handles only a single package (vs. a batch tool) or by describing registry-specific behavior, but these are minor gaps given the simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage for both parameters, so the baseline is 3. The description does not add any parameter-specific semantics beyond what the schema already provides, such as the enum choices for registry or the meaning of package_name. It adds no extra value here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action and resource: 'Get the latest version of a package.' This is a specific verb+resource pair that is easily distinguished from siblings like check_version_exists or get_package_info. The added mention of return values further clarifies its scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage context: 'Use for dependency updates, version checks, or when you need the most recent stable release.' However, it does not name alternatives or exclusions (e.g., when to use get_latest_versions instead), so it lacks the explicit when-not guidance of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_latest_versionsA

Get latest versions for multiple packages simultaneously. Use when checking 3+ dependencies - processes up to 100 packages in parallel. Returns individual results for each package with error isolation. Much faster than individual calls for multiple packages.

ParametersJSON Schema
NameRequiredDescriptionDefault
packagesYesArray of package names to check
registryYesPackage registry/manager to check

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of disclosing behavior. It adds valuable context: parallel processing of up to 100 packages, individual results per package, and error isolation. These details hint at fault tolerance and performance characteristics, which are not visible in the schema. It stops short of specifying rate limits or exact return structure, but for a read-only check tool, this is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences, each earning its place. The first states the core purpose, the second gives a usage rule and limit, and the third describes behavior and benefit. It is front-loaded with the main idea and contains no redundant filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (two well-documented params, no output schema, no annotations), the description covers the essential aspects: purpose, when to use, behavioral traits, and performance rationale. It does not describe the exact return format, but the 'individual results for each package' hint and the context of sibling tools like get_latest_version make the tool's output predictable enough. A slightly richer description of error handling would push it to a 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%: both parameters (packages and registry) have descriptions and the registry has an enum. The description adds context about batch usage and parallelism, but does not add syntax or format details beyond what the schema already provides. This is the baseline for well-documented schemas.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Get latest versions for multiple packages simultaneously.' This clearly distinguishes it from siblings like get_latest_version (singular) and check_version_exists by emphasizing the plural, batch nature. The intent is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit usage context with a quantitative threshold: 'Use when checking 3+ dependencies' and a capability limit: 'processes up to 100 packages in parallel.' It also justifies why to use it ('Much faster than individual calls'), though it does not explicitly name the alternative tool or mention when NOT to use it. This is clear guidance, but not fully exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_package_infoA

Get detailed package information including all versions. Use for dependency audits, security reviews, or when you need comprehensive package metadata. Returns versions list, homepage, repository, and full package details.

ParametersJSON Schema
NameRequiredDescriptionDefault
package_nameYesName of the package to get info for
registryYesPackage registry/manager to check

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description does most of the work. It discloses the return behavior ('Returns versions list, homepage, repository, and full package details') but doesn't cover other behavioral aspects like rate limits, authorization, or whether results are cached. For a read-only 'get' tool, this is adequate but not exceptional.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler. The first sentence states purpose, the second adds use cases and return details. Fully front-loaded and every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only package info tool, the description covers what, when, and what comes back. The lack of an output schema is acceptable given the description explicitly lists the key fields. It doesn't explain how to handle errors or edge cases, but those aren't essential for this simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so parameters are already well-documented. The description adds no additional semantics beyond what's in the schema, making the baseline 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Get detailed package information including all versions' with a specific verb and resource. It explicitly differentiates from siblings like get_latest_version and check_version_exists by emphasizing comprehensive metadata and all versions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit use cases: 'Use for dependency audits, security reviews, or when you need comprehensive package metadata.' It does not mention when not to use or alternatives, but the context is clear enough to distinguish this from simpler sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_packages_infoA

Get comprehensive package details for multiple packages. Use for dependency audits, security reviews, or bulk package analysis. Processes up to 100 packages in parallel. Returns detailed info for each package with error isolation - failed packages don't break the batch.

ParametersJSON Schema
NameRequiredDescriptionDefault
packagesYesArray of package names to get info for
registryYesPackage registry/manager to check

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and discloses key behaviors: 'Processes up to 100 packages in parallel' and 'error isolation - failed packages don't break the batch.' This adds significant operational context, though it omits authentication or return format details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each earning its place: purpose, usage guidance, and operational limits. No fluff or redundancy, and the first sentence immediately states the tool's core function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description mentions 'Returns detailed info for each package' and error isolation, but does not specify the return structure. For a batch tool of this simplicity, this is adequate; additional detail on output format or authentication would make it near-complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for both parameters (packages array, registry enum). The description adds the parallel batch limit of 100 for the packages parameter, but beyond that it does not significantly enhance parameter semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description states 'Get comprehensive package details for multiple packages' with a specific verb and resource, and the explicit 'multiple packages' distinguishes it from the sibling get_package_info tool. It also lists concrete use cases (dependency audits, security reviews, bulk package analysis), making the purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says 'Use for dependency audits, security reviews, or bulk package analysis,' giving clear context. It does not explicitly name alternatives or when not to use, but the plural scope and sibling names imply that singular requests belong to get_package_info.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updates
    • First observedcheck_version_exists
    • First observedcheck_versions_exist
    • First observedget_latest_version
    • First observedget_latest_versions
    • First observedget_package_info
    • First observedget_packages_info

TDQS

A4.2/5.0

Scored across 6 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: single vs. multi-package operations, version existence checks vs. latest version retrieval vs. detailed package info. The descriptions reinforce these distinctions, making misselection unlikely.

Naming Consistency5/5

Tool names follow a consistent verb_noun pattern throughout (e.g., check_version_exists, get_latest_version). All use snake_case and maintain parallel naming for singular and plural variants, making the set predictable and readable.

Tool Count5/5

Six tools are well-scoped for a dependency management server, covering core operations like validation, updates, and audits. Each tool earns its place by addressing distinct use cases without redundancy or bloat.

Completeness4/5

The toolset provides strong coverage for dependency checking, version retrieval, and package info, with efficient bulk operations. A minor gap exists in update or install actions, but agents can work around this for most dependency management workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers