feat(mcp): add Streamable HTTP transport (MCP 2025-03-26)
Add POST /mcp/sse and POST /mcp/ handlers so modern clients (Antigravity,
Cursor, VS Code Copilot) can use the Streamable HTTP transport instead of
the legacy SSE session protocol.

Changes:
- POST /api/v1/mcp/sse — Streamable HTTP: JSON-RPC in, JSON response out
- POST /api/v1/mcp/    — Same, aliased for clients pointing at the base path
- Supports batch requests (JSON array)
- Notifications (no id) return 202 with empty body per spec
- Legacy GET /mcp/sse + POST /mcp/messages preserved for backward compat

Verified: curl POST initialize → 200 JSON response
1 parent 0e45953 commit e0f22e9f0d737cf5a9ab9ea5743980d642a7bf27
@Antigravity AI Antigravity AI authored 21 days ago
Showing 1 changed file
View
ai-hub/app/api/routes/mcp.py