Skip to content

[integrations] Add smart ingest backend#33

Draft
alanshurafa wants to merge 1 commit into
mainfrom
codex/fork-ci-smart-ingest-backend
Draft

[integrations] Add smart ingest backend#33
alanshurafa wants to merge 1 commit into
mainfrom
codex/fork-ci-smart-ingest-backend

Conversation

@alanshurafa

Copy link
Copy Markdown
Owner

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.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant