@ebowwa/dependency-graph-mcp 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @mcp/dependency-graph
1
+ # @ebowwa/dependency-graph-mcp
2
2
 
3
3
  MCP server for dependency graph analysis and visualization in monorepos.
4
4
 
@@ -14,7 +14,9 @@ MCP server for dependency graph analysis and visualization in monorepos.
14
14
  ## Installation
15
15
 
16
16
  ```bash
17
- bun add @mcp/dependency-graph
17
+ bun add @ebowwa/dependency-graph-mcp
18
+ # or
19
+ npm install @ebowwa/dependency-graph-mcp
18
20
  ```
19
21
 
20
22
  ## MCP Tools
@@ -44,7 +46,7 @@ Analyze the impact of changing a specific package.
44
46
 
45
47
  ```json
46
48
  {
47
- "package": "@codespaces/terminal",
49
+ "package": "@ebowwa/terminal",
48
50
  "includeTransitive": true,
49
51
  "format": "tree"
50
52
  }
@@ -76,7 +78,7 @@ Get detailed information about a specific package.
76
78
 
77
79
  ```json
78
80
  {
79
- "package": "@codespaces/ssh"
81
+ "package": "@ebowwa/ssh"
80
82
  }
81
83
  ```
82
84
 
@@ -104,10 +106,10 @@ Add to your MCP config:
104
106
  dependency_graph(format="mermaid")
105
107
  ```
106
108
 
107
- ### What depends on `@codespaces/ssh`?
109
+ ### What depends on `@ebowwa/ssh`?
108
110
 
109
111
  ```
110
- impact_analysis(package="@codespaces/ssh", format="tree")
112
+ impact_analysis(package="@ebowwa/ssh", format="tree")
111
113
  ```
112
114
 
113
115
  ### Find circular dependencies
package/bun.lock CHANGED
@@ -5,6 +5,7 @@
5
5
  "": {
6
6
  "name": "@ebowwa/dependency-graph-mcp",
7
7
  "dependencies": {
8
+ "@ebowwa/dependency-graph": "^1.0.0",
8
9
  "@modelcontextprotocol/sdk": "^1.0.4",
9
10
  "zod": "^3.24.1",
10
11
  },
@@ -19,6 +20,8 @@
19
20
  },
20
21
  },
21
22
  "packages": {
23
+ "@ebowwa/dependency-graph": ["@ebowwa/dependency-graph@1.0.1", "", {}, "sha512-CTdY2L+aQdPkdYhbLszh9XxU46AEBu3bIWtfif23xurGJ9g1jxwhPEy/4TSgW2R0dmyalen0Iq62fjgLzeSeAg=="],
24
+
22
25
  "@hono/node-server": ["@hono/node-server@1.19.9", "", { "peerDependencies": { "hono": "^4" } }, "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw=="],
23
26
 
24
27
  "@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.26.0", "", { "dependencies": { "@hono/node-server": "^1.19.9", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "express": "^5.2.1", "express-rate-limit": "^8.2.1", "hono": "^4.11.4", "jose": "^6.1.3", "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.25 || ^4.0", "zod-to-json-schema": "^3.25.1" }, "peerDependencies": { "@cfworker/json-schema": "^4.1.1" }, "optionalPeers": ["@cfworker/json-schema"] }, "sha512-Y5RmPncpiDtTXDbLKswIJzTqu2hyBKxTNsgKqKclDbhIgg1wgtf1fRuvxgTnRfcnxtvvgbIEcqUOzZrJ6iSReg=="],
package/dist/index.js CHANGED
@@ -13267,11 +13267,9 @@ var ServerResultSchema2 = union([
13267
13267
  CreateTaskResultSchema2
13268
13268
  ]);
13269
13269
 
13270
- // src/index.ts
13271
- import { readdirSync, readFileSync, existsSync } from "fs";
13272
- import { join, dirname, relative } from "path";
13273
- import { fileURLToPath } from "url";
13274
- var TOOLING_DIR = dirname(fileURLToPath(import.meta.url.replace("/MCP/packages/dependency-graph", "/packages/src/tooling")));
13270
+ // ../../src/dependency-graph/dist/builder.js
13271
+ import { readdirSync, readFileSync, existsSync } from "node:fs";
13272
+ import { join, dirname, relative } from "node:path";
13275
13273
 
13276
13274
  class DependencyGraphBuilder {
13277
13275
  monorepoRoot;
@@ -13461,105 +13459,111 @@ class DependencyGraphBuilder {
13461
13459
  getGraph() {
13462
13460
  return this.graph;
13463
13461
  }
13462
+ getMonorepoRoot() {
13463
+ return this.monorepoRoot;
13464
+ }
13464
13465
  }
13465
- var DEPENDENCY_GRAPH_SCHEMA = {
13466
- name: "dependency_graph",
13467
- description: "Build a complete dependency graph of the monorepo",
13468
- inputSchema: {
13469
- type: "object",
13470
- properties: {
13471
- includeDevDependencies: {
13472
- type: "boolean",
13473
- description: "Include devDependencies in the graph",
13474
- default: false
13475
- },
13476
- analyzeImports: {
13477
- type: "boolean",
13478
- description: "Analyze TypeScript/JavaScript imports",
13479
- default: true
13480
- },
13481
- excludePatterns: {
13482
- type: "array",
13483
- items: { type: "string" },
13484
- description: "Regex patterns to exclude from dependency analysis",
13485
- default: []
13486
- },
13487
- format: {
13488
- type: "string",
13489
- enum: ["json", "mermaid", "dot", "tree"],
13490
- description: "Output format for the graph",
13491
- default: "json"
13466
+ // ../../src/dependency-graph/dist/analysis.js
13467
+ function findCircularDependencies(graph, maxDepth = 10) {
13468
+ const cycles = [];
13469
+ const visited = new Set;
13470
+ const recursionStack = new Set;
13471
+ function dfs(node, path) {
13472
+ if (path.length > maxDepth)
13473
+ return;
13474
+ visited.add(node);
13475
+ recursionStack.add(node);
13476
+ path.push(node);
13477
+ for (const edge of graph.edges) {
13478
+ if (edge.from === node) {
13479
+ if (recursionStack.has(edge.to)) {
13480
+ const cycleStart = path.indexOf(edge.to);
13481
+ if (cycleStart >= 0) {
13482
+ cycles.push([...path.slice(cycleStart), edge.to]);
13483
+ }
13484
+ } else if (!visited.has(edge.to)) {
13485
+ dfs(edge.to, [...path]);
13486
+ }
13492
13487
  }
13493
13488
  }
13489
+ recursionStack.delete(node);
13494
13490
  }
13495
- };
13496
- var IMPACT_ANALYSIS_SCHEMA = {
13497
- name: "impact_analysis",
13498
- description: "Analyze the impact of changing a specific package",
13499
- inputSchema: {
13500
- type: "object",
13501
- properties: {
13502
- package: {
13503
- type: "string",
13504
- description: "Package name to analyze"
13505
- },
13506
- includeTransitive: {
13507
- type: "boolean",
13508
- description: "Include transitive dependents",
13509
- default: true
13510
- },
13511
- format: {
13512
- type: "string",
13513
- enum: ["json", "tree"],
13514
- description: "Output format",
13515
- default: "tree"
13516
- }
13517
- },
13518
- required: ["package"]
13491
+ for (const [name, node] of graph.nodes) {
13492
+ if (node.type === "workspace" && !visited.has(name)) {
13493
+ dfs(name, []);
13494
+ }
13519
13495
  }
13520
- };
13521
- var FIND_CIRCULAR_SCHEMA = {
13522
- name: "find_circular",
13523
- description: "Find circular dependencies in the monorepo",
13524
- inputSchema: {
13525
- type: "object",
13526
- properties: {
13527
- maxDepth: {
13528
- type: "number",
13529
- description: "Maximum depth to search for cycles",
13530
- default: 10
13531
- }
13496
+ return cycles;
13497
+ }
13498
+ function analyzeImpact(graph, packageName, includeTransitive = true) {
13499
+ const direct = [];
13500
+ const transitive = [];
13501
+ const visited = new Set;
13502
+ const directDependents = graph.reverseEdges.get(packageName);
13503
+ if (directDependents) {
13504
+ for (const dep of directDependents) {
13505
+ direct.push(dep);
13506
+ visited.add(dep);
13532
13507
  }
13533
13508
  }
13534
- };
13535
- var UNUSED_CODE_SCHEMA = {
13536
- name: "unused_code",
13537
- description: "Find potentially unused packages (no dependents)",
13538
- inputSchema: {
13539
- type: "object",
13540
- properties: {
13541
- includeExternal: {
13542
- type: "boolean",
13543
- description: "Include external dependencies",
13544
- default: false
13545
- }
13509
+ if (includeTransitive) {
13510
+ for (const dep of direct) {
13511
+ collectTransitive(graph, dep, visited, transitive);
13546
13512
  }
13547
13513
  }
13548
- };
13549
- var PACKAGE_INFO_SCHEMA = {
13550
- name: "package_info",
13551
- description: "Get detailed information about a specific package",
13552
- inputSchema: {
13553
- type: "object",
13554
- properties: {
13555
- package: {
13556
- type: "string",
13557
- description: "Package name"
13514
+ return {
13515
+ direct,
13516
+ transitive,
13517
+ all: Array.from(visited)
13518
+ };
13519
+ }
13520
+ function collectTransitive(graph, packageName, visited, result) {
13521
+ const dependents = graph.reverseEdges.get(packageName);
13522
+ if (!dependents)
13523
+ return;
13524
+ for (const dep of dependents) {
13525
+ if (!visited.has(dep)) {
13526
+ visited.add(dep);
13527
+ result.push(dep);
13528
+ collectTransitive(graph, dep, visited, result);
13529
+ }
13530
+ }
13531
+ }
13532
+ function findUnusedPackages(graph, includeExternal = false) {
13533
+ const unused = [];
13534
+ for (const [name, node] of graph.nodes) {
13535
+ if (node.type === "workspace" || includeExternal) {
13536
+ const dependents = graph.reverseEdges.get(name);
13537
+ if (!dependents || dependents.size === 0) {
13538
+ unused.push(name);
13558
13539
  }
13559
- },
13560
- required: ["package"]
13540
+ }
13561
13541
  }
13562
- };
13542
+ return unused;
13543
+ }
13544
+ function getPackageInfo(graph, packageName) {
13545
+ const node = graph.nodes.get(packageName);
13546
+ if (!node)
13547
+ return null;
13548
+ const dependencies = graph.edges.filter((e) => e.from === packageName).map((edge) => {
13549
+ const depNode = graph.nodes.get(edge.to);
13550
+ return {
13551
+ name: edge.to,
13552
+ type: edge.type,
13553
+ version: depNode?.version
13554
+ };
13555
+ });
13556
+ const dependents = Array.from(graph.reverseEdges.get(packageName) || []);
13557
+ return {
13558
+ name: packageName,
13559
+ type: node.type,
13560
+ path: node.path || "N/A",
13561
+ version: node.version,
13562
+ dependencies,
13563
+ dependents
13564
+ };
13565
+ }
13566
+ // ../../src/dependency-graph/dist/formatters.js
13563
13567
  function formatGraph(graph, format) {
13564
13568
  switch (format) {
13565
13569
  case "mermaid":
@@ -13570,21 +13574,24 @@ function formatGraph(graph, format) {
13570
13574
  return formatAsTree(graph);
13571
13575
  case "json":
13572
13576
  default:
13573
- return JSON.stringify({
13574
- nodes: Array.from(graph.nodes.values()),
13575
- edges: graph.edges
13576
- }, null, 2);
13577
+ return formatAsJson(graph);
13577
13578
  }
13578
13579
  }
13580
+ function formatAsJson(graph) {
13581
+ return JSON.stringify({
13582
+ nodes: Array.from(graph.nodes.values()),
13583
+ edges: graph.edges
13584
+ }, null, 2);
13585
+ }
13579
13586
  function formatAsMermaid(graph) {
13580
13587
  const lines = ["graph TD"];
13581
13588
  for (const [name, node] of graph.nodes) {
13582
13589
  const label = node.type === "workspace" ? `\uD83D\uDCE6 ${name}` : `\uD83D\uDCDA ${name}`;
13583
- lines.push(` ${name.replace(/[^a-zA-Z0-9]/g, "_")}["${label}"]`);
13590
+ lines.push(` ${sanitizeId(name)}["${label}"]`);
13584
13591
  }
13585
13592
  for (const edge of graph.edges) {
13586
- const from = edge.from.replace(/[^a-zA-Z0-9]/g, "_");
13587
- const to = edge.to.replace(/[^a-zA-Z0-9]/g, "_");
13593
+ const from = sanitizeId(edge.from);
13594
+ const to = sanitizeId(edge.to);
13588
13595
  const label = edge.type === "workspace" ? "workspace" : edge.type === "import" ? "imports" : "external";
13589
13596
  lines.push(` ${from} -->|${label}| ${to}`);
13590
13597
  }
@@ -13592,7 +13599,7 @@ function formatAsMermaid(graph) {
13592
13599
  lines.push(" classDef external fill:#f5f5f5");
13593
13600
  lines.push(" classDef import fill:#fff3e0");
13594
13601
  for (const [name, node] of graph.nodes) {
13595
- const id = name.replace(/[^a-zA-Z0-9]/g, "_");
13602
+ const id = sanitizeId(name);
13596
13603
  if (node.type === "workspace") {
13597
13604
  lines.push(` class ${id} workspace`);
13598
13605
  } else if (node.type === "external") {
@@ -13651,8 +13658,8 @@ function printTree(graph, nodeName, prefix, seen, lines) {
13651
13658
  for (let i = 0;i < outgoing.length; i++) {
13652
13659
  const edge = outgoing[i];
13653
13660
  const isLast = i === outgoing.length - 1;
13654
- const connector = isLast ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500";
13655
- const childPrefix = prefix + (isLast ? " " : "\u2502 ");
13661
+ const connector = isLast ? "└──" : "├──";
13662
+ const childPrefix = prefix + (isLast ? " " : " ");
13656
13663
  lines.push(`${prefix}${connector} \uD83D\uDCE6 ${edge.to} [${edge.type}]`);
13657
13664
  if (!seen.has(edge.to)) {
13658
13665
  printTree(graph, edge.to, childPrefix, seen, lines);
@@ -13660,77 +13667,114 @@ function printTree(graph, nodeName, prefix, seen, lines) {
13660
13667
  }
13661
13668
  const externals = graph.edges.filter((e) => e.from === nodeName && graph.nodes.get(e.to)?.type === "external");
13662
13669
  if (externals.length > 0) {
13663
- lines.push(`${prefix}\u2514\u2500\u2500 \uD83D\uDCDA ${externals.length} external dependencies`);
13670
+ lines.push(`${prefix}└── \uD83D\uDCDA ${externals.length} external dependencies`);
13664
13671
  }
13665
13672
  }
13666
- function findCircularDependencies(graph, maxDepth = 10) {
13667
- const cycles = [];
13668
- const visited = new Set;
13669
- const recursionStack = new Set;
13670
- function dfs(node, path) {
13671
- if (path.length > maxDepth)
13672
- return;
13673
- visited.add(node);
13674
- recursionStack.add(node);
13675
- path.push(node);
13676
- for (const edge of graph.edges) {
13677
- if (edge.from === node) {
13678
- if (recursionStack.has(edge.to)) {
13679
- const cycleStart = path.indexOf(edge.to);
13680
- if (cycleStart >= 0) {
13681
- cycles.push([...path.slice(cycleStart), edge.to]);
13682
- }
13683
- } else if (!visited.has(edge.to)) {
13684
- dfs(edge.to, [...path]);
13685
- }
13673
+ function sanitizeId(name) {
13674
+ return name.replace(/[^a-zA-Z0-9]/g, "_");
13675
+ }
13676
+ // src/index.ts
13677
+ var DEPENDENCY_GRAPH_SCHEMA = {
13678
+ name: "dependency_graph",
13679
+ description: "Build a complete dependency graph of the monorepo",
13680
+ inputSchema: {
13681
+ type: "object",
13682
+ properties: {
13683
+ includeDevDependencies: {
13684
+ type: "boolean",
13685
+ description: "Include devDependencies in the graph",
13686
+ default: false
13687
+ },
13688
+ analyzeImports: {
13689
+ type: "boolean",
13690
+ description: "Analyze TypeScript/JavaScript imports",
13691
+ default: true
13692
+ },
13693
+ excludePatterns: {
13694
+ type: "array",
13695
+ items: { type: "string" },
13696
+ description: "Regex patterns to exclude from dependency analysis",
13697
+ default: []
13698
+ },
13699
+ format: {
13700
+ type: "string",
13701
+ enum: ["json", "mermaid", "dot", "tree"],
13702
+ description: "Output format for the graph",
13703
+ default: "json"
13686
13704
  }
13687
13705
  }
13688
- recursionStack.delete(node);
13689
13706
  }
13690
- for (const [name, node] of graph.nodes) {
13691
- if (node.type === "workspace" && !visited.has(name)) {
13692
- dfs(name, []);
13693
- }
13707
+ };
13708
+ var IMPACT_ANALYSIS_SCHEMA = {
13709
+ name: "impact_analysis",
13710
+ description: "Analyze the impact of changing a specific package",
13711
+ inputSchema: {
13712
+ type: "object",
13713
+ properties: {
13714
+ package: {
13715
+ type: "string",
13716
+ description: "Package name to analyze"
13717
+ },
13718
+ includeTransitive: {
13719
+ type: "boolean",
13720
+ description: "Include transitive dependents",
13721
+ default: true
13722
+ },
13723
+ format: {
13724
+ type: "string",
13725
+ enum: ["json", "tree"],
13726
+ description: "Output format",
13727
+ default: "tree"
13728
+ }
13729
+ },
13730
+ required: ["package"]
13694
13731
  }
13695
- return cycles;
13696
- }
13697
- function analyzeImpact(graph, packageName, includeTransitive = true) {
13698
- const direct = [];
13699
- const transitive = [];
13700
- const visited = new Set;
13701
- const directDependents = graph.reverseEdges.get(packageName);
13702
- if (directDependents) {
13703
- for (const dep of directDependents) {
13704
- direct.push(dep);
13705
- visited.add(dep);
13732
+ };
13733
+ var FIND_CIRCULAR_SCHEMA = {
13734
+ name: "find_circular",
13735
+ description: "Find circular dependencies in the monorepo",
13736
+ inputSchema: {
13737
+ type: "object",
13738
+ properties: {
13739
+ maxDepth: {
13740
+ type: "number",
13741
+ description: "Maximum depth to search for cycles",
13742
+ default: 10
13743
+ }
13706
13744
  }
13707
13745
  }
13708
- if (includeTransitive) {
13709
- for (const dep of direct) {
13710
- collectTransitive(graph, dep, visited, transitive);
13746
+ };
13747
+ var UNUSED_CODE_SCHEMA = {
13748
+ name: "unused_code",
13749
+ description: "Find potentially unused packages (no dependents)",
13750
+ inputSchema: {
13751
+ type: "object",
13752
+ properties: {
13753
+ includeExternal: {
13754
+ type: "boolean",
13755
+ description: "Include external dependencies",
13756
+ default: false
13757
+ }
13711
13758
  }
13712
13759
  }
13713
- return {
13714
- direct,
13715
- transitive,
13716
- all: Array.from(visited)
13717
- };
13718
- }
13719
- function collectTransitive(graph, packageName, visited, result) {
13720
- const dependents = graph.reverseEdges.get(packageName);
13721
- if (!dependents)
13722
- return;
13723
- for (const dep of dependents) {
13724
- if (!visited.has(dep)) {
13725
- visited.add(dep);
13726
- result.push(dep);
13727
- collectTransitive(graph, dep, visited, result);
13728
- }
13760
+ };
13761
+ var PACKAGE_INFO_SCHEMA = {
13762
+ name: "package_info",
13763
+ description: "Get detailed information about a specific package",
13764
+ inputSchema: {
13765
+ type: "object",
13766
+ properties: {
13767
+ package: {
13768
+ type: "string",
13769
+ description: "Package name"
13770
+ }
13771
+ },
13772
+ required: ["package"]
13729
13773
  }
13730
- }
13774
+ };
13731
13775
  var server = new Server({
13732
- name: "@mcp/dependency-graph",
13733
- version: "0.1.0"
13776
+ name: "@ebowwa/dependency-graph-mcp",
13777
+ version: "1.0.1"
13734
13778
  }, {
13735
13779
  capabilities: {
13736
13780
  tools: {}
@@ -13766,7 +13810,11 @@ server.setRequestHandler(CallToolRequestSchema2, async (request) => {
13766
13810
  excludePatterns = [],
13767
13811
  format = "json"
13768
13812
  } = args;
13769
- await cachedBuilder.build({ includeDevDependencies, analyzeImports, excludePatterns });
13813
+ await cachedBuilder.build({
13814
+ includeDevDependencies,
13815
+ analyzeImports,
13816
+ excludePatterns
13817
+ });
13770
13818
  const graph = cachedBuilder.getGraph();
13771
13819
  cachedGraph = graph;
13772
13820
  return {
@@ -13820,15 +13868,7 @@ Total affected: ${impact.all.length} packages`);
13820
13868
  }
13821
13869
  case "unused_code": {
13822
13870
  const { includeExternal = false } = args;
13823
- const unused = [];
13824
- for (const [name2, node] of cachedGraph.nodes) {
13825
- if (node.type === "workspace" || includeExternal) {
13826
- const dependents = cachedGraph.reverseEdges.get(name2);
13827
- if (!dependents || dependents.size === 0) {
13828
- unused.push(name2);
13829
- }
13830
- }
13831
- }
13871
+ const unused = findUnusedPackages(cachedGraph, includeExternal);
13832
13872
  if (unused.length === 0) {
13833
13873
  return {
13834
13874
  content: [{ type: "text", text: "No unused packages found!" }]
@@ -13848,28 +13888,30 @@ ${unused.map((n) => ` \u2514\u2500\u2500 ${n}`).join(`
13848
13888
  }
13849
13889
  case "package_info": {
13850
13890
  const { package: packageName } = args;
13851
- const node = cachedGraph.nodes.get(packageName);
13852
- if (!node) {
13891
+ const info = getPackageInfo(cachedGraph, packageName);
13892
+ if (!info) {
13853
13893
  return {
13854
- content: [{ type: "text", text: `Package "${packageName}" not found in dependency graph.` }]
13894
+ content: [
13895
+ {
13896
+ type: "text",
13897
+ text: `Package "${packageName}" not found in dependency graph.`
13898
+ }
13899
+ ]
13855
13900
  };
13856
13901
  }
13857
- const dependencies = cachedGraph.edges.filter((e) => e.from === packageName);
13858
- const dependents = Array.from(cachedGraph.reverseEdges.get(packageName) || []);
13859
13902
  const lines = [
13860
- `Package: ${packageName}`,
13861
- `Type: ${node.type}`,
13862
- `Path: ${node.path || "N/A"}`,
13863
- node.version ? `Version: ${node.version}` : "",
13903
+ `Package: ${info.name}`,
13904
+ `Type: ${info.type}`,
13905
+ `Path: ${info.path}`,
13906
+ info.version ? `Version: ${info.version}` : "",
13864
13907
  "",
13865
- `Dependencies (${dependencies.length}):`
13908
+ `Dependencies (${info.dependencies.length}):`
13866
13909
  ];
13867
- for (const dep of dependencies) {
13868
- const depNode = cachedGraph.nodes.get(dep.to);
13869
- lines.push(` \u2514\u2500\u2500 ${dep.to} [${dep.type}]${depNode?.version ? ` @ ${depNode.version}` : ""}`);
13910
+ for (const dep of info.dependencies) {
13911
+ lines.push(` \u2514\u2500\u2500 ${dep.name} [${dep.type}]${dep.version ? ` @ ${dep.version}` : ""}`);
13870
13912
  }
13871
- lines.push(``, `Dependents (${dependents.length}):`);
13872
- for (const dep of dependents) {
13913
+ lines.push(``, `Dependents (${info.dependents.length}):`);
13914
+ for (const dep of info.dependents) {
13873
13915
  lines.push(` \u2514\u2500\u2500 ${dep}`);
13874
13916
  }
13875
13917
  return { content: [{ type: "text", text: lines.join(`
@@ -13880,7 +13922,12 @@ ${unused.map((n) => ` \u2514\u2500\u2500 ${n}`).join(`
13880
13922
  }
13881
13923
  } catch (error2) {
13882
13924
  return {
13883
- content: [{ type: "text", text: `Error: ${error2 instanceof Error ? error2.message : String(error2)}` }],
13925
+ content: [
13926
+ {
13927
+ type: "text",
13928
+ text: `Error: ${error2 instanceof Error ? error2.message : String(error2)}`
13929
+ }
13930
+ ],
13884
13931
  isError: true
13885
13932
  };
13886
13933
  }
@@ -13899,7 +13946,7 @@ async function main() {
13899
13946
  });
13900
13947
  const transport = new StdioServerTransport;
13901
13948
  await server.connect(transport);
13902
- console.error("[MCP] @mcp/dependency-graph server running on stdio");
13949
+ console.error("[MCP] @ebowwa/dependency-graph-mcp server running on stdio");
13903
13950
  process.stdin.resume();
13904
13951
  }
13905
13952
  main().catch((error2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebowwa/dependency-graph-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "MCP server for dependency graph analysis and visualization in monorepos",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -14,6 +14,7 @@
14
14
  "mcp-dev": "MCP_DEV=true bun run src/index.ts"
15
15
  },
16
16
  "dependencies": {
17
+ "@ebowwa/dependency-graph": "^1.0.0",
17
18
  "@modelcontextprotocol/sdk": "^1.0.4",
18
19
  "zod": "^3.24.1"
19
20
  },