Skip to content

Commit e021997

Browse files
authored
Merge pull request #32 from microsoft/ozzafar/fix_dependabot_issues
Fix DependaBot issues
2 parents 608a3ed + a0684f7 commit e021997

6 files changed

Lines changed: 696 additions & 1391 deletions

File tree

AGENTS.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,9 @@ Include in each source file:
6161

6262
## Key Dependencies
6363

64-
- `fastmcp`: MCP server framework
64+
- `@modelcontextprotocol/sdk`: Official MCP server framework (`McpServer`, `SSEServerTransport`)
6565
- `zod`: Schema validation for tool parameters
66-
- `@modelcontextprotocol/sdk`: MCP protocol types
67-
- `express`: HTTP server (used by FastMCP)
66+
- `express`: HTTP server for SSE transport
6867

6968
## Entry Points
7069

docs/architecture/debugMCPServer.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,25 @@ The MCP server component that exposes VS Code debugging capabilities to AI agent
66

77
## Motivation
88

9-
AI coding agents need a standardized way to control debuggers programmatically. MCP provides this standard, and `DebugMCPServer` implements it using FastMCP with Server-Sent Events (SSE) transport for real-time bidirectional communication.
9+
AI coding agents need a standardized way to control debuggers programmatically. MCP provides this standard, and `DebugMCPServer` implements it using the official `@modelcontextprotocol/sdk` with Server-Sent Events (SSE) transport over an express HTTP server for real-time bidirectional communication.
1010

1111
## Responsibility
1212

13-
- Initialize and manage the FastMCP server lifecycle
13+
- Initialize and manage the MCP server lifecycle (using `McpServer` from `@modelcontextprotocol/sdk`)
1414
- Register debugging tools that AI agents can invoke
1515
- Register documentation resources for agent guidance
1616
- Delegate all debugging operations to `DebuggingHandler`
17-
- Handle SSE transport on configurable port (default: 3001)
17+
- Manage SSE transport connections via `SSEServerTransport` on configurable port (default: 3001)
1818

1919
## Architecture Position
2020

2121
```
2222
AI Agent (MCP Client)
2323
24-
▼ SSE Connection
24+
▼ SSE Connection (GET /sse + POST /messages)
2525
┌───────────────────┐
2626
│ DebugMCPServer │ ◄── You are here
27+
│ (express + SSE) │
2728
└───────────────────┘
2829
2930
▼ Delegates to
@@ -41,14 +42,18 @@ AI Agent (MCP Client)
4142

4243
### SSE Transport
4344

44-
Uses HTTP with Server-Sent Events for persistent connections. This allows the server to push updates to clients and maintain connection health via ping/keepalive.
45+
Uses HTTP with Server-Sent Events for persistent connections. The express server exposes two endpoints:
46+
- `GET /sse` — Establishes the SSE stream and creates a session
47+
- `POST /messages?sessionId=...` — Receives JSON-RPC messages from the client
48+
49+
Each client connection creates an `SSEServerTransport` instance that is connected to the `McpServer`. The server tracks active transports by session ID and cleans them up on disconnect.
4550

4651
## Key Code Locations
4752

4853
- Class definition: `src/debugMCPServer.ts`
49-
- Tool registration: `setupTools()` method
50-
- Resource registration: `setupResources()` method
51-
- Server startup: `start()` method
54+
- Tool registration: `setupTools()` method (uses `McpServer.registerTool()`)
55+
- Resource registration: `setupResources()` method (uses `McpServer.registerResource()`)
56+
- Server startup: `start()` method (creates express app with SSE/message routes)
5257

5358
## Exposed Tools
5459

@@ -75,4 +80,4 @@ Uses HTTP with Server-Sent Events for persistent connections. This allows the se
7580
## Configuration
7681

7782
- `debugmcp.serverPort`: Port number (default: 3001)
78-
- `debugmcp.timeoutInSeconds`: Operation timeout (default: 180)
83+
- `debugmcp.timeoutInSeconds`: Operation timeout (default: 180)

0 commit comments

Comments
 (0)