Skip to content

feat(server): add RpcServer for STDIO pipe server mode #20

@CalvinAllen

Description

@CalvinAllen

Parent Epic

Part of #18 - STDIO Transport Support

Description

Create a new RpcServer class in the Server project that acts as a named pipe SERVER (inverse of existing RpcClient which is a pipe client).

Implementation

New File: src/CodingWithCalvin.MCPServer.Server/RpcServer.cs

  • Mirror of existing RpcClient pattern but as NamedPipeServerStream
  • WaitForConnectionAsync with configurable timeout (default 60s)
  • Implements IServerRpc (for VS to call)
  • Creates proxy to IVisualStudioRpc (to call VS)
  • Handles connection/disconnection lifecycle

Key Methods

  • StartAsync(string pipeName) - Create pipe server and start waiting
  • WaitForConnectionAsync(TimeSpan timeout) - Block until VS connects or timeout
  • Proxy implementations for all IVisualStudioRpc methods

Reference

Use src/CodingWithCalvin.MCPServer.Server/RpcClient.cs as pattern reference (invert server/client relationship).

Acceptance Criteria

  • RpcServer class created
  • Named pipe server functionality working
  • Connection timeout handling
  • Proper cleanup on dispose

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions