Skip to content

Commit 51eabff

Browse files
fix(server-auth-legacy): make express a required peer; clarify OAuth subclass availability in migration docs
1 parent 126b89a commit 51eabff

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
@@ -191,6 +191,8 @@ Individual OAuth error classes replaced with single `OAuthError` class and `OAut
191191

192192
Removed: `OAUTH_ERRORS` constant.
193193

194+
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.
195+
194196
Update OAuth error handling:
195197

196198
```typescript

docs/migration.md

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

754754
The `OAUTH_ERRORS` constant has also been removed.
755755

756+
> **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.
757+
756758
**Before (v1):**
757759

758760
```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)