Skip to content

Commit bbff5c5

Browse files
authored
Merge branch 'main' into cli-and-config-file-support
2 parents 8423776 + 645a256 commit bbff5c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2005
-793
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Thanks for your interest in contributing! This guide explains how to get involve
77
1. Fork the repository and clone it locally
88
2. Install dependencies with `npm install`
99
3. Run `npm run dev` to start both client and server in development mode
10-
4. Use the web UI at http://127.0.0.1:5173 to interact with the inspector
10+
4. Use the web UI at http://127.0.0.1:6274 to interact with the inspector
1111

1212
## Development Process & Pull Requests
1313

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The MCP inspector is a developer tool for testing and debugging MCP servers.
44

5-
![MCP Inspector Screenshot](mcp-inspector.png)
5+
![MCP Inspector Screenshot](https://raw.githubusercontent.com/modelcontextprotocol/inspector/main/mcp-inspector.png)
66

77
## Running the Inspector
88

@@ -30,7 +30,7 @@ npx @modelcontextprotocol/inspector -e key=value -e key2=$VALUE2 node build/inde
3030
npx @modelcontextprotocol/inspector -e key=$VALUE -- node build/index.js -e server-flag
3131
```
3232

33-
The inspector runs both a client UI (default port 5173) and an MCP proxy server (default port 3000). Open the client UI in your browser to use the inspector. You can customize the ports if needed:
33+
The inspector runs both an MCP Inspector (MCPI) client UI (default port 6274) and an MCP Proxy (MCPP) server (default port 6277). Open the MCPI client UI in your browser to use the inspector. (These ports are derived from the T9 dialpad mapping of MCPI and MCPP respectively, as a mnemonic). You can customize the ports if needed:
3434

3535
```bash
3636
CLIENT_PORT=8080 SERVER_PORT=9000 npx @modelcontextprotocol/inspector node build/index.js
@@ -50,9 +50,14 @@ The MCP Inspector includes a proxy server that can run and communicate with loca
5050

5151
The MCP Inspector supports the following configuration settings. To change them, click on the `Configuration` button in the MCP Inspector UI:
5252

53-
| Name | Purpose | Default Value |
54-
| -------------------------- | ----------------------------------------------------------------------------------------- | ------------- |
55-
| MCP_SERVER_REQUEST_TIMEOUT | Maximum time in milliseconds to wait for a response from the MCP server before timing out | 10000 |
53+
| Setting | Description | Default |
54+
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------- |
55+
| `MCP_SERVER_REQUEST_TIMEOUT` | Timeout for requests to the MCP server (ms) | 10000 |
56+
| `MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS` | Reset timeout on progress notifications | true |
57+
| `MCP_REQUEST_MAX_TOTAL_TIMEOUT` | Maximum total timeout for requests sent to the MCP server (ms) (Use with progress notifications) | 60000 |
58+
| `MCP_PROXY_FULL_ADDRESS` | Set this if you are running the MCP Inspector Proxy on a non-default address. Example: http://10.1.1.22:5577 | "" |
59+
60+
These settings can be adjusted in real-time through the UI and will persist across sessions.
5661

5762
The inspector also supports configuration files to store settings for different MCP servers. This is useful when working with multiple servers or complex configurations:
5863

bin/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function handleError(error) {
1919
process.exit(1);
2020
}
2121
function delay(ms) {
22-
return new Promise((resolve) => setTimeout(resolve, ms));
22+
return new Promise((resolve) => setTimeout(resolve, ms, true));
2323
}
2424
async function runWebClient(args) {
2525
const inspectorServerPath = resolve(

client/bin/cli.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,19 @@ const server = http.createServer((request, response) => {
1515
});
1616
});
1717

18-
const port = process.env.PORT || 5173;
19-
server.listen(port, () => {});
18+
const port = process.env.PORT || 6274;
19+
server.on("listening", () => {
20+
console.log(
21+
`🔍 MCP Inspector is up and running at http://127.0.0.1:${port} 🚀`,
22+
);
23+
});
24+
server.on("error", (err) => {
25+
if (err.message.includes(`EADDRINUSE`)) {
26+
console.error(
27+
`❌ MCP Inspector PORT IS IN USE at http://127.0.0.1:${port} ❌ `,
28+
);
29+
} else {
30+
throw err;
31+
}
32+
});
33+
server.listen(port);

client/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector-client",
3-
"version": "0.7.0",
3+
"version": "0.8.2",
44
"description": "Client-side application for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",
@@ -18,12 +18,12 @@
1818
"dev": "vite",
1919
"build": "tsc -b && vite build",
2020
"lint": "eslint .",
21-
"preview": "vite preview",
21+
"preview": "vite preview --port 6274",
2222
"test": "jest --config jest.config.cjs",
2323
"test:watch": "jest --config jest.config.cjs --watch"
2424
},
2525
"dependencies": {
26-
"@modelcontextprotocol/sdk": "^1.6.1",
26+
"@modelcontextprotocol/sdk": "^1.9.0",
2727
"@radix-ui/react-checkbox": "^1.1.4",
2828
"@radix-ui/react-dialog": "^1.1.3",
2929
"@radix-ui/react-icons": "^1.3.0",
@@ -32,7 +32,8 @@
3232
"@radix-ui/react-select": "^2.1.2",
3333
"@radix-ui/react-slot": "^1.1.0",
3434
"@radix-ui/react-tabs": "^1.1.1",
35-
"@types/prismjs": "^1.26.5",
35+
"@radix-ui/react-toast": "^1.2.6",
36+
"@radix-ui/react-tooltip": "^1.1.8",
3637
"class-variance-authority": "^0.7.0",
3738
"clsx": "^2.1.1",
3839
"cmdk": "^1.0.4",
@@ -42,7 +43,6 @@
4243
"react": "^18.3.1",
4344
"react-dom": "^18.3.1",
4445
"react-simple-code-editor": "^0.14.1",
45-
"react-toastify": "^10.0.6",
4646
"serve-handler": "^6.1.6",
4747
"tailwind-merge": "^2.5.3",
4848
"tailwindcss-animate": "^1.0.7",
@@ -54,6 +54,7 @@
5454
"@testing-library/react": "^16.2.0",
5555
"@types/jest": "^29.5.14",
5656
"@types/node": "^22.7.5",
57+
"@types/prismjs": "^1.26.5",
5758
"@types/react": "^18.3.10",
5859
"@types/react-dom": "^18.3.0",
5960
"@types/serve-handler": "^6.1.4",

0 commit comments

Comments
 (0)