Skip to content

Commit 95f16e3

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/npm_and_yarn-73ea615029
2 parents a1e04c7 + 5d0d1c0 commit 95f16e3

37 files changed

+3451
-914
lines changed
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
**Inspector Version**
10+
1111
- [e.g. 0.16.5)
1212

1313
**Describe the bug**
1414
A clear and concise description of what the bug is.
1515

1616
**To Reproduce**
1717
Steps to reproduce the behavior:
18+
1819
1. Go to '...'
1920
2. Click on '....'
2021
3. Scroll down to '....'
@@ -27,8 +28,9 @@ A clear and concise description of what you expected to happen.
2728
If applicable, add screenshots to help explain your problem.
2829

2930
**Environment (please complete the following information):**
30-
- OS: [e.g. iOS]
31-
- Browser [e.g. chrome, safari]
31+
32+
- OS: [e.g. iOS]
33+
- Browser [e.g. chrome, safari]
3234

3335
**Additional context**
3436
Add any other context about the problem here.

AGENTS.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# MCP Inspector Development Guide
2+
3+
## Build Commands
4+
5+
- Build all: `npm run build`
6+
- Build client: `npm run build-client`
7+
- Build server: `npm run build-server`
8+
- Development mode: `npm run dev` (use `npm run dev:windows` on Windows)
9+
- Format code: `npm run prettier-fix`
10+
- Client lint: `cd client && npm run lint`
11+
12+
## Code Style Guidelines
13+
14+
- Use TypeScript with proper type annotations
15+
- Follow React functional component patterns with hooks
16+
- Use ES modules (import/export) not CommonJS
17+
- Use Prettier for formatting (auto-formatted on commit)
18+
- Follow existing naming conventions:
19+
- camelCase for variables and functions
20+
- PascalCase for component names and types
21+
- kebab-case for file names
22+
- Use async/await for asynchronous operations
23+
- Implement proper error handling with try/catch blocks
24+
- Use Tailwind CSS for styling in the client
25+
- Keep components small and focused on a single responsibility
26+
27+
## Project Organization
28+
29+
The project is organized as a monorepo with workspaces:
30+
31+
- `client/`: React frontend with Vite, TypeScript and Tailwind
32+
- `server/`: Express backend with TypeScript
33+
- `cli/`: Command-line interface for testing and invoking MCP server methods directly

CLAUDE.md

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1 @@
1-
# MCP Inspector Development Guide
2-
3-
## Build Commands
4-
5-
- Build all: `npm run build`
6-
- Build client: `npm run build-client`
7-
- Build server: `npm run build-server`
8-
- Development mode: `npm run dev` (use `npm run dev:windows` on Windows)
9-
- Format code: `npm run prettier-fix`
10-
- Client lint: `cd client && npm run lint`
11-
12-
## Code Style Guidelines
13-
14-
- Use TypeScript with proper type annotations
15-
- Follow React functional component patterns with hooks
16-
- Use ES modules (import/export) not CommonJS
17-
- Use Prettier for formatting (auto-formatted on commit)
18-
- Follow existing naming conventions:
19-
- camelCase for variables and functions
20-
- PascalCase for component names and types
21-
- kebab-case for file names
22-
- Use async/await for asynchronous operations
23-
- Implement proper error handling with try/catch blocks
24-
- Use Tailwind CSS for styling in the client
25-
- Keep components small and focused on a single responsibility
26-
27-
## Project Organization
28-
29-
The project is organized as a monorepo with workspaces:
30-
31-
- `client/`: React frontend with Vite, TypeScript and Tailwind
32-
- `server/`: Express backend with TypeScript
33-
- `cli/`: Command-line interface for testing and invoking MCP server methods directly
1+
@./AGENTS.md

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ The MCP Inspector provides convenient buttons to export server launch configurat
9898
}
9999
```
100100

101+
**Streamable HTTP transport example:**
102+
103+
```json
104+
{
105+
"type": "streamable-http",
106+
"url": "http://localhost:3000/mcp",
107+
"note": "For Streamable HTTP connections, add this URL directly in your MCP Client"
108+
}
109+
```
110+
101111
- **Servers File** - Copies a complete MCP configuration file structure to your clipboard, with your current server configuration added as `default-server`. This can be saved directly as `mcp.json`.
102112

103113
**STDIO transport example:**
@@ -131,9 +141,23 @@ The MCP Inspector provides convenient buttons to export server launch configurat
131141
}
132142
```
133143

144+
**Streamable HTTP transport example:**
145+
146+
```json
147+
{
148+
"mcpServers": {
149+
"default-server": {
150+
"type": "streamable-http",
151+
"url": "http://localhost:3000/mcp",
152+
"note": "For Streamable HTTP connections, add this URL directly in your MCP Client"
153+
}
154+
}
155+
}
156+
```
157+
134158
These buttons appear in the Inspector UI after you've configured your server settings, making it easy to save and reuse your configurations.
135159

136-
For SSE transport connections, the Inspector provides similar functionality for both buttons. The "Server Entry" button copies the SSE URL configuration that can be added to your existing configuration file, while the "Servers File" button creates a complete configuration file containing the SSE URL for direct use in clients.
160+
For SSE and Streamable HTTP transport connections, the Inspector provides similar functionality for both buttons. The "Server Entry" button copies the configuration that can be added to your existing configuration file, while the "Servers File" button creates a complete configuration file containing the URL for direct use in clients.
137161

138162
You can paste the Server Entry into your existing `mcp.json` file under your chosen server name, or use the complete Servers File payload to create a new configuration file.
139163

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.6",
3+
"version": "0.17.0",
44
"description": "CLI for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",
@@ -24,7 +24,7 @@
2424
},
2525
"devDependencies": {},
2626
"dependencies": {
27-
"@modelcontextprotocol/sdk": "^1.17.5",
27+
"@modelcontextprotocol/sdk": "^1.18.0",
2828
"commander": "^13.1.0",
2929
"spawn-rx": "^5.1.2"
3030
}

cli/src/index.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env node
22

3+
import * as fs from "fs";
34
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
45
import { Command } from "commander";
56
import {
@@ -99,16 +100,27 @@ function createTransportOptions(
99100
}
100101

101102
async function callMethod(args: Args): Promise<void> {
103+
// Read package.json to get name and version for client identity
104+
const pathA = "../package.json"; // We're in package @modelcontextprotocol/inspector-cli
105+
const pathB = "../../package.json"; // We're in package @modelcontextprotocol/inspector
106+
let packageJson: { name: string; version: string };
107+
let packageJsonData = await import(fs.existsSync(pathA) ? pathA : pathB, {
108+
with: { type: "json" },
109+
});
110+
packageJson = packageJsonData.default;
111+
102112
const transportOptions = createTransportOptions(
103113
args.target,
104114
args.transport,
105115
args.headers,
106116
);
107117
const transport = createTransport(transportOptions);
108-
const client = new Client({
109-
name: "inspector-cli",
110-
version: "0.5.1",
111-
});
118+
119+
const [, name = packageJson.name] = packageJson.name.split("/");
120+
const version = packageJson.version;
121+
const clientIdentity = { name, version };
122+
123+
const client = new Client(clientIdentity);
112124

113125
try {
114126
await connect(client, transport);

client/package.json

Lines changed: 4 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.6",
3+
"version": "0.17.0",
44
"description": "Client-side application for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",
@@ -25,14 +25,15 @@
2525
"cleanup:e2e": "node e2e/global-teardown.js"
2626
},
2727
"dependencies": {
28-
"@modelcontextprotocol/sdk": "^1.17.5",
28+
"@modelcontextprotocol/sdk": "^1.18.0",
2929
"@radix-ui/react-checkbox": "^1.1.4",
3030
"@radix-ui/react-dialog": "^1.1.3",
3131
"@radix-ui/react-icons": "^1.3.0",
3232
"@radix-ui/react-label": "^2.1.0",
3333
"@radix-ui/react-popover": "^1.1.3",
3434
"@radix-ui/react-select": "^2.1.2",
3535
"@radix-ui/react-slot": "^1.1.0",
36+
"@radix-ui/react-switch": "^1.2.6",
3637
"@radix-ui/react-tabs": "^1.1.1",
3738
"@radix-ui/react-toast": "^1.2.6",
3839
"@radix-ui/react-tooltip": "^1.1.8",
@@ -69,6 +70,7 @@
6970
"globals": "^15.9.0",
7071
"jest": "^29.7.0",
7172
"jest-environment-jsdom": "^29.7.0",
73+
"jest-fixed-jsdom": "^0.0.9",
7274
"postcss": "^8.5.6",
7375
"tailwindcss": "^3.4.13",
7476
"tailwindcss-animate": "^1.0.7",

0 commit comments

Comments
 (0)