Skip to content

fix(ingestion): use HTTP transport for MCP connector - #32342

Merged
Vishnuujain merged 11 commits into
mainfrom
fix/mcp-connector-stdio-rce
Sep 7, 2026
Merged

Vishnuujain merged 11 commits into
mainfrom
fix/mcp-connector-stdio-rce

Conversation

@Vishnuujain

@Vishnuujain Vishnuujain commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The MCP ingestion connector now connects to MCP servers only over HTTP (SSE / StreamableHTTP) by URL.
  • Removes the local subprocess (Stdio) transport path.
  • HttpTransport hardened: Accept header, JSON or SSE-framed responses (multi-line data: reassembly, skips pre-response notifications), Mcp-Session-Id passthrough.
  • Stdio-configured servers are still discovered and cataloged as governance records (with a connection note); they are not started.
  • Schema: Stdio and the command/args/env fields are marked deprecated in descriptions (enum values kept, non-breaking).

Fixes #32343

@Vishnuujain
Vishnuujain requested a review from a team as a code owner September 1, 2026 09:13
@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions github-actions Bot added the safe to test Add this label to run secure Github workflows on PRs label Sep 1, 2026
@Vishnuujain Vishnuujain changed the title fix(ingestion): remove Stdio transport from MCP connector to close RCE (GHSA-8f6m-cj4x-3p96) fix(ingestion): remove Stdio transport from MCP connector Sep 1, 2026
@Vishnuujain Vishnuujain self-assigned this Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

✅ Generated Sources Auto-Updated

The generated TypeScript types (src/generated/) and dereferenced JSON
schemas (src/jsons/) have been automatically updated based on JSON schema
changes in this PR.

@Vishnuujain Vishnuujain linked an issue Sep 1, 2026 that may be closed by this pull request
@Vishnuujain Vishnuujain changed the title fix(ingestion): remove Stdio transport from MCP connector fix(ingestion): use HTTP transport for MCP connector Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

✅ Generated Sources Auto-Updated

The generated TypeScript types (src/generated/) and dereferenced JSON
schemas (src/jsons/) have been automatically updated based on JSON schema
changes in this PR.

@Vishnuujain
Vishnuujain force-pushed the fix/mcp-connector-stdio-rce branch from bcebeb7 to 9f50e7f Compare September 1, 2026 09:32
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

✅ Generated Sources Auto-Updated

The generated TypeScript types (src/generated/) and dereferenced JSON
schemas (src/jsons/) have been automatically updated based on JSON schema
changes in this PR.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 70%
70.37% (94985/134966) 54.87% (56153/102338) 56.28% (18762/33333)

@Vishnuujain
Vishnuujain added this pull request to the merge queue Sep 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 2, 2026
@Vishnuujain
Vishnuujain added this pull request to the merge queue Sep 3, 2026
@Vishnuujain
Vishnuujain removed this pull request from the merge queue due to a manual request Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — manual (2026-09-03T11:44:15Z)

The entry left the queue before it was built, so no checks ran against it.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-09-04T18:04:10Z)

Blocked the queue: integration-tests-postgres-opensearch

@gitar-bot

gitar-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 2 resolved / 2 findings

Switches the MCP ingestion connector to HTTP transport only, removing the local subprocess (Stdio) path and hardening HttpTransport with Accept header validation, proper SSE-framed response parsing with multi-line data: reassembly, and Mcp-Session-Id passthrough. Stdio-configured servers are now discovered as governance records without being started. E2E documentation mismatch and SSE parse behavior have been resolved.

✅ 2 resolved
✅ Quality: E2E doc mismatch: --sse-port with StreamableHTTP to /mcp

📄 ingestion/tests/integration/mcp/test_mcp_integration.py:361-375
The (skipped) E2E test configures TransportType.StreamableHTTP with url http://localhost:8096, so the client POSTs to <url>/mcp, but the docstring instructs starting the proxy with mcp-proxy --sse-port 8096, which serves an SSE endpoint (typically /sse) rather than a StreamableHTTP /mcp endpoint. Anyone running the test as documented would hit a 404. Update the command/flag or the transport/url so the documented setup matches the code path.

✅ Edge Case: SSE parse returns first data: frame, not matching id

📄 ingestion/src/metadata/ingestion/source/mcp/client.py:113-123
_parse_jsonrpc returns json.loads of the first data: line it encounters. For a StreamableHTTP server, a POST response streamed as text/event-stream may emit server-to-client notifications or other events before the actual JSON-RPC response, and SSE also permits a single event to span multiple data: lines. Returning the first frame unconditionally can yield the wrong message (or a partial one). Consider matching the response id (the request uses uuid4) and/or concatenating consecutive data: lines per event before decoding.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-09-07T09:24:41Z)

Blocked the queue: playwright-summary

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP connector: connect over HTTP transport

4 participants