Skip to content

Commit 610cbdd

Browse files
committed
Merge remote-tracking branch 'upstream/main' into setup-prettier-precommit
2 parents f7b1cd6 + 5011436 commit 610cbdd

File tree

11 files changed

+54
-32
lines changed

11 files changed

+54
-32
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,16 @@ If you need to disable authentication (NOT RECOMMENDED), you can set the `DANGER
166166
DANGEROUSLY_OMIT_AUTH=true npm start
167167
```
168168

169+
---
170+
171+
**🚨 WARNING 🚨**
172+
173+
Disabling authentication with `DANGEROUSLY_OMIT_AUTH` is incredibly dangerous! Disabling auth leaves your machine open to attack not just when exposed to the public internet, but also **via your web browser**. Meaning, visiting a malicious website OR viewing a malicious advertizement could allow an attacker to remotely compromise your computer. Do not disable this feature unless you truly understand the risks.
174+
175+
Read more about the risks of this vulnerability on Oligo's blog: [Critical RCE Vulnerability in Anthropic MCP Inspector - CVE-2025-49596](https://www.oligo.security/blog/critical-rce-vulnerability-in-anthropic-mcp-inspector-cve-2025-49596)
176+
177+
---
178+
169179
You can also set the token via the `MCP_PROXY_AUTH_TOKEN` environment variable when starting the server:
170180

171181
```bash

cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector-cli",
3-
"version": "0.16.4",
3+
"version": "0.16.5",
44
"description": "CLI for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",
@@ -21,7 +21,7 @@
2121
},
2222
"devDependencies": {},
2323
"dependencies": {
24-
"@modelcontextprotocol/sdk": "^1.17.2",
24+
"@modelcontextprotocol/sdk": "^1.17.3",
2525
"commander": "^13.1.0",
2626
"spawn-rx": "^5.1.2"
2727
}

cli/src/transport.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ function createStdioTransport(options: TransportOptions): Transport {
3232
const defaultEnv = getDefaultEnvironment();
3333

3434
const env: Record<string, string> = {
35-
...processEnv,
3635
...defaultEnv,
36+
...processEnv,
3737
};
3838

3939
const { cmd: actualCommand, args: actualArgs } = findActualExecutable(

client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector-client",
3-
"version": "0.16.4",
3+
"version": "0.16.5",
44
"description": "Client-side application for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",
@@ -25,7 +25,7 @@
2525
"cleanup:e2e": "node e2e/global-teardown.js"
2626
},
2727
"dependencies": {
28-
"@modelcontextprotocol/sdk": "^1.17.2",
28+
"@modelcontextprotocol/sdk": "^1.17.3",
2929
"@radix-ui/react-checkbox": "^1.1.4",
3030
"@radix-ui/react-dialog": "^1.1.3",
3131
"@radix-ui/react-icons": "^1.3.0",

client/src/lib/auth.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,15 @@ export const clearClientInformationFromSessionStorage = ({
102102
};
103103

104104
export class InspectorOAuthClientProvider implements OAuthClientProvider {
105-
constructor(protected serverUrl: string) {
105+
constructor(
106+
protected serverUrl: string,
107+
scope?: string,
108+
) {
109+
this.scope = scope;
106110
// Save the server URL to session storage
107111
sessionStorage.setItem(SESSION_KEYS.SERVER_URL, serverUrl);
108112
}
113+
scope: string | undefined;
109114

110115
get redirectUrl() {
111116
return window.location.origin + "/oauth/callback";
@@ -119,6 +124,7 @@ export class InspectorOAuthClientProvider implements OAuthClientProvider {
119124
response_types: ["code"],
120125
client_name: "MCP Inspector",
121126
client_uri: "https://github.com/modelcontextprotocol/inspector",
127+
scope: this.scope ?? "",
122128
};
123129
}
124130

client/src/lib/hooks/useConnection.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,6 @@ export function useConnection({
319319

320320
const handleAuthError = async (error: unknown) => {
321321
if (is401Error(error)) {
322-
const serverAuthProvider = new InspectorOAuthClientProvider(sseUrl);
323-
324322
let scope = oauthScope?.trim();
325323
if (!scope) {
326324
// Only discover resource metadata when we need to discover scopes
@@ -334,6 +332,10 @@ export function useConnection({
334332
}
335333
scope = await discoverScopes(sseUrl, resourceMetadata);
336334
}
335+
const serverAuthProvider = new InspectorOAuthClientProvider(
336+
sseUrl,
337+
scope,
338+
);
337339

338340
const result = await auth(serverAuthProvider, {
339341
serverUrl: sseUrl,

client/src/lib/oauth-state-machine.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,11 @@ export const oauthTransitions: Record<OAuthStep, StateTransition> = {
177177
authorizationCode: context.state.authorizationCode,
178178
codeVerifier,
179179
redirectUri: context.provider.redirectUrl,
180-
resource: context.state.resource ?? undefined,
180+
resource: context.state.resource
181+
? context.state.resource instanceof URL
182+
? context.state.resource
183+
: new URL(context.state.resource)
184+
: undefined,
181185
});
182186

183187
context.provider.saveTokens(tokens);

package-lock.json

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

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector",
3-
"version": "0.16.4",
3+
"version": "0.16.5",
44
"description": "Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",
@@ -47,10 +47,10 @@
4747
"check-version": "node scripts/check-version-consistency.js"
4848
},
4949
"dependencies": {
50-
"@modelcontextprotocol/inspector-cli": "^0.16.4",
51-
"@modelcontextprotocol/inspector-client": "^0.16.4",
52-
"@modelcontextprotocol/inspector-server": "^0.16.4",
53-
"@modelcontextprotocol/sdk": "^1.17.2",
50+
"@modelcontextprotocol/inspector-cli": "^0.16.5",
51+
"@modelcontextprotocol/inspector-client": "^0.16.5",
52+
"@modelcontextprotocol/inspector-server": "^0.16.5",
53+
"@modelcontextprotocol/sdk": "^1.17.3",
5454
"concurrently": "^9.2.0",
5555
"open": "^10.2.0",
5656
"shell-quote": "^1.8.3",

server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector-server",
3-
"version": "0.16.4",
3+
"version": "0.16.5",
44
"description": "Server-side application for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",
@@ -27,7 +27,7 @@
2727
"typescript": "^5.6.2"
2828
},
2929
"dependencies": {
30-
"@modelcontextprotocol/sdk": "^1.17.2",
30+
"@modelcontextprotocol/sdk": "^1.17.3",
3131
"cors": "^2.8.5",
3232
"express": "^5.1.0",
3333
"ws": "^8.18.0",

0 commit comments

Comments
 (0)