Skip to content

Commit 046ec71

Browse files
committed
Merge branch 'pr-93'
2 parents 4e16843 + fa8d466 commit 046ec71

File tree

3 files changed

+47
-7
lines changed

3 files changed

+47
-7
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mcp-remote",
3-
"version": "0.1.9",
3+
"version": "0.1.11",
44
"description": "Remote proxy for Model Context Protocol, allowing local-only clients to connect to remote servers using oAuth",
55
"keywords": [
66
"mcp",
@@ -33,7 +33,7 @@
3333
"open": "^10.1.0"
3434
},
3535
"devDependencies": {
36-
"@modelcontextprotocol/sdk": "^1.11.2",
36+
"@modelcontextprotocol/sdk": "^1.12.1",
3737
"@types/express": "^5.0.0",
3838
"@types/node": "^22.13.10",
3939
"prettier": "^3.5.3",

pnpm-lock.yaml

Lines changed: 38 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/node-oauth-client-provider.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import type { OAuthProviderOptions, StaticOAuthClientMetadata } from './types'
1010
import { readJsonFile, writeJsonFile, readTextFile, writeTextFile } from './mcp-auth-config'
1111
import { StaticOAuthClientInformationFull } from './types'
1212
import { getServerUrlHash, log, debugLog, DEBUG, MCP_REMOTE_VERSION } from './utils'
13+
import { randomUUID } from 'node:crypto'
1314

1415
/**
1516
* Implements the OAuthClientProvider interface for Node.js environments.
@@ -24,6 +25,7 @@ export class NodeOAuthClientProvider implements OAuthClientProvider {
2425
private softwareVersion: string
2526
private staticOAuthClientMetadata: StaticOAuthClientMetadata
2627
private staticOAuthClientInfo: StaticOAuthClientInformationFull
28+
private _state: string
2729

2830
/**
2931
* Creates a new NodeOAuthClientProvider
@@ -38,6 +40,7 @@ export class NodeOAuthClientProvider implements OAuthClientProvider {
3840
this.softwareVersion = options.softwareVersion || MCP_REMOTE_VERSION
3941
this.staticOAuthClientMetadata = options.staticOAuthClientMetadata
4042
this.staticOAuthClientInfo = options.staticOAuthClientInfo
43+
this._state = randomUUID()
4144
}
4245

4346
get redirectUrl(): string {
@@ -58,6 +61,10 @@ export class NodeOAuthClientProvider implements OAuthClientProvider {
5861
}
5962
}
6063

64+
state(): string {
65+
return this._state
66+
}
67+
6168
/**
6269
* Gets the client information if it exists
6370
* @returns The client information or undefined

0 commit comments

Comments
 (0)