typegraph-mcp 0.9.24 → 0.9.26

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/cli.ts CHANGED
@@ -57,7 +57,6 @@ const AGENTS: Record<AgentId, AgentDef> = {
57
57
  name: "Claude Code",
58
58
  pluginFiles: [
59
59
  ".claude-plugin/plugin.json",
60
- ".mcp.json",
61
60
  "hooks/hooks.json",
62
61
  "scripts/ensure-deps.sh",
63
62
  "commands/check.md",
@@ -545,6 +544,26 @@ async function setup(yes: boolean): Promise<void> {
545
544
  }
546
545
  }
547
546
 
547
+ // Generate .mcp.json for Claude Code plugin discovery
548
+ if (selectedAgents.includes("claude-code")) {
549
+ const mcpConfig = {
550
+ mcpServers: {
551
+ typegraph: {
552
+ command: "npx",
553
+ args: ["tsx", "${CLAUDE_PLUGIN_ROOT}/server.ts"],
554
+ env: {
555
+ TYPEGRAPH_PROJECT_ROOT: ".",
556
+ TYPEGRAPH_TSCONFIG: "./tsconfig.json",
557
+ },
558
+ },
559
+ },
560
+ };
561
+ const mcpPath = path.join(targetDir, ".mcp.json");
562
+ fs.mkdirSync(path.dirname(mcpPath), { recursive: true });
563
+ fs.writeFileSync(mcpPath, JSON.stringify(mcpConfig, null, 2) + "\n");
564
+ copied++;
565
+ }
566
+
548
567
  s.message("Installing dependencies...");
549
568
  try {
550
569
  execSync("npm install", { cwd: targetDir, stdio: "pipe" });
package/dist/cli.js CHANGED
@@ -2813,7 +2813,6 @@ var AGENTS = {
2813
2813
  name: "Claude Code",
2814
2814
  pluginFiles: [
2815
2815
  ".claude-plugin/plugin.json",
2816
- ".mcp.json",
2817
2816
  "hooks/hooks.json",
2818
2817
  "scripts/ensure-deps.sh",
2819
2818
  "commands/check.md",
@@ -3188,6 +3187,24 @@ async function setup(yes2) {
3188
3187
  p.log.warn(`Source file not found: ${file}`);
3189
3188
  }
3190
3189
  }
3190
+ if (selectedAgents.includes("claude-code")) {
3191
+ const mcpConfig = {
3192
+ mcpServers: {
3193
+ typegraph: {
3194
+ command: "npx",
3195
+ args: ["tsx", "${CLAUDE_PLUGIN_ROOT}/server.ts"],
3196
+ env: {
3197
+ TYPEGRAPH_PROJECT_ROOT: ".",
3198
+ TYPEGRAPH_TSCONFIG: "./tsconfig.json"
3199
+ }
3200
+ }
3201
+ }
3202
+ };
3203
+ const mcpPath = path9.join(targetDir, ".mcp.json");
3204
+ fs8.mkdirSync(path9.dirname(mcpPath), { recursive: true });
3205
+ fs8.writeFileSync(mcpPath, JSON.stringify(mcpConfig, null, 2) + "\n");
3206
+ copied++;
3207
+ }
3191
3208
  s.message("Installing dependencies...");
3192
3209
  try {
3193
3210
  execSync2("npm install", { cwd: targetDir, stdio: "pipe" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typegraph-mcp",
3
- "version": "0.9.24",
3
+ "version": "0.9.26",
4
4
  "description": "Type-aware codebase navigation for AI coding agents — 14 MCP tools powered by tsserver + oxc",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: code-exploration
3
+ description: Efficiently explore unfamiliar TypeScript code using navigation tools instead of reading entire files. Trigger when asking how something works, exploring a new module, understanding architecture, or tracing request flows.
4
+ ---
5
+
1
6
  # Code Exploration Workflow
2
7
 
3
8
  Efficiently explore unfamiliar TypeScript code using navigation tools instead of reading entire files.
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: dependency-audit
3
+ description: Audit module dependencies to find circular imports, analyze coupling, and understand dependency structure. Trigger when asking about circular deps, module structure, package coupling, or evaluating module boundaries.
4
+ ---
5
+
1
6
  # Dependency Audit Workflow
2
7
 
3
8
  Audit module dependencies to find circular imports, analyze coupling, and understand the dependency structure.
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: impact-analysis
3
+ description: Analyze the impact of changing a TypeScript symbol by combining blast radius, dependents, and module boundary analysis. Trigger when asking what will break, assessing change risk, or before modifying widely-used symbols.
4
+ ---
5
+
1
6
  # Impact Analysis Workflow
2
7
 
3
8
  Analyze the impact of changing a TypeScript symbol by combining blast radius, dependents, and module boundary analysis.
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: refactor-safety
3
+ description: Verify a refactor is safe before making changes. Trigger when renaming, moving, or restructuring TypeScript modules, extracting code into new modules, or changing interfaces and service definitions.
4
+ ---
5
+
1
6
  # Refactor Safety Check Workflow
2
7
 
3
8
  Verify a refactor is safe before making changes by checking call chains, circular dependencies, and module boundaries.
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: tool-selection
3
+ description: Select the right typegraph-mcp tool for TypeScript navigation. Trigger when finding definitions, references, types, exploring code structure, preparing refactors, or any task where you would otherwise use grep/glob for TypeScript symbols.
4
+ ---
5
+
1
6
  # TypeGraph Tool Selection Guide
2
7
 
3
8
  Select the right typegraph-mcp tool for the task at hand. These tools provide type-aware TypeScript navigation — use them instead of grep/glob for any TypeScript codebase navigation.
package/.mcp.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "typegraph": {
3
- "command": "npx",
4
- "args": ["tsx", "${CLAUDE_PLUGIN_ROOT}/server.ts"],
5
- "env": {
6
- "TYPEGRAPH_PROJECT_ROOT": ".",
7
- "TYPEGRAPH_TSCONFIG": "./tsconfig.json"
8
- }
9
- }
10
- }