← Back to Pull requests

chore(deps): bump @modelcontextprotocol/server from 2.0.0 to 2.3.1 in /02-Security/samples/cimd-dcr-auth #1189

Closed
unknown closed this pull request without merging on Oct 23, 2026 14:57 UTC
View on GitHub
unknown unknown commented on Oct 20, 2026 22:51 UTC
Author

Bumps @modelcontextprotocol/server from 2.0.0 to 2.3.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/modelcontextprotocol/typescript-sdk/releases">@​modelcontextprotocol/server's releases</a>.</em></p>
<blockquote>
<h2><code>@​modelcontextprotocol/server-legacy</code><a href="https://github.com/2"><code>@​2</code></a>.3.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/2952">#2952</a> <a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/5a1867390b91b8836f49af76c45427279f513325"><code>5a18673</code></a> Thanks <a href="https://github.com/apps/claude"><code>@​claude</code></a>! - <code>requireBearerAuth</code> in <code>@modelcontextprotocol/server-legacy</code> takes the optional <code>expectedResource</code> that <code>@modelcontextprotocol/server</code> 2.3.0 and <code>@modelcontextprotocol/sdk</code> 1.32.0 added: the resource the token must be issued for (its audience), usually the server's URL. When it is set, a token is accepted only if the verifier reports that value in <code>AuthInfo.resource</code>; the two are compared as strings, ignoring a fragment and one trailing slash. A token reported for another value, or for none, is answered <code>401 invalid_token</code> with the usual <code>WWW-Authenticate</code> challenge. When it is not set, nothing changes. The package stays frozen otherwise; this option is added so that its <code>requireBearerAuth</code> matches the 1.x middleware it is a copy of.</p>
</li>
<li>
<p>Updated dependencies []:</p>
<ul>
<li><code>@​modelcontextprotocol/core</code><a href="https://github.com/2"><code>@​2</code></a>.3.1</li>
</ul>
</li>
</ul>
<h2><code>@​modelcontextprotocol/server</code><a href="https://github.com/2"><code>@​2</code></a>.3.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>Updated dependencies []:
<ul>
<li><code>@​modelcontextprotocol/core</code><a href="https://github.com/2"><code>@​2</code></a>.3.1</li>
</ul>
</li>
</ul>
<h2><code>@​modelcontextprotocol/server-legacy</code><a href="https://github.com/2"><code>@​2</code></a>.3.0</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/2908">#2908</a> <a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/633dd3e12bff6869c932c4a526341622320912b1"><code>633dd3e</code></a> Thanks <a href="https://github.com/apps/claude"><code>@​claude</code></a>! - The <code>license</code> field of the package manifests is now <code>Apache-2.0</code>; the <code>LICENSE</code> file shipped in each package carries the full terms, including the MIT text for earlier contributions. No code change.</p>
</li>
<li>
<p>Updated dependencies [<a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/633dd3e12bff6869c932c4a526341622320912b1"><code>633dd3e</code></a>]:</p>
<ul>
<li><code>@​modelcontextprotocol/core</code><a href="https://github.com/2"><code>@​2</code></a>.3.0</li>
</ul>
</li>
</ul>
<h2><code>@​modelcontextprotocol/server</code><a href="https://github.com/2"><code>@​2</code></a>.3.0</h2>
<h3>Minor Changes</h3>
<ul>
<li>
<p><a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/2929">#2929</a> <a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/40f8f4e229d963cd7fd2890bda2aeebe7005299a"><code>40f8f4e</code></a> Thanks <a href="https://github.com/apps/claude"><code>@​claude</code></a>! - <code>requireBearerAuth</code> and <code>verifyBearerToken</code> take a new optional <code>expectedResource</code>, which makes them accept only tokens issued for this resource (the token's audience). Set it to the value your authorization server puts into tokens meant for this server, usually the server's URL. When it is set, a token is accepted only if the verifier reports that value in <code>AuthInfo.resource</code>; the two are compared as strings, ignoring a fragment and one trailing slash. A token reported for another value, or for none, is answered <code>401 invalid_token</code> with the usual <code>WWW-Authenticate</code> challenge. When it is not set, nothing changes. To use it, pass <code>expectedResource</code> and have <code>verifyAccessToken</code> fill <code>AuthInfo.resource</code>, for example from the <code>aud</code> claim. The option is declared on a new exported type, <code>VerifyBearerTokenOptions</code>, which extends <code>BearerAuthOptions</code>; <code>BearerAuthOptions</code> itself is unchanged. The Express <code>requireBearerAuth</code> passes the option through. With Express, <code>@modelcontextprotocol/express</code> has to be upgraded to this release as well: 2.0.1 does not pass the option on, so nothing is compared. Its options type does not have the option, so TypeScript reports an <code>expectedResource</code> written in a call to the 2.0.1 <code>requireBearerAuth</code> as an error.</p>
</li>
<li>
<p><a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/2926">#2926</a> <a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/6d8dbc6cb590edf766fcb66b636ca6b654e99c37"><code>6d8dbc6</code></a> Thanks <a href="https://github.com/apps/claude"><code>@​claude</code></a>! - <code>McpServer</code> now accepts a <code>maxToolInputElements</code> option that limits the number of elements in tool-call arguments: the largest combined number of array elements and object members a single <code>tools/call</code> <code>arguments</code> payload may contain. It is off by default, so behavior is unchanged unless you set it. When it is set and a call exceeds it, that call is answered with an <code>isError: true</code> tool result that names the limit, before the input schema runs, and the server keeps serving. Set it above the largest arguments your tools legitimately accept; <code>maxRequestBodySize</code> remains the primary limit on request size. The value must be a number of at least 1, or <code>Infinity</code> for no limit; any other value is rejected at construction. The options type is exported as <code>McpServerOptions</code>.</p>
</li>
<li>
<p><a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/2918">#2918</a> <a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/84804c22e45a662675a198f853b7f00063838a8d"><code>84804c2</code></a> Thanks <a href="https://github.com/apps/claude"><code>@​claude</code></a>! - A <code>Server</code> or <code>McpServer</code> now serves one connection at a time, and a Streamable HTTP server transport without sessions (<code>sessionIdGenerator: undefined</code>) serves one request. An app that uses one server object, or one stateless transport, for every HTTP request fails on the second request after this upgrade. Build the server and the transport per request instead.</p>
<p>What keeps working without a change:</p>
<ul>
<li><code>createMcpHandler(buildServer)</code> and <code>serveStdio(buildServer)</code>, where <code>buildServer</code> returns a new server on every call.</li>
<li>A handler that builds a new server and a new stateless transport for each request.</li>
<li>One server and one transport per session (a transport with a <code>sessionIdGenerator</code>).</li>
<li>Connecting a server again after <code>close()</code>.</li>
<li><code>Client</code>.</li>
</ul>
<p>What fails now, how it shows, and what to change:</p>
<ul>
<li>One server object with a new stateless transport per request (<code>const server = new McpServer(...)</code> outside the handler, <code>await server.connect(transport)</code> inside it): the second HTTP request the process receives fails, and so does every later one. <code>connect()</code> rejects with an <code>SdkError</code> of code <code>ALREADY_CONNECTED</code>. If the handler closes the transport when the response ends, requests that arrive one after the other still work and a request that overlaps another one fails. Change: move <code>new McpServer(...)</code> and its registrations into the handler.</li>
<li>One stateless transport for every request (a transport built once with <code>sessionIdGenerator: undefined</code>): the second HTTP request fails. <code>WebStandardStreamableHTTPServerTransport.handleRequest()</code> rejects with <code>Stateless transport cannot be reused across requests. Create a new transport per request.</code>, and <code>NodeStreamableHTTPServerTransport.handleRequest()</code> answers <code>500</code>. Change: build the server and the transport inside the handler and connect them there.</li>
<li><code>createMcpHandler(() =&gt; server)</code> with a server built once: a request that arrives after the previous response has been read to its end still works. A request that arrives while another one is being served is answered <code>500</code> with the JSON-RPC error <code>-32603</code> (<code>Internal server error</code>); the reason is reported only through the <code>onerror</code> option. Change: pass a function that builds the server, as in <code>createMcpHandler(buildServer)</code>.</li>
<li>One server object for every session: the <code>initialize</code> request of the second session fails with <code>ALREADY_CONNECTED</code>. Change: build a server per session.</li>
</ul>
<p>What the caller sees when <code>connect()</code> or <code>handleRequest()</code> rejects depends on the host. Express 5, Fastify and Hono answer <code>500</code>. A plain <code>node:http</code> listener without its own error handling gets an unhandled rejection, which ends the process.</p>
<p>The README examples of <code>@modelcontextprotocol/express</code>, <code>@modelcontextprotocol/fastify</code>, <code>@modelcontextprotocol/hono</code> and <code>@modelcontextprotocol/node</code>, and the handler examples in the JSDoc of <code>WebStandardStreamableHTTPServerTransport</code> and <code>NodeStreamableHTTPServerTransport</code>, now build a server and a transport per request.</p>
</li>
<li>
<p><a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/pull/2907">#2907</a> <a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/e55f9ac1b1cae413599b499cbaa45c0378edba78"><code>e55f9ac</code></a> Thanks <a href="https://github.com/apps/claude"><code>@​claude</code></a>! - <code>allowedOrigins</code> and <code>validateOriginHeader</code> accept lowercase entries of the form <code>&lt;scheme&gt;://</code>, such as <code>moz-extension://</code> or <code>chrome-extension://</code>, which admit every origin of that scheme. This lets a server admit MCP clients that run as a browser extension when the extension ID cannot be listed, as on Firefox, where it differs on every install. <code>http://</code> and <code>https://*</code> are not honoured, and the defaults are unchanged.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/fcef852f6cdafea07f36cf6fae69b37c8adf85be"><code>fcef852</code></a> Version Packages (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/2953">#2953</a>)</li>
<li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/e8b7f05f5b9e4204510289dc0596531265e9ddcb"><code>e8b7f05</code></a> docs: one opening note in the server and client package READMEs (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/2955">#2955</a>)</li>
<li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/5a1867390b91b8836f49af76c45427279f513325"><code>5a18673</code></a> feat(server-legacy): add expectedResource to requireBearerAuth (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/2952">#2952</a>)</li>
<li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/3ab61c61f5ff1cd6b67eec6222247c66635495fd"><code>3ab61c6</code></a> docs: update the README banners (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/2940">#2940</a>)</li>
<li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/8aabbdcef6e016978a3132045281dfbd51c69792"><code>8aabbdc</code></a> test(e2e): expect SdkHttpError after a second 401 from onUnauthorized (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/2936">#2936</a>)</li>
<li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/33fecfb119cb637022fcb345c61c09227ed04fc4"><code>33fecfb</code></a> test(e2e): cover tools/call without arguments (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/2933">#2933</a>)</li>
<li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/818f7828898f367bfd4436bf55ccdfa17c3757d6"><code>818f782</code></a> docs: state the principles in CLAUDE.md and shorten REVIEW.md (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/2938">#2938</a>)</li>
<li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/a202a3621fcb97918e09fa45d0f9efd2dbdee19b"><code>a202a36</code></a> Version Packages (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/2896">#2896</a>)</li>
<li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/2d731faef167b3df78d4be05f547a134f0e23bcf"><code>2d731fa</code></a> fix(client): refresh again when an SSE retry failed for a reason other than 4...</li>
<li><a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/b6e5c5574e107c33cb6ae33c2e869780f5684c3a"><code>b6e5c55</code></a> test(e2e): cover prompts/get without arguments for prompts with a schema (<a href="https://redirect.github.com/modelcontextprotocol/typescript-sdk/issues/2928">#2928</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/modelcontextprotocol/typescript-sdk/compare/@modelcontextprotocol/server@2.0.0...@modelcontextprotocol/server@2.3.1">compare view</a></li>
</ul>
</details>
<br />

![Dependabot compatibility score](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR

  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it

  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency

  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)

  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)

  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

  • You can disable automated security fix PRs for this repo from the Security Alerts page.

    </details>

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: skytin1004 Review duration: 3846m
    All Vouch review confidence checks passed
    Residual risk 0.32 = Change Risk (0.80) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.80 · 650 lines diff across 8 files
    0.80
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.080
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #1189"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 80.2% (HIGH) · Higher = larger blast radius
    80.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 31.7% · Safe to merge
    31.7%