Skip to content

fix(mcp): prefer application/json over SSE when client accepts both#28558

Merged
Vishnuujain merged 1 commit into
mainfrom
fix/mcp-prefer-json-over-sse
Jun 1, 2026
Merged

fix(mcp): prefer application/json over SSE when client accepts both#28558
Vishnuujain merged 1 commit into
mainfrom
fix/mcp-prefer-json-over-sse

Conversation

@Vishnuujain
Copy link
Copy Markdown
Contributor

@Vishnuujain Vishnuujain commented May 31, 2026

@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 31, 2026

Code Review ✅ Approved 1 resolved / 1 findings

Updates MCP response negotiation to prioritize application/json over SSE, fixing response parsing issues for compliant clients. Add a test case for the shouldEmitSse(false, false) scenario to ensure full coverage.

✅ 1 resolved
Edge Case: Missing test for shouldEmitSse(false, false)

📄 openmetadata-mcp/src/test/java/org/openmetadata/mcp/server/transport/HttpServletStatelessServerTransportTest.java:128-141
The test suite covers three of the four boolean combinations for shouldEmitSse(acceptsJson, acceptsSse) but omits (false, false) — the case where a client sends an Accept header that includes neither JSON nor SSE (e.g. */* or some other media type). Adding this case documents the expected behaviour and guards against future regressions.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@Vishnuujain Vishnuujain added the safe to test Add this label to run secure Github workflows on PRs label May 31, 2026
@Vishnuujain Vishnuujain self-assigned this May 31, 2026
@Vishnuujain Vishnuujain added the To release Will cherry-pick this PR into the release branch label May 31, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (18 flaky)

✅ 4253 passed · ❌ 0 failed · 🟡 18 flaky · ⏭️ 88 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 298 0 1 4
🟡 Shard 2 801 0 6 9
🟡 Shard 3 803 0 3 8
🟡 Shard 4 844 0 2 12
🟡 Shard 5 719 0 1 47
🟡 Shard 6 788 0 5 8
🟡 18 flaky test(s) (passed on retry)
  • Pages/AuditLogs.spec.ts › should handle audit logs access for non-admin users (shard 1, 1 retry)
  • Features/ContextCenter.spec.ts › searching documents filters the list to matching results (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › Admin: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › EditAll User: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/DataQuality/TestCaseResultPermissions.spec.ts › User with TEST_CASE.EDIT_ALL can see edit action on test case (shard 2, 1 retry)
  • Features/DataQuality/TestCaseResultPermissions.spec.ts › User with only VIEW cannot PATCH results (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should start term as Draft when glossary has reviewers (shard 2, 1 retry)
  • Features/LandingPageWidgets/DomainDataProductsWidgets.spec.ts › Data Product asset count should update when assets are added (shard 3, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/Table.spec.ts › Tags term should be consistent for search (shard 3, 1 retry)
  • Flow/PersonaDeletionUserProfile.spec.ts › User profile loads correctly before and after persona deletion (shard 4, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 4, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Cancel glossary delete operation (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageInteraction.spec.ts › Verify edge delete button in drawer (shard 6, 1 retry)
  • Pages/ServiceEntity.spec.ts › Tier Add, Update and Remove (shard 6, 1 retry)
  • Pages/Users.spec.ts › Create and Delete user (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@Vishnuujain Vishnuujain merged commit 193eec0 into main Jun 1, 2026
76 of 87 checks passed
@Vishnuujain Vishnuujain deleted the fix/mcp-prefer-json-over-sse branch June 1, 2026 05:29
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Changes have been cherry-picked to the 1.12.10 branch.

github-actions Bot pushed a commit that referenced this pull request Jun 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Changes have been cherry-picked to the 1.13 branch.

github-actions Bot pushed a commit that referenced this pull request Jun 1, 2026
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 To release Will cherry-pick this PR into the release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP tools not working via ai-sdk

2 participants