Skip to content

Commit 87700e6

Browse files
authored
Merge branch 'main' into 7-20-losing-resource-bug
2 parents 3eaf23c + aa6a98a commit 87700e6

34 files changed

+2698
-456
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.16.1",
3+
"version": "0.16.2",
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.13.1",
24+
"@modelcontextprotocol/sdk": "^1.17.0",
2525
"commander": "^13.1.0",
2626
"spawn-rx": "^5.1.2"
2727
}

cli/src/cli.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,21 @@ async function runWebClient(args: Args): Promise<void> {
6666
abort.abort();
6767
});
6868

69+
// Build arguments to pass to start.js
70+
const startArgs: string[] = [];
71+
72+
// Pass environment variables
73+
for (const [key, value] of Object.entries(args.envArgs)) {
74+
startArgs.push("-e", `${key}=${value}`);
75+
}
76+
77+
// Pass command and args (using -- to separate them)
78+
if (args.command) {
79+
startArgs.push("--", args.command, ...args.args);
80+
}
81+
6982
try {
70-
await spawnPromise("node", [inspectorClientPath], {
83+
await spawnPromise("node", [inspectorClientPath, ...startArgs], {
7184
signal: abort.signal,
7285
echoOutput: true,
7386
});

cli/src/client/connection.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ export async function connect(
1818
): Promise<void> {
1919
try {
2020
await client.connect(transport);
21+
22+
if (client.getServerCapabilities()?.logging) {
23+
// default logging level is undefined in the spec, but the user of the
24+
// inspector most likely wants debug.
25+
await client.setLoggingLevel("debug");
26+
}
2127
} catch (error) {
2228
throw new Error(
2329
`Failed to connect to MCP server: ${error instanceof Error ? error.message : String(error)}`,

client/bin/start.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ async function startProdServer(serverOptions) {
9191
"node",
9292
[
9393
inspectorServerPath,
94-
...(command ? [`--env`, command] : []),
95-
...(mcpServerArgs ? [`--args=${mcpServerArgs.join(" ")}`] : []),
94+
...(command ? [`--command=${command}`] : []),
95+
...(mcpServerArgs && mcpServerArgs.length > 0
96+
? [`--args=${mcpServerArgs.join(" ")}`]
97+
: []),
9698
],
9799
{
98100
env: {

client/e2e/startup-state.spec.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { test, expect } from "@playwright/test";
2+
3+
// Adjust the URL if your dev server runs on a different port
4+
const APP_URL = "http://localhost:6274/";
5+
6+
test.describe("Startup State", () => {
7+
test("should not navigate to a tab when Inspector first opens", async ({
8+
page,
9+
}) => {
10+
await page.goto(APP_URL);
11+
12+
// Check that there is no hash fragment in the URL
13+
const url = page.url();
14+
expect(url).not.toContain("#");
15+
});
16+
});

client/jest.config.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ module.exports = {
3232
"/e2e/",
3333
"\\.config\\.(js|ts|cjs|mjs)$",
3434
],
35+
randomize: true,
3536
};

client/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector-client",
3-
"version": "0.16.1",
3+
"version": "0.16.2",
44
"description": "Client-side application for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",
@@ -25,9 +25,8 @@
2525
"cleanup:e2e": "node e2e/global-teardown.js"
2626
},
2727
"dependencies": {
28-
"@modelcontextprotocol/sdk": "^1.13.1",
28+
"@modelcontextprotocol/sdk": "^1.17.0",
2929
"@radix-ui/react-checkbox": "^1.1.4",
30-
"ajv": "^6.12.6",
3130
"@radix-ui/react-dialog": "^1.1.3",
3231
"@radix-ui/react-icons": "^1.3.0",
3332
"@radix-ui/react-label": "^2.1.0",
@@ -37,6 +36,7 @@
3736
"@radix-ui/react-tabs": "^1.1.1",
3837
"@radix-ui/react-toast": "^1.2.6",
3938
"@radix-ui/react-tooltip": "^1.1.8",
39+
"ajv": "^6.12.6",
4040
"class-variance-authority": "^0.7.0",
4141
"clsx": "^2.1.1",
4242
"cmdk": "^1.0.4",
@@ -49,19 +49,19 @@
4949
"serve-handler": "^6.1.6",
5050
"tailwind-merge": "^2.5.3",
5151
"tailwindcss-animate": "^1.0.7",
52-
"zod": "^3.23.8"
52+
"zod": "^3.25.76"
5353
},
5454
"devDependencies": {
5555
"@eslint/js": "^9.11.1",
5656
"@testing-library/jest-dom": "^6.6.3",
5757
"@testing-library/react": "^16.2.0",
5858
"@types/jest": "^29.5.14",
59-
"@types/node": "^22.7.5",
59+
"@types/node": "^22.17.0",
6060
"@types/prismjs": "^1.26.5",
61-
"@types/react": "^18.3.10",
61+
"@types/react": "^18.3.23",
6262
"@types/react-dom": "^18.3.0",
6363
"@types/serve-handler": "^6.1.4",
64-
"@vitejs/plugin-react": "^4.3.2",
64+
"@vitejs/plugin-react": "^4.7.0",
6565
"autoprefixer": "^10.4.20",
6666
"co": "^4.6.0",
6767
"eslint": "^9.11.1",
@@ -70,11 +70,11 @@
7070
"globals": "^15.9.0",
7171
"jest": "^29.7.0",
7272
"jest-environment-jsdom": "^29.7.0",
73-
"postcss": "^8.4.47",
73+
"postcss": "^8.5.6",
7474
"tailwindcss": "^3.4.13",
75-
"ts-jest": "^29.2.6",
75+
"ts-jest": "^29.4.0",
7676
"typescript": "^5.5.3",
77-
"typescript-eslint": "^8.7.0",
78-
"vite": "^6.3.0"
77+
"typescript-eslint": "^8.38.0",
78+
"vite": "^6.3.5"
7979
}
8080
}

0 commit comments

Comments
 (0)