diff --git a/README.md b/README.md index f1839845c..cee7eb855 100644 --- a/README.md +++ b/README.md @@ -898,7 +898,7 @@ const upgradeAuthTool = server.tool( // If we've just upgraded to 'write' permissions, we can still call 'upgradeAuth' // but can only upgrade to 'admin'. upgradeAuthTool.update({ - paramSchema: { permission: z.enum(["admin"]) }, // change validation rules + paramsSchema: { permission: z.enum(["admin"]) }, // change validation rules }) } else { // If we're now an admin, we no longer have anywhere to upgrade to, so fully remove that tool diff --git a/package-lock.json b/package-lock.json index 2fdf89b2e..1e0b12ed7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@modelcontextprotocol/sdk", - "version": "1.17.2", + "version": "1.17.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@modelcontextprotocol/sdk", - "version": "1.17.2", + "version": "1.17.3", "license": "MIT", "dependencies": { "ajv": "^6.12.6", diff --git a/package.json b/package.json index 2f5a030bb..697b051be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/sdk", - "version": "1.17.2", + "version": "1.17.3", "description": "Model Context Protocol implementation for TypeScript", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)", @@ -19,6 +19,18 @@ "mcp" ], "exports": { + ".": { + "import": "./dist/esm/index.js", + "require": "./dist/cjs/index.js" + }, + "./client": { + "import": "./dist/esm/client/index.js", + "require": "./dist/cjs/client/index.js" + }, + "./server": { + "import": "./dist/esm/server/index.js", + "require": "./dist/cjs/server/index.js" + }, "./*": { "import": "./dist/esm/*", "require": "./dist/cjs/*" @@ -88,4 +100,4 @@ "resolutions": { "strip-ansi": "6.0.1" } -} +} \ No newline at end of file diff --git a/src/client/auth.ts b/src/client/auth.ts index ab8aff0c7..8ac9ddd1e 100644 --- a/src/client/auth.ts +++ b/src/client/auth.ts @@ -359,6 +359,7 @@ async function authInternal( const fullInformation = await registerClient(authorizationServerUrl, { metadata, clientMetadata: provider.clientMetadata, + fetchFn, }); await provider.saveClientInformation(fullInformation); @@ -395,6 +396,7 @@ async function authInternal( refreshToken: tokens.refresh_token, resource, addClientAuthentication: provider.addClientAuthentication, + fetchFn, }); await provider.saveTokens(newTokens); diff --git a/src/examples/client/simpleOAuthClient.ts b/src/examples/client/simpleOAuthClient.ts index 4531f4c2a..b7388384a 100644 --- a/src/examples/client/simpleOAuthClient.ts +++ b/src/examples/client/simpleOAuthClient.ts @@ -270,7 +270,9 @@ class InteractiveOAuthClient { } if (command === 'quit') { - break; + console.log('\nšŸ‘‹ Goodbye!'); + this.close(); + process.exit(0); } else if (command === 'list') { await this.listTools(); } else if (command.startsWith('call ')) {