@modelcontextprotocol/client@2.4.0
<h3>Minor Changes</h3> <ul> <li> <p><a href="https://github.com/modelcontextprotocol/typescript-sdk/pull/3085" data-hovercard-type="pull_request" data-hovercard-url="/modelcontextprotocol/typescript-sdk/pull/3085/hovercard">#3085</a> <a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/a63375661399956a744ff8b34d03d36e3d09e98a"><code>a633756</code></a> Thanks <a href="https://github.com/apps/claude">@claude</a>! - Add an opt-in for sending <code>scope</code> on refresh-token requests, for authorization servers that reject a refresh without it (Microsoft Entra ID answers <code>AADSTS90009</code> when the client and the resource are the same app registration, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="5252301815" data-permission-text="Title is private" data-url="https://github.com/modelcontextprotocol/typescript-sdk/issues/2718" data-hovercard-type="issue" data-hovercard-url="/modelcontextprotocol/typescript-sdk/issues/2718/hovercard" href="https://github.com/modelcontextprotocol/typescript-sdk/issues/2718">#2718</a>). <code>OAuthClientProvider</code> gains an optional <code>scopeForRefresh(tokens)</code>: <code>auth()</code>, and so the transports and <code>withOAuth</code>, sends the string it returns. <code>refreshAuthorization()</code> gains an optional <code>scope</code>. When a scope is sent and the response has none, the sent scope is kept on the returned tokens. Without either option the refresh request and the saved tokens are unchanged.</p> </li> <li> <p><a href="https://github.com/modelcontextprotocol/typescript-sdk/pull/3047" data-hovercard-type="pull_request" data-hovercard-url="/modelcontextprotocol/typescript-sdk/pull/3047/hovercard">#3047</a> <a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/46d9c9921b6542e813c1ecc5f9fc964085e8e3bb"><code>46d9c99</code></a> Thanks <a href="https://github.com/KKonstantinov">@KKonstantinov</a>, <a href="https://github.com/tobi-oye">@tobi-oye</a>, <a href="https://github.com/mattzcarey">@mattzcarey</a>! - Add the Skills extension (SEP-2640), reachable through new <code>ext/skills</code> subpaths; package root exports are unchanged.</p> <ul> <li><code>@modelcontextprotocol/server/ext/skills</code>: <code>SkillsExtension</code> (<code>attach(server)</code> serves <code>skills/list</code>, <code>skills/get</code>, <code>resources/directory/read</code> and a <code>skill://{+path}</code> resource template), <code>SkillsExtension.load(files)</code> returning a <code>SkillCatalog</code> with <code>entries</code> and <code>reload()</code>, the <code>SkillFiles</code> storage adapter with <code>memorySkillFiles</code>, <code>SkillSource</code> for generated catalogs, <code>skillEntry</code>, and <code>SkillCatalogError</code>. Invalid skills are skipped with a warning (<code>onWarning</code>), or fail under <code>strict</code>. A file whose bytes are valid UTF-8 is served as <code>text</code>, whatever its MIME type; any other file as a base64 <code>blob</code>.</li> <li><code>@modelcontextprotocol/server/ext/skills/node</code>: <code>loadSkills(folder)</code> and <code>nodeSkillFiles(folder)</code>.</li> <li><code>@modelcontextprotocol/client/ext/skills</code>: <code>SkillsClient</code> with <code>list()</code> (throws on an invalid entry; <code>skipInvalid: true</code> keeps the valid ones and returns the rest in <code>invalid</code>), <code>get()</code>, <code>read(skill, path?)</code> (size, digest and <code>SKILL.md</code> frontmatter verified, <code>SkillVerificationError</code> on a mismatch; a copy from the response cache that fails a check is fetched once more with <code>cacheMode: 'refresh'</code> first) and <code>readDirectory()</code>.</li> <li><code>@modelcontextprotocol/core/ext/skills</code>: schemas, types and constants, including <code>SKILL_LIMITS</code>. The result schemas follow the stable spec, so <code>ttlMs</code> and <code>cacheScope</code> are required.</li> </ul> <p><code>SkillsExtension.attach</code> is <code>@experimental</code>: how an extension is wired to a server may change in a minor release. The rest of the Skills API is stable.</p> <p>Works on 2025-11-25 and 2026-07-28. On 2026-07-28 only, the server sends the caching fields (<code>ttlMs</code>, <code>cacheScope</code>), and <code>SkillsClient</code> requires them and returns them from <code>list()</code>, <code>get()</code> and <code>readDirectory()</code>.</p> </li> </ul> <h3>Patch Changes</h3> <ul> <li> <p><a href="https://github.com/modelcontextprotocol/typescript-sdk/pull/3083" data-hovercard-type="pull_request" data-hovercard-url="/modelcontextprotocol/typescript-sdk/pull/3083/hovercard">#3083</a> <a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/ef38c6765a15ee29030340dfea28b013893fa0a2"><code>ef38c67</code></a> Thanks <a href="https://github.com/apps/claude">@claude</a>! - The bundled Ajv validator is now built with fast-uri 3.1.8 (was 3.1.0). fast-uri 3.1.6 and later reject a <code>$id</code> or <code>$ref</code> whose text before the first colon is not a valid URI scheme (<code>my_tool:output</code>), or whose URN namespace is not valid (<code>urn:my_tool:output</code>): a schema that uses one no longer compiles, and a tool that carries it fails with an invalid-schema error. An underscore without a colon (<code>my_tool_output</code>) and a <code>$ref</code> into <code>#/$defs/...</code> or <code>#/definitions/...</code> are not affected.</p> </li> <li> <p><a href="https://github.com/modelcontextprotocol/typescript-sdk/pull/2762" data-hovercard-type="pull_request" data-hovercard-url="/modelcontextprotocol/typescript-sdk/pull/2762/hovercard">#2762</a> <a href="https://github.com/modelcontextprotocol/typescript-sdk/commit/b022522089a0c8b632595c6e7b536453945ed5a9"><code>b022522</code></a> Thanks <a href="https://github.com/pcarleton">@pcarleton</a>! - <code>x-mcp-header</code> on a <code>number</code>-typed tool parameter is now rejected, matching the 2026-07-28 sp
Nguyên văn nguồnChi tiết nguồn
- @modelcontextprotocol/client@2.4.0 modelcontextprotocol/typescript-sdk releases · 24 thg 10, 2026