-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
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
- Start command disabled in STDIO mode
- Stop command only enabled for HTTP mode
- Status text reflects current mode
- Commands refresh when mode changes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels