[integrations] Add smart ingest backend#33
Draft
alanshurafa wants to merge 1 commit into
Draft
Conversation
alanshurafa
pushed a commit
that referenced
this pull request
Jun 12, 2026
… connections Both server/index.ts and integrations/kubernetes-deployment/index.ts shared a global McpServer singleton and called server.connect(transport) on every request, attaching new transports to an already-connected server. Under concurrent load or repeated calls this causes transport state corruption and the reconnect instability reported on claude.ai. Fix: wrap all tool registrations in a buildServer() factory function and call it per-request, so each request gets a fresh McpServer + transport pair with no shared state. Also applied to both files: - Strip mcp-session-id from responses: server is stateless and advertising a session ID misleads clients into expecting resumption that never comes - Await transport.handleRequest() to enable response post-processing - Null-guard on the transport response with a 500 fallback Additionally backfilled into integrations/kubernetes-deployment/index.ts: - CORS preflight handler (OPTIONS *) — was missing entirely - Accept header patch for Claude Desktop connector compatibility (mirrors the fix already present in server/index.ts since issue #33) - CORS headers on 401 responses and successful MCP responses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fork-only CI simulation PR based on alanshurafa/OB1:main. This tests the old smart ingest backend branch on the fork only; it remains superseded/conflicted against current upstream OB1 main.