Fixed conflicts
This commit is contained in:
@@ -48,7 +48,7 @@ The MCP Inspector includes a proxy server that can run and communicate with loca
|
|||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
The MCP Inspector supports the following configuration settings. To change them click on the `Configuration` button in the MCP Inspector UI:
|
The MCP Inspector supports the following configuration settings. To change them, click on the `Configuration` button in the MCP Inspector UI:
|
||||||
|
|
||||||
| Name | Purpose | Default Value |
|
| Name | Purpose | Default Value |
|
||||||
| -------------------------- | ----------------------------------------------------------------------------------------- | ------------- |
|
| -------------------------- | ----------------------------------------------------------------------------------------- | ------------- |
|
||||||
|
|||||||
67
bin/cli.js
67
bin/cli.js
@@ -37,8 +37,8 @@ async function runWebClient(args) {
|
|||||||
"bin",
|
"bin",
|
||||||
"cli.js",
|
"cli.js",
|
||||||
);
|
);
|
||||||
const CLIENT_PORT = process.env.CLIENT_PORT ?? "5173";
|
const CLIENT_PORT = process.env.CLIENT_PORT ?? "6274";
|
||||||
const SERVER_PORT = process.env.SERVER_PORT ?? "3000";
|
const SERVER_PORT = process.env.SERVER_PORT ?? "6277";
|
||||||
console.log("Starting MCP inspector...");
|
console.log("Starting MCP inspector...");
|
||||||
const abort = new AbortController();
|
const abort = new AbortController();
|
||||||
let cancelled = false;
|
let cancelled = false;
|
||||||
@@ -46,39 +46,38 @@ async function runWebClient(args) {
|
|||||||
cancelled = true;
|
cancelled = true;
|
||||||
abort.abort();
|
abort.abort();
|
||||||
});
|
});
|
||||||
const server = spawnPromise(
|
let server;
|
||||||
"node",
|
let serverOk;
|
||||||
[
|
|
||||||
inspectorServerPath,
|
|
||||||
...(args.command ? [`--env`, args.command] : []),
|
|
||||||
...(args.args ? [`--args=${args.args.join(" ")}`] : []),
|
|
||||||
],
|
|
||||||
{
|
|
||||||
env: {
|
|
||||||
...process.env,
|
|
||||||
PORT: SERVER_PORT,
|
|
||||||
MCP_ENV_VARS: JSON.stringify(args.envArgs),
|
|
||||||
},
|
|
||||||
signal: abort.signal,
|
|
||||||
echoOutput: true,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
const client = spawnPromise("node", [inspectorClientPath], {
|
|
||||||
env: { ...process.env, PORT: CLIENT_PORT },
|
|
||||||
signal: abort.signal,
|
|
||||||
echoOutput: true,
|
|
||||||
});
|
|
||||||
// Make sure our server/client didn't immediately fail
|
|
||||||
await Promise.any([server, client, delay(2 * 1000)]);
|
|
||||||
const portParam = SERVER_PORT === "3000" ? "" : `?proxyPort=${SERVER_PORT}`;
|
|
||||||
console.log(
|
|
||||||
`\n🔍 MCP Inspector is up and running at http://127.0.0.1:${CLIENT_PORT}${portParam} 🚀`,
|
|
||||||
);
|
|
||||||
try {
|
try {
|
||||||
await Promise.any([server, client]);
|
server = spawnPromise(
|
||||||
} catch (e) {
|
"node",
|
||||||
if (!cancelled || process.env.DEBUG) {
|
[
|
||||||
throw e;
|
inspectorServerPath,
|
||||||
|
...(args.command ? [`--env`, args.command] : []),
|
||||||
|
...(args.args ? [`--args=${args.args.join(" ")}`] : []),
|
||||||
|
],
|
||||||
|
{
|
||||||
|
env: {
|
||||||
|
...process.env,
|
||||||
|
PORT: SERVER_PORT,
|
||||||
|
MCP_ENV_VARS: JSON.stringify(args.envArgs),
|
||||||
|
},
|
||||||
|
signal: abort.signal,
|
||||||
|
echoOutput: true,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
// Make sure server started before starting client
|
||||||
|
serverOk = await Promise.race([server, delay(2 * 1000)]);
|
||||||
|
} catch (error) {}
|
||||||
|
if (serverOk) {
|
||||||
|
try {
|
||||||
|
await spawnPromise("node", [inspectorClientPath], {
|
||||||
|
env: { ...process.env, PORT: CLIENT_PORT },
|
||||||
|
signal: abort.signal,
|
||||||
|
echoOutput: true,
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
if (!cancelled || process.env.DEBUG) throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@modelcontextprotocol/inspector-bin",
|
"name": "@modelcontextprotocol/inspector-bin",
|
||||||
"version": "0.7.0",
|
"version": "0.8.2",
|
||||||
"description": "Model Context Protocol inspector",
|
"description": "Model Context Protocol inspector",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "Anthropic, PBC (https://anthropic.com)",
|
"author": "Anthropic, PBC (https://anthropic.com)",
|
||||||
|
|||||||
@@ -67,55 +67,53 @@ async function runWebClient(args: Args): Promise<void> {
|
|||||||
"cli.js",
|
"cli.js",
|
||||||
);
|
);
|
||||||
|
|
||||||
const CLIENT_PORT = process.env.CLIENT_PORT ?? "5173";
|
const CLIENT_PORT: string = process.env.CLIENT_PORT ?? "6274";
|
||||||
const SERVER_PORT = process.env.SERVER_PORT ?? "3000";
|
const SERVER_PORT: string = process.env.SERVER_PORT ?? "6277";
|
||||||
|
|
||||||
console.log("Starting MCP inspector...");
|
console.log("Starting MCP inspector...");
|
||||||
|
|
||||||
const abort = new AbortController();
|
const abort = new AbortController();
|
||||||
|
let cancelled: boolean = false;
|
||||||
let cancelled = false;
|
|
||||||
process.on("SIGINT", () => {
|
process.on("SIGINT", () => {
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
abort.abort();
|
abort.abort();
|
||||||
});
|
});
|
||||||
|
|
||||||
const server = spawnPromise(
|
let server: ReturnType<typeof spawnPromise>;
|
||||||
"node",
|
let serverOk: unknown;
|
||||||
[
|
|
||||||
inspectorServerPath,
|
|
||||||
...(args.command ? [`--env`, args.command] : []),
|
|
||||||
...(args.args ? [`--args=${args.args.join(" ")}`] : []),
|
|
||||||
],
|
|
||||||
{
|
|
||||||
env: {
|
|
||||||
...process.env,
|
|
||||||
PORT: SERVER_PORT,
|
|
||||||
MCP_ENV_VARS: JSON.stringify(args.envArgs),
|
|
||||||
},
|
|
||||||
signal: abort.signal,
|
|
||||||
echoOutput: true,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
const client = spawnPromise("node", [inspectorClientPath], {
|
|
||||||
env: { ...process.env, PORT: CLIENT_PORT },
|
|
||||||
signal: abort.signal,
|
|
||||||
echoOutput: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Make sure our server/client didn't immediately fail
|
|
||||||
await Promise.any([server, client, delay(2 * 1000)]);
|
|
||||||
const portParam = SERVER_PORT === "3000" ? "" : `?proxyPort=${SERVER_PORT}`;
|
|
||||||
console.log(
|
|
||||||
`\n🔍 MCP Inspector is up and running at http://127.0.0.1:${CLIENT_PORT}${portParam} 🚀`,
|
|
||||||
);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await Promise.any([server, client]);
|
server = spawnPromise(
|
||||||
} catch (e) {
|
"node",
|
||||||
if (!cancelled || process.env.DEBUG) {
|
[
|
||||||
throw e;
|
inspectorServerPath,
|
||||||
|
...(args.command ? [`--env`, args.command] : []),
|
||||||
|
...(args.args ? [`--args=${args.args.join(" ")}`] : []),
|
||||||
|
],
|
||||||
|
{
|
||||||
|
env: {
|
||||||
|
...process.env,
|
||||||
|
PORT: SERVER_PORT,
|
||||||
|
MCP_ENV_VARS: JSON.stringify(args.envArgs),
|
||||||
|
},
|
||||||
|
signal: abort.signal,
|
||||||
|
echoOutput: true,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
// Make sure server started before starting client
|
||||||
|
serverOk = await Promise.race([server, delay(2 * 1000)]);
|
||||||
|
} catch (error) {}
|
||||||
|
|
||||||
|
if (serverOk) {
|
||||||
|
try {
|
||||||
|
await spawnPromise("node", [inspectorClientPath], {
|
||||||
|
env: { ...process.env, PORT: CLIENT_PORT },
|
||||||
|
signal: abort.signal,
|
||||||
|
echoOutput: true,
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
if (!cancelled || process.env.DEBUG) throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@modelcontextprotocol/inspector-cli",
|
"name": "@modelcontextprotocol/inspector-cli",
|
||||||
"version": "0.7.0",
|
"version": "0.8.2",
|
||||||
"description": "CLI for the Model Context Protocol inspector",
|
"description": "CLI for the Model Context Protocol inspector",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "Nicolas Barraud",
|
"author": "Nicolas Barraud",
|
||||||
|
|||||||
1543
package-lock.json
generated
1543
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@modelcontextprotocol/inspector",
|
"name": "@modelcontextprotocol/inspector",
|
||||||
"version": "0.7.0",
|
"version": "0.8.2",
|
||||||
"description": "Model Context Protocol inspector",
|
"description": "Model Context Protocol inspector",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "Anthropic, PBC (https://anthropic.com)",
|
"author": "Anthropic, PBC (https://anthropic.com)",
|
||||||
@@ -43,11 +43,11 @@
|
|||||||
"publish-all": "npm publish --workspaces --access public && npm publish --access public"
|
"publish-all": "npm publish --workspaces --access public && npm publish --access public"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@modelcontextprotocol/inspector-bin": "^0.7.0",
|
"@modelcontextprotocol/inspector-bin": "^0.8.2",
|
||||||
"@modelcontextprotocol/inspector-cli": "^0.7.0",
|
"@modelcontextprotocol/inspector-cli": "^0.8.2",
|
||||||
"@modelcontextprotocol/inspector-client": "^0.7.0",
|
"@modelcontextprotocol/inspector-client": "^0.8.2",
|
||||||
"@modelcontextprotocol/inspector-server": "^0.7.0",
|
"@modelcontextprotocol/inspector-server": "^0.8.2",
|
||||||
"@modelcontextprotocol/sdk": "^1.8.0",
|
"@modelcontextprotocol/sdk": "^1.9.0",
|
||||||
"concurrently": "^9.0.1",
|
"concurrently": "^9.0.1",
|
||||||
"shell-quote": "^1.8.2",
|
"shell-quote": "^1.8.2",
|
||||||
"spawn-rx": "^5.1.2",
|
"spawn-rx": "^5.1.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user