feat(mcp): SSE/HTTP mode, workplan OPS-WP-0002 done

- Add --http flag to MCP server for SSE transport on port 8002
- Add make mcp-http / mcp-stop targets
- Pin fastmcp<3.1.0 to stabilize dependency
- Update session-protocol: Step 0 tunnel health check before orient
- Mark OPS-WP-0002 and all its tasks done

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-27 14:10:49 +01:00
parent 431beef31b
commit 4f3c8646b3
6 changed files with 42 additions and 29 deletions

View File

@@ -513,4 +513,13 @@ def resource_catalog_targets() -> str:
# ---------------------------------------------------------------------------
if __name__ == "__main__":
mcp.run(transport="stdio")
import argparse
parser = argparse.ArgumentParser(description="OpsBridge MCP server")
parser.add_argument("--http", action="store_true", help="Run in SSE/HTTP mode instead of stdio")
args = parser.parse_args()
if args.http:
port = int(os.environ.get("BRIDGE_MCP_PORT", "8002"))
mcp.run(transport="sse", host="127.0.0.1", port=port)
else:
mcp.run(transport="stdio")