Skip to content

Commit efa4959

Browse files
authored
Merge branch 'main' into main
2 parents 3232c0e + ec24f7b commit efa4959

File tree

10 files changed

+111
-52
lines changed

10 files changed

+111
-52
lines changed

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.12.0",
3+
"version": "0.13.0",
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.11.0",
24+
"@modelcontextprotocol/sdk": "^1.11.5",
2525
"commander": "^13.1.0",
2626
"spawn-rx": "^5.1.2"
2727
}

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.12.0",
3+
"version": "0.13.0",
44
"description": "Client-side application for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",
@@ -23,7 +23,7 @@
2323
"test:watch": "jest --config jest.config.cjs --watch"
2424
},
2525
"dependencies": {
26-
"@modelcontextprotocol/sdk": "^1.11.0",
26+
"@modelcontextprotocol/sdk": "^1.11.5",
2727
"@radix-ui/react-checkbox": "^1.1.4",
2828
"@radix-ui/react-dialog": "^1.1.3",
2929
"@radix-ui/react-icons": "^1.3.0",

client/src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ const App = () => {
234234
const onOAuthConnect = useCallback(
235235
(serverUrl: string) => {
236236
setSseUrl(serverUrl);
237-
setTransportType("sse");
238237
setIsAuthDebuggerVisible(false);
239238
void connectMcpServer();
240239
},

client/src/components/Sidebar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ const Sidebar = ({
127127
return {
128128
type: "sse",
129129
url: sseUrl,
130-
note: "For SSE connections, add this URL directly in Client",
130+
note: "For SSE connections, add this URL directly in your MCP Client",
131131
};
132132
}
133133
if (transportType === "streamable-http") {
134134
return {
135135
type: "streamable-http",
136136
url: sseUrl,
137-
note: "For Streamable HTTP connections, add this URL directly in Client",
137+
note: "For Streamable HTTP connections, add this URL directly in your MCP Client",
138138
};
139139
}
140140
return {};
@@ -172,7 +172,7 @@ const Sidebar = ({
172172
description:
173173
transportType === "stdio"
174174
? "Server configuration has been copied to clipboard. Add this to your mcp.json inside the 'mcpServers' object with your preferred server name."
175-
: "SSE URL has been copied. Use this URL in Cursor directly.",
175+
: "SSE URL has been copied. Use this URL directly in your MCP Client.",
176176
});
177177

178178
setTimeout(() => {

client/src/components/__tests__/Sidebar.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ describe("Sidebar Environment Variables", () => {
755755
{
756756
type: "sse",
757757
url: sseUrl,
758-
note: "For SSE connections, add this URL directly in Client",
758+
note: "For SSE connections, add this URL directly in your MCP Client",
759759
},
760760
null,
761761
4,
@@ -780,7 +780,7 @@ describe("Sidebar Environment Variables", () => {
780780
"default-server": {
781781
type: "sse",
782782
url: sseUrl,
783-
note: "For SSE connections, add this URL directly in Client",
783+
note: "For SSE connections, add this URL directly in your MCP Client",
784784
},
785785
},
786786
},
@@ -805,7 +805,7 @@ describe("Sidebar Environment Variables", () => {
805805
{
806806
type: "streamable-http",
807807
url: sseUrl,
808-
note: "For Streamable HTTP connections, add this URL directly in Client",
808+
note: "For Streamable HTTP connections, add this URL directly in your MCP Client",
809809
},
810810
null,
811811
4,
@@ -830,7 +830,7 @@ describe("Sidebar Environment Variables", () => {
830830
"default-server": {
831831
type: "streamable-http",
832832
url: sseUrl,
833-
note: "For Streamable HTTP connections, add this URL directly in Client",
833+
note: "For Streamable HTTP connections, add this URL directly in your MCP Client",
834834
},
835835
},
836836
},

client/src/lib/hooks/useConnection.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,16 @@ export function useConnection({
249249
}
250250
};
251251

252+
const is401Error = (error: unknown): boolean => {
253+
return (
254+
(error instanceof SseError && error.code === 401) ||
255+
(error instanceof Error && error.message.includes("401")) ||
256+
(error instanceof Error && error.message.includes("Unauthorized"))
257+
);
258+
};
259+
252260
const handleAuthError = async (error: unknown) => {
253-
if (error instanceof SseError && error.code === 401) {
254-
// Create a new auth provider with the current server URL
261+
if (is401Error(error)) {
255262
const serverAuthProvider = new InspectorOAuthClientProvider(sseUrl);
256263

257264
const result = await auth(serverAuthProvider, { serverUrl: sseUrl });
@@ -330,7 +337,6 @@ export function useConnection({
330337
mcpProxyServerUrl = new URL(`${getMCPProxyAddress(config)}/sse`);
331338
mcpProxyServerUrl.searchParams.append("url", sseUrl);
332339
transportOptions = {
333-
authProvider: serverAuthProvider,
334340
eventSourceInit: {
335341
fetch: (
336342
url: string | URL | globalThis.Request,
@@ -347,7 +353,6 @@ export function useConnection({
347353
mcpProxyServerUrl = new URL(`${getMCPProxyAddress(config)}/mcp`);
348354
mcpProxyServerUrl.searchParams.append("url", sseUrl);
349355
transportOptions = {
350-
authProvider: serverAuthProvider,
351356
eventSourceInit: {
352357
fetch: (
353358
url: string | URL | globalThis.Request,
@@ -425,13 +430,14 @@ export function useConnection({
425430
`Failed to connect to MCP Server via the MCP Inspector Proxy: ${mcpProxyServerUrl}:`,
426431
error,
427432
);
433+
428434
const shouldRetry = await handleAuthError(error);
429435
if (shouldRetry) {
430436
return connect(undefined, retryCount + 1);
431437
}
432-
433-
if (error instanceof SseError && error.code === 401) {
438+
if (is401Error(error)) {
434439
// Don't set error state if we're about to redirect for auth
440+
435441
return;
436442
}
437443
throw error;

package-lock.json

Lines changed: 65 additions & 26 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.12.0",
3+
"version": "0.13.0",
44
"description": "Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",
@@ -40,10 +40,10 @@
4040
"publish-all": "npm publish --workspaces --access public && npm publish --access public"
4141
},
4242
"dependencies": {
43-
"@modelcontextprotocol/inspector-cli": "^0.12.0",
44-
"@modelcontextprotocol/inspector-client": "^0.12.0",
45-
"@modelcontextprotocol/inspector-server": "^0.12.0",
46-
"@modelcontextprotocol/sdk": "^1.11.2",
43+
"@modelcontextprotocol/inspector-cli": "^0.13.0",
44+
"@modelcontextprotocol/inspector-client": "^0.13.0",
45+
"@modelcontextprotocol/inspector-server": "^0.13.0",
46+
"@modelcontextprotocol/sdk": "^1.11.5",
4747
"concurrently": "^9.0.1",
4848
"open": "^10.1.0",
4949
"shell-quote": "^1.8.2",

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.12.0",
3+
"version": "0.13.0",
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.11.0",
30+
"@modelcontextprotocol/sdk": "^1.11.5",
3131
"cors": "^2.8.5",
3232
"express": "^5.1.0",
3333
"ws": "^8.18.0",

0 commit comments

Comments
 (0)