Skip to content

Fix: Upgrade MCP SDK to 1.1.0#26489

Merged
pmbrull merged 5 commits intomainfrom
mcp-sdk-upgrade
Mar 17, 2026
Merged

Fix: Upgrade MCP SDK to 1.1.0#26489
pmbrull merged 5 commits intomainfrom
mcp-sdk-upgrade

Conversation

@Vishnuujain
Copy link
Copy Markdown
Contributor

@Vishnuujain Vishnuujain commented Mar 13, 2026

Describe your changes:

Fixes #26454

I worked on ... because ...

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

Summary by Gitar

  • MCP SDK upgrade:
    • Upgraded MCP SDK from 0.17.1 to 1.1.0 in pom.xml
    • Updated Jackson import from jackson to jackson2 in McpServer.java and McpUtils.java
    • Changed artifact ID from mcp to mcp-core and added mcp-json-jackson2 dependency
  • Bug fixes:
    • Added regression test for elicitation deserialization crash with form/url fields
    • Fixed duplicate MCP servlet registration in OpenMetadataApplication.java
  • Dependency cleanup:
    • Removed MCP BOM and duplicate mcp dependency from openmetadata-service/pom.xml

This will update automatically on new commits.

@Vishnuujain Vishnuujain changed the title Fix: Upgrade MCP SDK to 1.1.0 to resolve elicitation deserialization … Fix: Upgrade MCP SDK to 1.1.0 Mar 13, 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!

@Vishnuujain Vishnuujain self-assigned this Mar 13, 2026
@Vishnuujain Vishnuujain added safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch labels Mar 13, 2026
@Vishnuujain Vishnuujain requested review from harshach and pmbrull March 13, 2026 19:06
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 13, 2026

🔴 Playwright Results — 2 failure(s), 20 flaky

✅ 3331 passed · ❌ 2 failed · 🟡 20 flaky · ⏭️ 183 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 454 0 1 2
🔴 Shard 2 301 2 2 1
🟡 Shard 3 653 0 8 33
🟡 Shard 4 722 0 5 47
✅ Shard 5 591 0 0 67
🟡 Shard 6 610 0 4 33

Genuine Failures (failed on all attempts)

Features/Container.spec.ts › expand / collapse should not appear after updating nested fields for container (shard 2)
�[31mTest timeout of 180000ms exceeded.�[39m
Features/DataQuality/TestCaseImportExportBasic.spec.ts › should upload and validate CSV file (shard 2)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoHaveText�[2m(�[22m�[32mexpected�[39m�[2m)�[22m failed

Locator:  getByTestId('passed-row')
Expected: �[32m"4"�[39m
Received: �[31m"1"�[39m
Timeout:  15000ms

Call log:
�[2m  - Expect "toHaveText" with timeout 15000ms�[22m
�[2m  - waiting for getByTestId('passed-row')�[22m
�[2m    19 × locator resolved to <span data-testid="passed-row" class="font-semibold passed-row">1</span>�[22m
�[2m       - unexpected value "1"�[22m

🟡 20 flaky test(s) (passed on retry)
  • Pages/AuditLogs.spec.ts › should apply both User and EntityType filters simultaneously (shard 1, 1 retry)
  • Features/ColumnBulkOperations.spec.ts › should show Service filter chip from URL (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 2, 1 retry)
  • Features/BulkImport.spec.ts › Database Schema (shard 3, 1 retry)
  • Features/DataProductPersonaCustomization.spec.ts › Data Product - customize tab label should only render if it's customized by user (shard 3, 1 retry)
  • Features/DataQuality/TestCaseIncidentPermissions.spec.ts › User with TEST_CASE.EDIT_ALL can see edit icon on incidents (shard 3, 1 retry)
  • Features/DataQuality/TestCaseResultPermissions.spec.ts › User with only VIEW cannot PATCH results (shard 3, 1 retry)
  • Features/Glossary/GlossaryHierarchy.spec.ts › should cancel move operation (shard 3, 1 retry)
  • Features/Glossary/GlossaryRemoveOperations.spec.ts › should add and remove owner from glossary term (shard 3, 1 retry)
  • Features/Permissions/GlossaryPermissions.spec.ts › Team-based permissions work correctly (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Flow/ObservabilityAlerts.spec.ts › Alert operations for a user with and without permissions (shard 4, 2 retries)
  • Pages/Customproperties-part2.spec.ts › entityReferenceList shows item count, scrollable list, no expand toggle (shard 4, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate Description Rule Is_Set (shard 4, 1 retry)
  • Pages/DomainUIInteractions.spec.ts › Remove owner from domain via UI (shard 4, 1 retry)
  • Pages/DomainUIInteractions.spec.ts › Add owner to data product via UI (shard 4, 1 retry)
  • Pages/Glossary.spec.ts › Column dropdown drag-and-drop functionality for Glossary Terms table (shard 6, 1 retry)
  • Pages/HyperlinkCustomProperty.spec.ts › should display URL when no display text is provided (shard 6, 1 retry)
  • Pages/Tags.spec.ts › Verify Owner Add Delete (shard 6, 1 retry)
  • Pages/Users.spec.ts › Permissions for table details page for Data Consumer (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

pmbrull
pmbrull previously approved these changes Mar 14, 2026
protected Authorizer authorizer;
private AuthenticatorHandler authenticatorHandler;
protected Limits limits;
private volatile boolean mcpServerRegistered = false;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Edge Case: Non-atomic check-then-act on mcpServerRegistered flag

The volatile boolean mcpServerRegistered guard uses a read-then-write pattern without synchronization. While both current call sites (Dropwizard run() and TestSuiteBootstrap) execute sequentially, this pattern is fragile — if a future caller invokes registerMCPServer concurrently, both threads could pass the if (mcpServerRegistered) check before either sets it to true, causing double registration.

Using AtomicBoolean.compareAndSet() makes the intent self-documenting and safe against future concurrent callers.

Suggested fix:

// Field declaration
private final AtomicBoolean mcpServerRegistered = new AtomicBoolean(false);

// Guard in registerMCPServer
protected void registerMCPServer(...) {
    if (!mcpServerRegistered.compareAndSet(false, true)) {
        LOG.info("MCP Server already registered, skipping");
        return;
    }
    try {
        // ... existing logic, but reset on failure:
    } catch (Exception ex) {
        mcpServerRegistered.set(false);
        // handle error
    }
}

Was this helpful? React with 👍 / 👎 | Reply gitar fix to apply this suggestion

@gitar-bot
Copy link
Copy Markdown

gitar-bot bot commented Mar 16, 2026

Code Review 👍 Approved with suggestions 0 resolved / 1 findings

Upgrades MCP SDK to 1.1.0 and resolves Jackson 2/3 conflicts and duplicate servlet registration. Consider adding synchronization around the mcpServerRegistered flag check-then-act pattern to prevent potential race conditions.

💡 Edge Case: Non-atomic check-then-act on mcpServerRegistered flag

📄 openmetadata-service/src/main/java/org/openmetadata/service/OpenMetadataApplication.java:208 📄 openmetadata-service/src/main/java/org/openmetadata/service/OpenMetadataApplication.java:407

The volatile boolean mcpServerRegistered guard uses a read-then-write pattern without synchronization. While both current call sites (Dropwizard run() and TestSuiteBootstrap) execute sequentially, this pattern is fragile — if a future caller invokes registerMCPServer concurrently, both threads could pass the if (mcpServerRegistered) check before either sets it to true, causing double registration.

Using AtomicBoolean.compareAndSet() makes the intent self-documenting and safe against future concurrent callers.

Suggested fix
// Field declaration
private final AtomicBoolean mcpServerRegistered = new AtomicBoolean(false);

// Guard in registerMCPServer
protected void registerMCPServer(...) {
    if (!mcpServerRegistered.compareAndSet(false, true)) {
        LOG.info("MCP Server already registered, skipping");
        return;
    }
    try {
        // ... existing logic, but reset on failure:
    } catch (Exception ex) {
        mcpServerRegistered.set(false);
        // handle error
    }
}
🤖 Prompt for agents
Code Review: Upgrades MCP SDK to 1.1.0 and resolves Jackson 2/3 conflicts and duplicate servlet registration. Consider adding synchronization around the mcpServerRegistered flag check-then-act pattern to prevent potential race conditions.

1. 💡 Edge Case: Non-atomic check-then-act on mcpServerRegistered flag
   Files: openmetadata-service/src/main/java/org/openmetadata/service/OpenMetadataApplication.java:208, openmetadata-service/src/main/java/org/openmetadata/service/OpenMetadataApplication.java:407

   The `volatile boolean mcpServerRegistered` guard uses a read-then-write pattern without synchronization. While both current call sites (Dropwizard `run()` and `TestSuiteBootstrap`) execute sequentially, this pattern is fragile — if a future caller invokes `registerMCPServer` concurrently, both threads could pass the `if (mcpServerRegistered)` check before either sets it to `true`, causing double registration.
   
   Using `AtomicBoolean.compareAndSet()` makes the intent self-documenting and safe against future concurrent callers.

   Suggested fix:
   // Field declaration
   private final AtomicBoolean mcpServerRegistered = new AtomicBoolean(false);
   
   // Guard in registerMCPServer
   protected void registerMCPServer(...) {
       if (!mcpServerRegistered.compareAndSet(false, true)) {
           LOG.info("MCP Server already registered, skipping");
           return;
       }
       try {
           // ... existing logic, but reset on failure:
       } catch (Exception ex) {
           mcpServerRegistered.set(false);
           // handle error
       }
   }

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

@pmbrull
Copy link
Copy Markdown
Collaborator

pmbrull commented Mar 17, 2026

playwright failures known and fixed, merging

@pmbrull pmbrull merged commit 6c001cb into main Mar 17, 2026
49 of 51 checks passed
@pmbrull pmbrull deleted the mcp-sdk-upgrade branch March 17, 2026 14:01
@github-actions
Copy link
Copy Markdown
Contributor

Changes have been cherry-picked to the 1.12.2 branch.

github-actions bot pushed a commit that referenced this pull request Mar 17, 2026
* Fix: Upgrade MCP SDK to 1.1.0 to resolve elicitation deserialization crash

* Fix Jackson 2/3 conflict and duplicate MCP servlet registration

---------

Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com>
(cherry picked from commit 6c001cb)
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 server crashes on elicitation capabilities from 2025-11-25 clients (Java SDK ≤ 0.17.1)

2 participants