debugger-mcp-server 0.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.
Files changed (84) hide show
  1. package/CLAUDE.md +73 -0
  2. package/README.md +108 -0
  3. package/dist/bridge/bridgeClient.d.ts +5 -0
  4. package/dist/bridge/bridgeClient.js +33 -0
  5. package/dist/bridge/bridgeClient.js.map +1 -0
  6. package/dist/bridge/bridgeTypes.d.ts +61 -0
  7. package/dist/bridge/bridgeTypes.js +2 -0
  8. package/dist/bridge/bridgeTypes.js.map +1 -0
  9. package/dist/bridge/connectionManager.d.ts +2 -0
  10. package/dist/bridge/connectionManager.js +67 -0
  11. package/dist/bridge/connectionManager.js.map +1 -0
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.js +8 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/server.d.ts +2 -0
  16. package/dist/server.js +124 -0
  17. package/dist/server.js.map +1 -0
  18. package/dist/tools/analysis/analyzeCode.d.ts +4 -0
  19. package/dist/tools/analysis/analyzeCode.js +26 -0
  20. package/dist/tools/analysis/analyzeCode.js.map +1 -0
  21. package/dist/tools/breakpoints/listBreakpoints.d.ts +4 -0
  22. package/dist/tools/breakpoints/listBreakpoints.js +16 -0
  23. package/dist/tools/breakpoints/listBreakpoints.js.map +1 -0
  24. package/dist/tools/breakpoints/removeBreakpoints.d.ts +4 -0
  25. package/dist/tools/breakpoints/removeBreakpoints.js +22 -0
  26. package/dist/tools/breakpoints/removeBreakpoints.js.map +1 -0
  27. package/dist/tools/breakpoints/setBreakpoints.d.ts +4 -0
  28. package/dist/tools/breakpoints/setBreakpoints.js +29 -0
  29. package/dist/tools/breakpoints/setBreakpoints.js.map +1 -0
  30. package/dist/tools/debugSession/continueExecution.d.ts +4 -0
  31. package/dist/tools/debugSession/continueExecution.js +24 -0
  32. package/dist/tools/debugSession/continueExecution.js.map +1 -0
  33. package/dist/tools/debugSession/evaluateExpression.d.ts +4 -0
  34. package/dist/tools/debugSession/evaluateExpression.js +28 -0
  35. package/dist/tools/debugSession/evaluateExpression.js.map +1 -0
  36. package/dist/tools/debugSession/getCallStack.d.ts +4 -0
  37. package/dist/tools/debugSession/getCallStack.js +24 -0
  38. package/dist/tools/debugSession/getCallStack.js.map +1 -0
  39. package/dist/tools/debugSession/getVariables.d.ts +4 -0
  40. package/dist/tools/debugSession/getVariables.js +26 -0
  41. package/dist/tools/debugSession/getVariables.js.map +1 -0
  42. package/dist/tools/debugSession/startDebugSession.d.ts +4 -0
  43. package/dist/tools/debugSession/startDebugSession.js +34 -0
  44. package/dist/tools/debugSession/startDebugSession.js.map +1 -0
  45. package/dist/tools/debugSession/stepInto.d.ts +4 -0
  46. package/dist/tools/debugSession/stepInto.js +24 -0
  47. package/dist/tools/debugSession/stepInto.js.map +1 -0
  48. package/dist/tools/debugSession/stepOut.d.ts +4 -0
  49. package/dist/tools/debugSession/stepOut.js +24 -0
  50. package/dist/tools/debugSession/stepOut.js.map +1 -0
  51. package/dist/tools/debugSession/stepOver.d.ts +4 -0
  52. package/dist/tools/debugSession/stepOver.js +24 -0
  53. package/dist/tools/debugSession/stepOver.js.map +1 -0
  54. package/dist/tools/debugSession/stopDebugSession.d.ts +4 -0
  55. package/dist/tools/debugSession/stopDebugSession.js +22 -0
  56. package/dist/tools/debugSession/stopDebugSession.js.map +1 -0
  57. package/dist/tools/toolRegistry.d.ts +4 -0
  58. package/dist/tools/toolRegistry.js +29 -0
  59. package/dist/tools/toolRegistry.js.map +1 -0
  60. package/dist/tools/toolTypes.d.ts +6 -0
  61. package/dist/tools/toolTypes.js +8 -0
  62. package/dist/tools/toolTypes.js.map +1 -0
  63. package/package.json +23 -0
  64. package/src/bridge/bridgeClient.ts +40 -0
  65. package/src/bridge/bridgeTypes.ts +70 -0
  66. package/src/bridge/connectionManager.ts +82 -0
  67. package/src/index.ts +10 -0
  68. package/src/server.ts +143 -0
  69. package/src/tools/analysis/analyzeCode.ts +33 -0
  70. package/src/tools/breakpoints/listBreakpoints.ts +23 -0
  71. package/src/tools/breakpoints/removeBreakpoints.ts +28 -0
  72. package/src/tools/breakpoints/setBreakpoints.ts +37 -0
  73. package/src/tools/debugSession/continueExecution.ts +30 -0
  74. package/src/tools/debugSession/evaluateExpression.ts +34 -0
  75. package/src/tools/debugSession/getCallStack.ts +30 -0
  76. package/src/tools/debugSession/getVariables.ts +32 -0
  77. package/src/tools/debugSession/startDebugSession.ts +40 -0
  78. package/src/tools/debugSession/stepInto.ts +30 -0
  79. package/src/tools/debugSession/stepOut.ts +30 -0
  80. package/src/tools/debugSession/stepOver.ts +30 -0
  81. package/src/tools/debugSession/stopDebugSession.ts +28 -0
  82. package/src/tools/toolRegistry.ts +30 -0
  83. package/src/tools/toolTypes.ts +8 -0
  84. package/tsconfig.json +17 -0
package/CLAUDE.md ADDED
@@ -0,0 +1,73 @@
1
+
2
+ ## Frontend
3
+ ### JSX Elements
4
+ - Always use `<div>` and `<span>`, never semantic HTML (`<p>`, `<h1>`, etc.). This prevents style inheritance issues.
5
+
6
+ ### Styling
7
+ - Tailwind classes only - no inline styles or style objects
8
+ - No negative margins allowed
9
+ - Use spacing/gap on parent instead of margins on child throughout.
10
+ - Spacing: multiples of 2 (gap-2, gap-4, p-4, m-8)
11
+ - Remove redundant responsive breakpoints
12
+ - avoid not-null assertions.
13
+
14
+ ```tsx
15
+ // Good
16
+ <div className="flex gap-4">
17
+ <Child1 />
18
+ <Child2 />
19
+ </div>
20
+
21
+ // Bad
22
+ <div className="flex" style={{ gap: '12px' }}>
23
+ <Child1 className="mr-3" />
24
+ </div>
25
+ ```
26
+
27
+ ### Component Patterns
28
+ - Extract repeated JSX into components
29
+ - Inline conditional placeholders to avoid duplicate wrappers
30
+ - Use ternary operators for conditionals, rather than `&&`
31
+
32
+ ### Props & Constants
33
+ - Remove unused props
34
+ - Use constants for magic values that need explanation
35
+ - Add `TODO(cleanup):` for temporary code
36
+
37
+ ## General
38
+ ### Structure
39
+ - Do not ever create your own function if it already exists in the codebase!
40
+ - To get the owner of a meeting, use join of usermeetings and Meeting. Prefer this to using creatorId
41
+ - Avoid unnecessary comments. Only add them where absolutely necessary.
42
+ - All types that are not schemas or derived from schemas should be in `types/src/email.ts`
43
+
44
+ ### TypeScript
45
+ - We should avoid .then and .catch. Consider using try/catch instead.
46
+ - It is generally considered a bad pattern to cast types. Avoid unless necessary.
47
+ - Always use named params, instead of positional arguments
48
+ - Avoid non null assertions, i.e: `const transcript = meeting.transcript!`. Instead, cast always like so: ` const transcript = meeting.transcript as NonNullable<typeof meeting.transcript>`
49
+ - If we need to export the type, they should be in the types package.
50
+ - Don't use`let` in the code base. Prefer const always.
51
+ - Explicit nullable types: `value?: number | null`
52
+ - Array syntax: `items: Item[]` not `Array<Item>`
53
+ - Array checks: `arr.length === 0` not `!arr`
54
+ - Avoid mutations
55
+ - Do not await the prisma db calls
56
+ - Use strong types where possible, i.e. Array\<MeetingWithForeignProperties\>
57
+ - null is when you asked the db and nothing was returned, whereas undefined is user level, such as when you get the
58
+ - We usually don't have fetch inside a component. We use a helper for this.
59
+
60
+ ### Naming
61
+ - Use complete variable names, i.e. do `averageWordsPerMinute` instead of `averageWpm`
62
+ - Complete sentence errors/comments/logs.
63
+ - Booleans: `isOpen`, `hasData`, `shouldShow` (not `showModal`)
64
+ - Parameters: descriptive (`specificUserId` not `userId`)
65
+ - Types: match UI terminology
66
+ - When logging, everything should be a sentence (end with a period)
67
+
68
+ ### Functional Programming
69
+ - Use `Array.from()`, `.map()`, `.reduce()` instead of for-loops
70
+ - Use utility functions: `getPluralSuffix()`, `.toLocaleString()`
71
+
72
+ ### Lodash
73
+ - Use lodash where applicable. For example, the mean utility, and sum
package/README.md ADDED
@@ -0,0 +1,108 @@
1
+ # debugger-mcp-server
2
+
3
+ An MCP server that enables AI agents to debug code in VS Code. It exposes debugging tools (breakpoints, stepping, variable inspection) over the [Model Context Protocol](https://modelcontextprotocol.io), bridging to a companion VS Code extension that controls the actual debugger.
4
+
5
+ ## Architecture
6
+
7
+ ```
8
+ AI Agent <--> MCP Server (:6090) <--> VS Code Extension Bridge (:7070) <--> VS Code Debugger
9
+ (this repo) (agentic-debugger extension)
10
+ ```
11
+
12
+ The two components communicate over HTTP. The extension writes its port to `~/.agentic-debugger/bridge-port`, which the MCP server reads to discover the bridge automatically.
13
+
14
+ ## Prerequisites
15
+
16
+ - Node.js >= 18
17
+ - VS Code
18
+
19
+ ## Setup
20
+
21
+ ### 1. Install the VS Code Extension
22
+
23
+ The **agentic-debugger** extension runs a bridge server inside VS Code that the MCP server talks to.
24
+
25
+ ```bash
26
+ cd agentic-debugger
27
+ npm install
28
+ ```
29
+
30
+ To run it in development mode, open the `agentic-debugger` folder in VS Code and press **F5** (or use **Run > Start Debugging**). This launches a new Extension Development Host window with the extension loaded.
31
+
32
+ The extension's launch configurations are in `.vscode/launch.json`:
33
+ - **Run Extension** — compiles with webpack in watch mode, then launches
34
+ - **Run Extension (No Watch)** — compiles once, then launches
35
+
36
+ Once active, the extension starts its bridge server on port **7070** (configurable via `agenticDebugger.bridgePort` in VS Code settings). If that port is taken, it falls back to an OS-assigned port. Either way, it writes the actual port to `~/.agentic-debugger/bridge-port`.
37
+
38
+ #### Extension Settings
39
+
40
+ | Setting | Default | Description |
41
+ |---|---|---|
42
+ | `agenticDebugger.bridgePort` | `7070` | Port for the bridge HTTP server |
43
+ | `agenticDebugger.anthropicApiKey` | `""` | Anthropic API key (for the built-in "Set Breakpoints" command) |
44
+ | `agenticDebugger.clearExistingBreakpoints` | `false` | Clear existing breakpoints before setting new ones |
45
+
46
+ ### 2. Start the MCP Server
47
+
48
+ ```bash
49
+ cd debugger-mcp-server
50
+ npm install
51
+ npm run build
52
+ ```
53
+
54
+ Run it:
55
+
56
+ ```bash
57
+ # Production (requires build first)
58
+ npm start
59
+
60
+ # Development (with hot reload via tsx)
61
+ npm run dev
62
+ ```
63
+
64
+ The server starts on port **6090** by default. Override with the `PORT` environment variable:
65
+
66
+ ```bash
67
+ PORT=8080 npm start
68
+ ```
69
+
70
+ ### 3. Connect Your AI Agent
71
+
72
+ The MCP server uses **Streamable HTTP** transport at the `/mcp` endpoint.
73
+
74
+ Add this to your MCP client configuration (e.g. Claude Desktop, Claude Code, Cursor):
75
+
76
+ ```json
77
+ {
78
+ "mcpServers": {
79
+ "debugger": {
80
+ "url": "http://localhost:6090/mcp"
81
+ }
82
+ }
83
+ }
84
+ ```
85
+
86
+ ## Verifying the Setup
87
+
88
+ 1. The extension is running when you see `Agentic Debugger: Bridge server listening on 127.0.0.1:7070.` in the VS Code **Output** panel (Extension Host log).
89
+ 2. The MCP server is running when you see `Debugger MCP server running on port 6090.` in your terminal.
90
+ 3. The MCP server finds the extension automatically via the port file at `~/.agentic-debugger/bridge-port`.
91
+
92
+ ## Available Tools
93
+
94
+ | Category | Tool | Description |
95
+ |---|---|---|
96
+ | Analysis | `analyzeCode` | Analyze code with the VS Code language server |
97
+ | Breakpoints | `setBreakpoints` | Set breakpoints in a file |
98
+ | Breakpoints | `removeBreakpoints` | Remove breakpoints |
99
+ | Breakpoints | `listBreakpoints` | List all active breakpoints |
100
+ | Debug Session | `startDebugSession` | Launch a debug session |
101
+ | Debug Session | `stopDebugSession` | Stop the active debug session |
102
+ | Debug Session | `stepOver` | Step over the current line |
103
+ | Debug Session | `stepInto` | Step into a function call |
104
+ | Debug Session | `stepOut` | Step out of the current function |
105
+ | Debug Session | `continueExecution` | Continue execution to next breakpoint |
106
+ | Debug Session | `getVariables` | Inspect variables in current scope |
107
+ | Debug Session | `getCallStack` | View the call stack |
108
+ | Debug Session | `evaluateExpression` | Evaluate an expression in the debug context |
@@ -0,0 +1,5 @@
1
+ export declare const sendBridgeCommand: <T>(params: {
2
+ command: string;
3
+ args?: Record<string, unknown>;
4
+ timeoutMs?: number;
5
+ }) => Promise<T>;
@@ -0,0 +1,33 @@
1
+ import { getBridgeUrl, invalidateCache } from "./connectionManager.js";
2
+ const DEFAULT_TIMEOUT_MS = 30000;
3
+ export const sendBridgeCommand = async (params) => {
4
+ const { command, args = {}, timeoutMs = DEFAULT_TIMEOUT_MS } = params;
5
+ const bridgeUrl = await getBridgeUrl();
6
+ const controller = new AbortController();
7
+ const timeout = setTimeout(() => controller.abort(), timeoutMs);
8
+ try {
9
+ const response = await fetch(`${bridgeUrl}/api/${command}`, {
10
+ method: "POST",
11
+ headers: { "Content-Type": "application/json" },
12
+ body: JSON.stringify(args),
13
+ signal: controller.signal,
14
+ });
15
+ if (!response.ok) {
16
+ const errorBody = await response.text();
17
+ invalidateCache();
18
+ throw new Error(`Bridge command "${command}" failed (${response.status}): ${errorBody}`);
19
+ }
20
+ return (await response.json());
21
+ }
22
+ catch (error) {
23
+ if (error instanceof Error && error.name === "AbortError") {
24
+ invalidateCache();
25
+ throw new Error(`Bridge command "${command}" timed out after ${timeoutMs}ms.`);
26
+ }
27
+ throw error;
28
+ }
29
+ finally {
30
+ clearTimeout(timeout);
31
+ }
32
+ };
33
+ //# sourceMappingURL=bridgeClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridgeClient.js","sourceRoot":"","sources":["../../src/bridge/bridgeClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEvE,MAAM,kBAAkB,GAAG,KAAK,CAAC;AAEjC,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EAAK,MAI1C,EAAc,EAAE;IACf,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,EAAE,SAAS,GAAG,kBAAkB,EAAE,GAAG,MAAM,CAAC;IAEtE,MAAM,SAAS,GAAG,MAAM,YAAY,EAAE,CAAC;IACvC,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,SAAS,CAAC,CAAC;IAEhE,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,SAAS,QAAQ,OAAO,EAAE,EAAE;YAC1D,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YAC1B,MAAM,EAAE,UAAU,CAAC,MAAM;SAC1B,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACxC,eAAe,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,aAAa,QAAQ,CAAC,MAAM,MAAM,SAAS,EAAE,CAAC,CAAC;QAC3F,CAAC;QAED,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAM,CAAC;IACtC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;YAC1D,eAAe,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,qBAAqB,SAAS,KAAK,CAAC,CAAC;QACjF,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;YAAS,CAAC;QACT,YAAY,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,61 @@
1
+ export interface BridgeHealthResponse {
2
+ status: "ok";
3
+ extensionVersion: string;
4
+ }
5
+ export interface BreakpointLocation {
6
+ filePath: string;
7
+ lineNumber: number;
8
+ condition?: string;
9
+ logMessage?: string;
10
+ }
11
+ export interface BreakpointInfo {
12
+ id: string;
13
+ enabled: boolean;
14
+ location?: {
15
+ filePath: string;
16
+ lineNumber: number;
17
+ };
18
+ condition?: string;
19
+ hitCondition?: string;
20
+ logMessage?: string;
21
+ }
22
+ export interface SetBreakpointsResponse {
23
+ successCount: number;
24
+ failedPaths: string[];
25
+ }
26
+ export interface RemoveBreakpointsResponse {
27
+ removedCount: number;
28
+ }
29
+ export interface ListBreakpointsResponse {
30
+ breakpoints: BreakpointInfo[];
31
+ }
32
+ export interface AnalyzeCodeResponse {
33
+ locations: Array<{
34
+ filePath: string;
35
+ lineNumber: number;
36
+ codeSnippet: string;
37
+ reason: string;
38
+ }>;
39
+ summary: string;
40
+ }
41
+ export interface StartDebugSessionResponse {
42
+ sessionId: string;
43
+ name: string;
44
+ }
45
+ export interface StopDebugSessionResponse {
46
+ stopped: boolean;
47
+ }
48
+ export interface StepResponse {
49
+ success: boolean;
50
+ }
51
+ export interface GetVariablesResponse {
52
+ variables: unknown[];
53
+ }
54
+ export interface GetCallStackResponse {
55
+ stackFrames: unknown[];
56
+ }
57
+ export interface EvaluateExpressionResponse {
58
+ result: string;
59
+ type?: string;
60
+ variablesReference?: number;
61
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=bridgeTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridgeTypes.js","sourceRoot":"","sources":["../../src/bridge/bridgeTypes.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare const getBridgeUrl: () => Promise<string>;
2
+ export declare const invalidateCache: () => void;
@@ -0,0 +1,67 @@
1
+ import { readFileSync } from "fs";
2
+ import { join } from "path";
3
+ import { homedir } from "os";
4
+ const PORT_FILE_PATH = join(homedir(), ".agentic-debugger", "bridge-port");
5
+ const HEALTH_TIMEOUT_MS = 5000;
6
+ const cache = { bridgeUrl: null };
7
+ const readPortFile = () => {
8
+ try {
9
+ const content = readFileSync(PORT_FILE_PATH, "utf-8").trim();
10
+ const port = parseInt(content, 10);
11
+ if (isNaN(port) || port <= 0 || port > 65535) {
12
+ throw new Error("Invalid port number in bridge port file.");
13
+ }
14
+ return port;
15
+ }
16
+ catch (error) {
17
+ if (error instanceof Error && error.message.includes("Invalid port")) {
18
+ throw error;
19
+ }
20
+ throw new Error("Bridge port file not found. Make sure VS Code is open with the Agentic Debugger extension installed.");
21
+ }
22
+ };
23
+ const checkHealth = async (params) => {
24
+ const { url } = params;
25
+ try {
26
+ const controller = new AbortController();
27
+ const timeout = setTimeout(() => controller.abort(), HEALTH_TIMEOUT_MS);
28
+ try {
29
+ const response = await fetch(`${url}/api/health`, {
30
+ method: "GET",
31
+ signal: controller.signal,
32
+ });
33
+ if (!response.ok) {
34
+ return false;
35
+ }
36
+ const data = (await response.json());
37
+ return data.status === "ok";
38
+ }
39
+ finally {
40
+ clearTimeout(timeout);
41
+ }
42
+ }
43
+ catch {
44
+ return false;
45
+ }
46
+ };
47
+ export const getBridgeUrl = async () => {
48
+ if (cache.bridgeUrl !== null) {
49
+ const isHealthy = await checkHealth({ url: cache.bridgeUrl });
50
+ if (isHealthy) {
51
+ return cache.bridgeUrl;
52
+ }
53
+ cache.bridgeUrl = null;
54
+ }
55
+ const port = readPortFile();
56
+ const url = `http://127.0.0.1:${port}`;
57
+ const isHealthy = await checkHealth({ url });
58
+ if (!isHealthy) {
59
+ throw new Error("VS Code extension bridge is not responding. Make sure VS Code is open with the Agentic Debugger extension installed.");
60
+ }
61
+ cache.bridgeUrl = url;
62
+ return url;
63
+ };
64
+ export const invalidateCache = () => {
65
+ cache.bridgeUrl = null;
66
+ };
67
+ //# sourceMappingURL=connectionManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectionManager.js","sourceRoot":"","sources":["../../src/bridge/connectionManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAG7B,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,mBAAmB,EAAE,aAAa,CAAC,CAAC;AAC3E,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAG/B,MAAM,KAAK,GAA6B,EA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M,QAAQ,CAAC,IAAI,EAAE,CAAyB,CAAC;YAC7D,OAAO,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC;QAC9B,CAAC;gBAAS,CAAC;YACT,YAAY,CAAC,OAAO,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,IAAqB,EAAE;IACtD,IAAI,KAAK,CAAC,SAAS,KAAK,IAAI,EAAE,CAAC;QAC7B,MAAM,SAAS,GAAG,MAAM,WAAW,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;QAC9D,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,KAAK,CAAC,SAAS,CAAC;QACzB,CAAC;QACD,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IACzB,CAAC;IAED,MAAM,IAAI,GAAG,YAAY,EAAE,CAAC;IAC5B,MAAM,GAAG,GAAG,oBAAoB,IAAI,EAAE,CAAC;IACvC,MAAM,SAAS,GAAG,MAAM,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IAE7C,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,sHAAsH,CACvH,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC;IACtB,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAS,EAAE;IACxC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;AACzB,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ import { createApp } from "./server.js";
2
+ const DEFAULT_PORT = 6090;
3
+ const PORT = parseInt(process.env["PORT"] ?? String(DEFAULT_PORT), 10);
4
+ const app = createApp();
5
+ app.listen(PORT, () => {
6
+ console.log(`Debugger MCP server running on port ${PORT}.`);
7
+ });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,YAAY,GAAG,IAAI,CAAC;AAC1B,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC;AAEvE,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;AAExB,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;IACpB,OAAO,CAAC,GAAG,CAAC,uCAAuC,IAAI,GAAG,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import express from "express";
2
+ export declare const createApp: () => express.Express;
package/dist/server.js ADDED
@@ -0,0 +1,124 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
3
+ import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
4
+ import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
5
+ import { randomUUID } from "crypto";
6
+ import express from "express";
7
+ import { registerAllTools } from "./tools/toolRegistry.js";
8
+ const createConnectedServer = () => {
9
+ const server = new McpServer({
10
+ name: "debugger-mcp-server",
11
+ version: "0.1.0",
12
+ });
13
+ registerAllTools({ server });
14
+ return server;
15
+ };
16
+ export const createApp = () => {
17
+ const app = express();
18
+ app.use(express.json());
19
+ const transports = new Map();
20
+ // ==========================================================================
21
+ // Streamable HTTP transport (protocol version 2025-11-25)
22
+ // ==========================================================================
23
+ app.post("/mcp", async (req, res) => {
24
+ const sessionId = req.headers["mcp-session-id"];
25
+ if (sessionId !== undefined && transports.has(sessionId)) {
26
+ const existingTransport = transports.get(sessionId);
27
+ if (existingTransport instanceof SSEServerTransport) {
28
+ res.status(400).json({
29
+ jsonrpc: "2.0",
30
+ error: { code: -32000, message: "Session uses a different transport protocol." },
31
+ id: null,
32
+ });
33
+ return;
34
+ }
35
+ await existingTransport.handleRequest(req, res, req.body);
36
+ return;
37
+ }
38
+ if (isInitializeRequest(req.body)) {
39
+ const transport = new StreamableHTTPServerTransport({
40
+ sessionIdGenerator: () => randomUUID(),
41
+ onsessioninitialized: (newSessionId) => {
42
+ transports.set(newSessionId, transport);
43
+ },
44
+ });
45
+ transport.onclose = () => {
46
+ const transportSessionId = transport.sessionId;
47
+ if (transportSessionId !== undefined) {
48
+ transports.delete(transportSessionId);
49
+ }
50
+ };
51
+ const server = createConnectedServer();
52
+ await server.connect(transport);
53
+ await transport.handleRequest(req, res, req.body);
54
+ return;
55
+ }
56
+ res.status(400).json({ error: "Invalid request. Missing session ID or not an initialize request." });
57
+ });
58
+ app.get("/mcp", async (req, res) => {
59
+ const sessionId = req.headers["mcp-session-id"];
60
+ if (sessionId !== undefined && transports.has(sessionId)) {
61
+ const existingTransport = transports.get(sessionId);
62
+ if (existingTransport instanceof SSEServerTransport) {
63
+ res.status(400).json({
64
+ jsonrpc: "2.0",
65
+ error: { code: -32000, message: "Session uses a different transport protocol." },
66
+ id: null,
67
+ });
68
+ return;
69
+ }
70
+ await existingTransport.handleRequest(req, res);
71
+ return;
72
+ }
73
+ res.status(400).json({ error: "Invalid session." });
74
+ });
75
+ app.delete("/mcp", async (req, res) => {
76
+ const sessionId = req.headers["mcp-session-id"];
77
+ if (sessionId !== undefined && transports.has(sessionId)) {
78
+ const existingTransport = transports.get(sessionId);
79
+ if (existingTransport instanceof SSEServerTransport) {
80
+ res.status(400).json({
81
+ jsonrpc: "2.0",
82
+ error: { code: -32000, message: "Session uses a different transport protocol." },
83
+ id: null,
84
+ });
85
+ return;
86
+ }
87
+ await existingTransport.handleRequest(req, res);
88
+ transports.delete(sessionId);
89
+ return;
90
+ }
91
+ res.status(400).json({ error: "Invalid session." });
92
+ });
93
+ // ==========================================================================
94
+ // Legacy SSE transport (protocol version 2024-11-05)
95
+ // ==========================================================================
96
+ app.get("/sse", async (_req, res) => {
97
+ const transport = new SSEServerTransport("/messages", res);
98
+ transports.set(transport.sessionId, transport);
99
+ res.on("close", () => {
100
+ transports.delete(transport.sessionId);
101
+ });
102
+ const server = createConnectedServer();
103
+ await server.connect(transport);
104
+ });
105
+ app.post("/messages", async (req, res) => {
106
+ const sessionId = req.query.sessionId;
107
+ if (sessionId === undefined) {
108
+ res.status(400).json({ error: "Missing sessionId query parameter." });
109
+ return;
110
+ }
111
+ const existingTransport = transports.get(sessionId);
112
+ if (!(existingTransport instanceof SSEServerTransport)) {
113
+ res.status(400).json({
114
+ jsonrpc: "2.0",
115
+ error: { code: -32000, message: "No SSE transport found for this session." },
116
+ id: null,
117
+ });
118
+ return;
119
+ }
120
+ await existingTransport.handlePostMessage(req, res, req.body);
121
+ });
122
+ return app;
123
+ };
124
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,qBAAqB,GAAG,GAAc,EAAE;IAC5C,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,IAAI,EAAE,qBAAqB;QAC3B,OAAO,EAAE,OAAO;K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;IAEH,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare const registerAnalyzeCodeTool: (params: {
3
+ server: McpServer;
4
+ }) => void;
@@ -0,0 +1,26 @@
1
+ import { z } from "zod";
2
+ import { sendBridgeCommand } from "../../bridge/bridgeClient.js";
3
+ import { formatToolResult, formatErrorResult } from "../toolTypes.js";
4
+ const ANALYZE_CODE_TIMEOUT_MS = 120000;
5
+ export const registerAnalyzeCodeTool = (params) => {
6
+ params.server.tool("analyze_code", "Analyze codebase to find relevant code locations for debugging a feature. Uses AI to explore and identify entry points, core logic, and key functions.", {
7
+ featureDescription: z.string().describe("Description of the feature or code area to analyze"),
8
+ workspacePath: z.string().describe("Absolute path to the workspace root"),
9
+ }, async (args) => {
10
+ try {
11
+ const result = await sendBridgeCommand({
12
+ command: "analyzeCode",
13
+ args: {
14
+ featureDescription: args.featureDescription,
15
+ workspacePath: args.workspacePath,
16
+ },
17
+ timeoutMs: ANALYZE_CODE_TIMEOUT_MS,
18
+ });
19
+ return { content: [{ type: "text", text: formatToolResult({ data: result }) }] };
20
+ }
21
+ catch (error) {
22
+ return { content: [{ type: "text", text: formatErrorResult({ error }) }], isError: true };
23
+ }
24
+ });
25
+ };
26
+ //# sourceMappingURL=analyzeCode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyzeCode.js","sourceRoot":"","sources":["../../../src/tools/analysis/analyzeCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGtE,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAEvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,MAA6B,EAAQ,EAAE;IAC7E,MAAM,CAAC,MAAM,CAAC,IAAI,CAChB,cAAc,EACd,wJAAwJ,EACxJ;QACE,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;QAC7F,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;KAC1E,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAsB;gBAC1D,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE;oBACJ,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;oBAC3C,aAAa,EAAE,IAAI,CAAC,aAAa;iBAClC;gBACD,SAAS,EAAE,uBAAuB;aACnC,CAAC,CAAC;YACH,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,gBAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QAC5F,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,iBAAiB,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QACrG,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare const registerListBreakpointsTool: (params: {
3
+ server: McpServer;
4
+ }) => void;
@@ -0,0 +1,16 @@
1
+ import { sendBridgeCommand } from "../../bridge/bridgeClient.js";
2
+ import { formatToolResult, formatErrorResult } from "../toolTypes.js";
3
+ export const registerListBreakpointsTool = (params) => {
4
+ params.server.tool("list_breakpoints", "List all currently set breakpoints in VS Code with their locations and conditions.", {}, async () => {
5
+ try {
6
+ const result = await sendBridgeCommand({
7
+ command: "listBreakpoints",
8
+ });
9
+ return { content: [{ type: "text", text: formatToolResult({ data: result }) }] };
10
+ }
11
+ catch (error) {
12
+ return { content: [{ type: "text", text: formatErrorResult({ error }) }], isError: true };
13
+ }
14
+ });
15
+ };
16
+ //# sourceMappingURL=listBreakpoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listBreakpoints.js","sourceRoot":"","sources":["../../../src/tools/breakpoints/listBreakpoints.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGtE,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,MAA6B,EAAQ,EAAE;IACjF,MAAM,CAAC,MAAM,CAAC,IAAI,CAChB,kBAAkB,EAClB,oFAAoF,EACpF,EAAE,EACF,KAAK,IAAI,EAAE;QACT,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAA0B;gBAC9D,OAAO,EAAE,iBAAiB;aAC3B,CAAC,CAAC;YACH,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,gBAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QAC5F,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,iBAAiB,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QACrG,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare const registerRemoveBreakpointsTool: (params: {
3
+ server: McpServer;
4
+ }) => void;
@@ -0,0 +1,22 @@
1
+ import { z } from "zod";
2
+ import { sendBridgeCommand } from "../../bridge/bridgeClient.js";
3
+ import { formatToolResult, formatErrorResult } from "../toolTypes.js";
4
+ export const registerRemoveBreakpointsTool = (params) => {
5
+ params.server.tool("remove_breakpoints", "Remove breakpoints by their IDs. If no IDs provided, removes all breakpoints.", {
6
+ breakpointIds: z.array(z.string()).optional().describe("Specific breakpoint IDs to remove. Omit to remove all."),
7
+ }, async (args) => {
8
+ try {
9
+ const result = await sendBridgeCommand({
10
+ command: "removeBreakpoints",
11
+ args: {
12
+ breakpointIds: args.breakpointIds,
13
+ },
14
+ });
15
+ return { content: [{ type: "text", text: formatToolResult({ data: result }) }] };
16
+ }
17
+ catch (error) {
18
+ return { content: [{ type: "text", text: formatErrorResult({ error }) }], isError: true };
19
+ }
20
+ });
21
+ };
22
+ //# sourceMappingURL=removeBreakpoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"removeBreakpoints.js","sourceRoot":"","sources":["../../../src/tools/breakpoints/removeBreakpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGtE,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,MAA6B,EAAQ,EAAE;IACnF,MAAM,CAAC,MAAM,CAAC,IAAI,CAChB,oBAAoB,EACpB,+EAA+E,EAC/E;QACE,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;KACjH,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAA4B;gBAChE,OAAO,EAAE,mBAAmB;gBAC5B,IAAI,EAAE;oBACJ,aAAa,EAAE,IAAI,CAAC,aAAa;iBAClC;aACF,CAAC,CAAC;YACH,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,gBAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QAC5F,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,iBAAiB,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QACrG,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare const registerSetBreakpointsTool: (params: {
3
+ server: McpServer;
4
+ }) => void;