feat: implemented streamable HTTP transport
Description:
Added a second transport alongside stdio. The server now accepts MCP requests over HTTP at POST /mcp.
What's in this MR:
src/transports/http.ts: Express app viacreateMcpExpressApp, statelessStreamableHTTPServerTransport), open CORS headers, OPTIONS preflight -> 204, GET/DELETE -> 405src/index-http.ts: separate entrypoint, readsPORTenv var (default 3000), registers SIGTERM/SIGINT for graceful shutdown, friendly EADDRINUSE message on double-startALLOWED_HOSTSenv var : comma-separated hostnames for DNS rebinding protection; unset = no restriction- Error handling : try/catch in POST handler returns JSON-RPC
-32603on unexpected errors
Design decisions:
- Stateless mode: no session state needed, all tools are pure CDLI API fetches
- Separate entry point (
index-http.ts) , zero risk of touching thestdiopath