Parent Epic
Part of #18 - STDIO Transport Support
Description
Update ServerCommands to handle the new connection modes - disable HTTP commands when in STDIO mode.
Implementation
Modify: src/CodingWithCalvin.MCPServer/Commands/ServerCommands.cs
Command State Changes
private static void OnBeforeQueryStatusStart(object sender, EventArgs e)
{
if (sender is OleMenuCommand command)
{
// Disable Start when:
// - Already running HTTP server
// - In STDIO client mode (external server)
command.Enabled = MCPServerPackage.CurrentMode == ConnectionMode.None;
}
}
private static void OnBeforeQueryStatusStop(object sender, EventArgs e)
{
if (sender is OleMenuCommand command)
{
// Only enable Stop for HTTP mode (we control the server)
// STDIO mode server is controlled externally
command.Enabled = MCPServerPackage.CurrentMode == ConnectionMode.HttpServer
&& MCPServerPackage.ServerManager?.IsRunning == true;
}
}
Status Display
Update any status display to show current mode:
- "HTTP Server running on port 5050"
- "STDIO mode - connected to external server"
- "Idle - watching for connections"
Acceptance Criteria
Parent Epic
Part of #18 - STDIO Transport Support
Description
Update ServerCommands to handle the new connection modes - disable HTTP commands when in STDIO mode.
Implementation
Modify:
src/CodingWithCalvin.MCPServer/Commands/ServerCommands.csCommand State Changes
Status Display
Update any status display to show current mode:
Acceptance Criteria