@modelcontextprotocol/inspector 0.7.0 → 0.8.1
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 +14 -1
- package/bin/cli.js +36 -38
- package/client/bin/cli.js +16 -2
- package/client/dist/assets/{OAuthCallback-C5xCfXlk.js → OAuthCallback-C-gED7Cw.js} +1 -1
- package/client/dist/assets/{index-Dt6l7sEy.css → index-CRtFq5fi.css} +252 -735
- package/client/dist/assets/{index-D7o7JmLV.js → index-D8hlx_TY.js} +13630 -12271
- package/client/dist/index.html +2 -2
- package/package.json +5 -3
- package/server/build/index.js +20 -13
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-D8hlx_TY.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CRtFq5fi.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.1",
|
|
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,11 +32,12 @@
|
|
|
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.1",
|
|
40
|
+
"@modelcontextprotocol/inspector-server": "^0.8.1",
|
|
39
41
|
"concurrently": "^9.0.1",
|
|
40
42
|
"shell-quote": "^1.8.2",
|
|
41
43
|
"spawn-rx": "^5.1.2",
|
package/server/build/index.js
CHANGED
|
@@ -74,11 +74,12 @@ const createTransport = async (req) => {
|
|
|
74
74
|
throw new Error("Invalid transport type specified");
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
+
let backingServerTransport;
|
|
77
78
|
app.get("/sse", async (req, res) => {
|
|
78
79
|
try {
|
|
79
80
|
console.log("New SSE connection");
|
|
80
|
-
let backingServerTransport;
|
|
81
81
|
try {
|
|
82
|
+
await backingServerTransport?.close();
|
|
82
83
|
backingServerTransport = await createTransport(req);
|
|
83
84
|
}
|
|
84
85
|
catch (error) {
|
|
@@ -133,6 +134,11 @@ app.post("/message", async (req, res) => {
|
|
|
133
134
|
res.status(500).json(error);
|
|
134
135
|
}
|
|
135
136
|
});
|
|
137
|
+
app.get("/health", (req, res) => {
|
|
138
|
+
res.json({
|
|
139
|
+
status: "ok",
|
|
140
|
+
});
|
|
141
|
+
});
|
|
136
142
|
app.get("/config", (req, res) => {
|
|
137
143
|
try {
|
|
138
144
|
res.json({
|
|
@@ -146,16 +152,17 @@ app.get("/config", (req, res) => {
|
|
|
146
152
|
res.status(500).json(error);
|
|
147
153
|
}
|
|
148
154
|
});
|
|
149
|
-
const PORT = process.env.PORT ||
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
|
|
155
|
+
const PORT = process.env.PORT || 6277;
|
|
156
|
+
const server = app.listen(PORT);
|
|
157
|
+
server.on("listening", () => {
|
|
158
|
+
console.log(`⚙️ Proxy server listening on port ${PORT}`);
|
|
159
|
+
});
|
|
160
|
+
server.on("error", (err) => {
|
|
161
|
+
if (err.message.includes(`EADDRINUSE`)) {
|
|
162
|
+
console.error(`❌ Proxy Server PORT IS IN USE at port ${PORT} ❌ `);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
console.error(err.message);
|
|
166
|
+
}
|
|
160
167
|
process.exit(1);
|
|
161
|
-
}
|
|
168
|
+
});
|