Skip to content

Commit 2fc7351

Browse files
fix(server-auth-legacy): make express a required peer; clarify OAuth subclass availability in migration docs
1 parent ba924a0 commit 2fc7351

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

docs/migration-SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ Individual OAuth error classes replaced with single `OAuthError` class and `OAut
193193

194194
Removed: `OAUTH_ERRORS` constant.
195195

196+
For server-side Authorization-Server implementations, the v1 subclass hierarchy (and `OAUTH_ERRORS`) is still available from `@modelcontextprotocol/server-auth-legacy` (frozen v1 copy). For client-side error handling, use `OAuthError` + `OAuthErrorCode` as below.
197+
196198
Update OAuth error handling:
197199

198200
```typescript

docs/migration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,8 @@ The following individual error classes have been removed in favor of `OAuthError
798798

799799
The `OAUTH_ERRORS` constant has also been removed.
800800

801+
> **Server-side Authorization-Server code:** the v1 subclass hierarchy (and `OAUTH_ERRORS`) is still exported from `@modelcontextprotocol/server-auth-legacy` (frozen v1 copy). Use that package if you implement an OAuth Authorization Server. For client-side error handling, use `OAuthError` + `OAuthErrorCode` as below.
802+
801803
**Before (v1):**
802804

803805
```typescript

packages/server-auth-legacy/package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@
5353
"peerDependencies": {
5454
"express": "catalog:runtimeServerOnly"
5555
},
56-
"peerDependenciesMeta": {
57-
"express": {
58-
"optional": true
59-
}
60-
},
6156
"devDependencies": {
6257
"@modelcontextprotocol/core": "workspace:^",
6358
"@modelcontextprotocol/tsconfig": "workspace:^",

0 commit comments

Comments
 (0)