DependencyMCP Server
Servidor DependencyMCP
Un servidor de Protocolo de Contexto de Modelo (MCP) que analiza bases de código para generar gráficos de dependencias e información arquitectónica. Este servidor ayuda a comprender la estructura del código, las dependencias y los patrones arquitectónicos en múltiples lenguajes de programación.
Características
Compatibilidad con varios idiomas : analiza dependencias en TypeScript, JavaScript, C#, Python y más
Generación de gráficos de dependencia : crea gráficos de dependencia detallados en formato JSON o DOT
Análisis arquitectónico : infiere capas arquitectónicas y las valida según las reglas
Metadatos de archivo : extrae importaciones, exportaciones y otros metadatos de los archivos de origen
Sistema de puntuación : evalúa el código base en función de las reglas y patrones arquitectónicos
Related MCP server: mcp-codebase-oracle
Instalación
Clonar el repositorio
Instalar dependencias:
npm installConstruir el proyecto:
npm run buildConfiguración
Agregue a su archivo de configuración de MCP (generalmente ubicado en ~/.config/cline/mcp_settings.json o equivalente):
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 } } }Variables de entorno:
MAX_LINES_TO_READ: Número máximo de líneas a leer de cada archivo (predeterminado: 1000)
CACHE_DIR: Directorio para almacenar archivos de caché de dependencia (predeterminado: .dependency-cache)
CACHE_TTL: Tiempo de vida de la caché en milisegundos (valor predeterminado: 1 hora = 3600000)
Herramientas disponibles
analizar_dependencias
Analiza las dependencias en una base de código y genera un gráfico de dependencia.
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
});obtener_gráfico_de_dependencias
Obtiene el gráfico de dependencia para una base de código en formato JSON o DOT.
const result = await client.callTool("DependencyMCP", "get_dependency_graph", {
path: "/path/to/project",
format: "dot" // or "json" (default)
});obtener metadatos del archivo
Obtiene metadatos detallados sobre un archivo específico.
const result = await client.callTool("DependencyMCP", "get_file_metadata", {
path: "/path/to/file.ts"
});obtener_puntuación_arquitectónica
Califica el código base según reglas y patrones arquitectónicos.
const result = await client.callTool("DependencyMCP", "get_architectural_score", {
path: "/path/to/project",
rules: [
{
pattern: "src/domain/**/*",
allowed: ["src/domain/**/*"],
forbidden: ["src/infrastructure/**/*"]
}
]
});Ejemplo de salida
Gráfico de dependencia (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": []
}
}Puntuación arquitectónica
{
"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"
}Desarrollo
El servidor está construido con TypeScript y utiliza:
Zod para la validación de esquemas
diff para comparación de archivos
minimatch para coincidencia de patrones globulares
Estructura del proyecto
dependency-mcp/
├── src/
│ └── index.mts # Main server implementation
├── package.json
├── tsconfig.json
└── README.mdAñadiendo compatibilidad con nuevos idiomas
Para agregar soporte para un nuevo lenguaje de programación:
Agregar extensiones de archivo a la matriz
fileTypespredeterminadaImplementar patrones de expresiones regulares específicos del lenguaje en
parseFileImportsyparseFileExportsAgregue cualquier patrón arquitectónico específico del idioma a
inferArchitecturalLayer
Licencia
Instituto Tecnológico de Massachusetts (MIT)
Available Tools
6 toolscheck_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.
| Name | Required | Description | Default |
|---|---|---|---|
| package_name | Yes | Name of the package to check | |
| version | Yes | Version to check for existence | |
| registry | Yes | Package registry/manager to check |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| packages | Yes | Array of package objects with name and version | |
| registry | Yes | Package registry/manager to check |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| package_name | Yes | Name of the package to check | |
| registry | Yes | Package registry/manager to check |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| packages | Yes | Array of package names to check | |
| registry | Yes | Package registry/manager to check |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| package_name | Yes | Name of the package to get info for | |
| registry | Yes | Package registry/manager to check |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| packages | Yes | Array of package names to get info for | |
| registry | Yes | Package registry/manager to check |
TDQS
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.
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.
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.
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.
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.
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.
6 tool updates
- First observed
check_version_exists - First observed
check_versions_exist - First observed
get_latest_version - First observed
get_latest_versions - First observed
get_package_info - First observed
get_packages_info
TDQS
Scored across 6 tools
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.
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.
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.
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
Related MCP Connectors
AI-powered codebase analysis — call graphs, security, dead code, complexity. 150+ tools.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
AI Agent with Architectural Memory. Impact analysis (free), tests and code from the graph (pro).
Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides comprehensive codebase analysis including project structure evaluation, cross-language duplicate detection, microservices validation, and configuration optimization with AI-powered pattern learning that generates actionable improvement reports.MIT
- AlicenseAqualityDmaintenanceAnalyzes software projects to extract architecture, build dependency graphs, and predict the impact of code changes.241MIT
- AlicenseNot gradedqualityBmaintenanceProvides semantic code search and code insights via a knowledge graph, enabling AI to understand, navigate, and modify complex projects with deep dependency and architecture analysis.MIT
- AlicenseNot gradedqualityDmaintenanceProvides intelligent codebase analysis, dependency scanning, architecture detection, security vulnerability scanning, and automatic documentation generation for modern development teams.6 npmMIT