@modelcontextprotocol/inspector 0.1.6 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -15
- package/bin/cli.js +8 -3
- package/client/bin/cli.js +1 -3
- package/client/dist/assets/index-D0KYkwsv.js +190 -0
- package/client/dist/assets/{index-DJlejpJa.css → index-DSYhznMv.css} +1 -1
- package/client/dist/index.html +3 -3
- package/client/dist/mcp.svg +12 -0
- package/package.json +6 -5
- package/server/build/index.js +19 -5
- package/client/dist/assets/index-D-ByN_8f.js +0 -195
- package/client/dist/vite.svg +0 -1
- package/server/build/client.js +0 -76
package/README.md
CHANGED
|
@@ -2,25 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
The MCP inspector is a developer tool for testing and debugging MCP servers.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
It can be run easily from `npx`. For example, in a folder where there's a built JavaScript server at `build/index.js`:
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
npm install
|
|
7
|
+
```
|
|
8
|
+
npx @modelcontextprotocol/inspector build/index.js
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
You can
|
|
11
|
+
You can also pass arguments along to the server:
|
|
14
12
|
|
|
15
|
-
```
|
|
16
|
-
|
|
13
|
+
```
|
|
14
|
+
npx @modelcontextprotocol/inspector build/index.js arg1 arg2 ...
|
|
17
15
|
```
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
To run in production mode:
|
|
17
|
+
## License
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
npm run build
|
|
25
|
-
npm start
|
|
26
|
-
```
|
|
19
|
+
This project is licensed under the MIT License—see the [LICENSE](LICENSE) file for details.
|
package/bin/cli.js
CHANGED
|
@@ -34,16 +34,17 @@ const serverCommand = [
|
|
|
34
34
|
.filter(Boolean)
|
|
35
35
|
.join(" ");
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
const CLIENT_PORT = process.env.CLIENT_PORT ?? "";
|
|
38
|
+
const SERVER_PORT = process.env.SERVER_PORT ?? "";
|
|
38
39
|
|
|
39
40
|
const { result } = concurrently(
|
|
40
41
|
[
|
|
41
42
|
{
|
|
42
|
-
command: serverCommand
|
|
43
|
+
command: `PORT=${SERVER_PORT} ${serverCommand}`,
|
|
43
44
|
name: "server",
|
|
44
45
|
},
|
|
45
46
|
{
|
|
46
|
-
command: `node ${inspectorClientPath}`,
|
|
47
|
+
command: `PORT=${CLIENT_PORT} node ${inspectorClientPath}`,
|
|
47
48
|
name: "client",
|
|
48
49
|
},
|
|
49
50
|
],
|
|
@@ -54,6 +55,10 @@ const { result } = concurrently(
|
|
|
54
55
|
},
|
|
55
56
|
);
|
|
56
57
|
|
|
58
|
+
console.log(
|
|
59
|
+
`\n🔍 MCP Inspector is up and running at http://localhost:${CLIENT_PORT || 5173} 🚀`,
|
|
60
|
+
);
|
|
61
|
+
|
|
57
62
|
result.catch((err) => {
|
|
58
63
|
console.error("An error occurred:", err);
|
|
59
64
|
process.exit(1);
|
package/client/bin/cli.js
CHANGED