@modelcontextprotocol/inspector 0.6.0 → 0.8.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 +13 -1
- package/bin/cli.js +44 -40
- package/client/bin/cli.js +16 -2
- package/client/dist/assets/{OAuthCallback-KG5AbO62.js → OAuthCallback-DrQsfqzq.js} +1 -1
- package/client/dist/assets/{index-Dt6l7sEy.css → index-BxIjx6su.css} +59 -12
- package/client/dist/assets/{index-BK1TrpAN.js → index-DrNN0pLZ.js} +1382 -866
- package/client/dist/index.html +2 -2
- package/package.json +6 -3
- package/server/build/index.js +18 -14
package/client/dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/mcp.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>MCP Inspector</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DrNN0pLZ.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BxIjx6su.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modelcontextprotocol/inspector",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Model Context Protocol inspector",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Anthropic, PBC (https://anthropic.com)",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"scripts": {
|
|
24
24
|
"dev": "concurrently \"cd client && npm run dev\" \"cd server && npm run dev\"",
|
|
25
25
|
"dev:windows": "concurrently \"cd client && npm run dev\" \"cd server && npm run dev:windows",
|
|
26
|
+
"test": "npm run prettier-check && cd client && npm test",
|
|
26
27
|
"build-server": "cd server && npm run build",
|
|
27
28
|
"build-client": "cd client && npm run build",
|
|
28
29
|
"build": "npm run build-server && npm run build-client",
|
|
@@ -31,17 +32,19 @@
|
|
|
31
32
|
"start": "node ./bin/cli.js",
|
|
32
33
|
"prepare": "npm run build",
|
|
33
34
|
"prettier-fix": "prettier --write .",
|
|
35
|
+
"prettier-check": "prettier --check .",
|
|
34
36
|
"publish-all": "npm publish --workspaces --access public && npm publish --access public"
|
|
35
37
|
},
|
|
36
38
|
"dependencies": {
|
|
37
|
-
"@modelcontextprotocol/inspector-client": "^0.
|
|
38
|
-
"@modelcontextprotocol/inspector-server": "^0.
|
|
39
|
+
"@modelcontextprotocol/inspector-client": "^0.8.0",
|
|
40
|
+
"@modelcontextprotocol/inspector-server": "^0.8.0",
|
|
39
41
|
"concurrently": "^9.0.1",
|
|
40
42
|
"shell-quote": "^1.8.2",
|
|
41
43
|
"spawn-rx": "^5.1.2",
|
|
42
44
|
"ts-node": "^10.9.2"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
47
|
+
"@types/jest": "^29.5.14",
|
|
45
48
|
"@types/node": "^22.7.5",
|
|
46
49
|
"@types/shell-quote": "^1.7.5",
|
|
47
50
|
"prettier": "3.3.3"
|
package/server/build/index.js
CHANGED
|
@@ -46,7 +46,9 @@ const createTransport = async (req) => {
|
|
|
46
46
|
}
|
|
47
47
|
else if (transportType === "sse") {
|
|
48
48
|
const url = query.url;
|
|
49
|
-
const headers = {
|
|
49
|
+
const headers = {
|
|
50
|
+
Accept: "text/event-stream",
|
|
51
|
+
};
|
|
50
52
|
for (const key of SSE_HEADERS_PASSTHROUGH) {
|
|
51
53
|
if (req.headers[key] === undefined) {
|
|
52
54
|
continue;
|
|
@@ -72,11 +74,12 @@ const createTransport = async (req) => {
|
|
|
72
74
|
throw new Error("Invalid transport type specified");
|
|
73
75
|
}
|
|
74
76
|
};
|
|
77
|
+
let backingServerTransport;
|
|
75
78
|
app.get("/sse", async (req, res) => {
|
|
76
79
|
try {
|
|
77
80
|
console.log("New SSE connection");
|
|
78
|
-
let backingServerTransport;
|
|
79
81
|
try {
|
|
82
|
+
await backingServerTransport?.close();
|
|
80
83
|
backingServerTransport = await createTransport(req);
|
|
81
84
|
}
|
|
82
85
|
catch (error) {
|
|
@@ -144,16 +147,17 @@ app.get("/config", (req, res) => {
|
|
|
144
147
|
res.status(500).json(error);
|
|
145
148
|
}
|
|
146
149
|
});
|
|
147
|
-
const PORT = process.env.PORT ||
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
150
|
+
const PORT = process.env.PORT || 6277;
|
|
151
|
+
const server = app.listen(PORT);
|
|
152
|
+
server.on("listening", () => {
|
|
153
|
+
console.log(`⚙️ Proxy server listening on port ${PORT}`);
|
|
154
|
+
});
|
|
155
|
+
server.on("error", (err) => {
|
|
156
|
+
if (err.message.includes(`EADDRINUSE`)) {
|
|
157
|
+
console.error(`❌ Proxy Server PORT IS IN USE at port ${PORT} ❌ `);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
console.error(err.message);
|
|
161
|
+
}
|
|
158
162
|
process.exit(1);
|
|
159
|
-
}
|
|
163
|
+
});
|