Unpin the MCP SDK and upgrade to the latest version
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3585599. -->
Reported by: [e0ipso](https://www.drupal.org/user/550110)
Related to !13
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p> The mcp_server module currently pins <code>mcp/sdk</code> to ^0.1.0 in composer.json. Upstream has since released v0.2.x, v0.3.x, and v0.4.0 (2026-02-23), carrying bug fixes, new MCP spec features, and API improvements. Because the SDK is pre-1.0, each minor bump is allowed to include breaking changes, which is why we are stuck on the initial release line.</p>
<p> Pinning to <code>^0.1.0</code> blocks the module from:</p>
<ul>
<li> Adopting upstream fixes and newer MCP spec capabilities.</li>
<li> Coexisting with other Drupal projects that require a newer mcp/sdk.</li>
<li> Receiving security and maintenance updates that only land on the current release line.</li>
</ul>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<ol>
<li> Audit every <code>Mcp\…</code> usage in mcp_server, mcp_server_oauth, <code>mcp_server_tool_bridge</code>, <code>mcp_server_ui</code>, and <code>mcp_server_examples</code> against the v0.4.0 API surface.</li>
<li> Update <code>composer.json</code> to require the latest stable line (^0.4.0, or a constraint covering what we verify).</li>
<li> Fix compile/runtime fallout from renamed/removed SDK classes, method signatures, DTO shapes, and transport changes between 0.1 → 0.4.</li>
<li> Re-run the full test matrix (phpunit, phpcs, phpstan) and exercise HTTP /_mcp and Drush STDIO</li>
<li> transports against a real client.</li>
</ol>
issue