Skip to content

feat(transport): add STDIO transport support #18

@CalvinAllen

Description

@CalvinAllen

Epic: STDIO Transport Support

Add STDIO transport support alongside existing HTTP/SSE, allowing Claude Desktop to spawn the MCP server directly.

Summary

The architecture inverts the pipe relationship: in STDIO mode, Server.exe becomes the pipe server and VS Extension connects as a client.

Key constraint: Per-user installation is retained (no admin required), so STDIO mode requires VS to already be running with the extension loaded.

Architecture

Aspect HTTP/SSE (Current) STDIO (New)
Who spawns Server.exe VS Extension Claude Desktop
Pipe server VS Extension Server.exe
Pipe client Server.exe VS Extension
MCP transport HTTP on port 5050 stdin/stdout
VS requirement Spawns with server Must be running first

STDIO Flow

  1. User opens Visual Studio (extension loads, watches for STDIO pipes)
  2. Claude Desktop spawns Server.exe --transport stdio
  3. Server.exe creates named pipe server (vsmcp-stdio)
  4. VS Extension detects pipe, connects as client
  5. Server.exe communicates with Claude via STDIO

Sub-Issues

Phase 1: Shared

Phase 2: Server Changes

Phase 3: Extension Changes

Phase 4: Documentation

Dependencies

#19 (Constants) ─┬─► #20 (Server RpcServer) ─► #21 (Program.cs)
                 │
                 └─► #22 (Extension RpcClient) ─► #23 (PipeWatcher) ─► #24 (Package) ─► #25 (Commands)
                                                                                              │
                                                                                              ▼
                                                                                        #26 (Docs)

Claude Desktop Configuration

{
  "mcpServers": {
    "visual-studio": {
      "command": "path/to/CodingWithCalvin.MCPServer.Server.exe",
      "args": ["--transport", "stdio"]
    }
  }
}

Note: User must have Visual Studio open with the MCP Server extension loaded before starting Claude Desktop.

Acceptance Criteria

  • STDIO transport works when VS is already open
  • HTTP/SSE mode unchanged and fully functional
  • Clear error messages when VS is not running
  • Mode conflict handling (HTTP takes priority)
  • Documentation updated

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions