Make stdout/error echo for client and server

This commit is contained in:
Ani Betts
2024-11-27 15:57:02 +01:00
parent a00564fafa
commit 98470a12f9
3 changed files with 12 additions and 7 deletions

View File

@@ -51,12 +51,17 @@ async function main() {
...(command ? [`--env`, command] : []),
...(mcpServerArgs ? ["--args", mcpServerArgs.join(" ")] : []),
],
{ env: { ...process.env, PORT: SERVER_PORT }, signal: abort.signal },
{
env: { ...process.env, PORT: SERVER_PORT },
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

8
package-lock.json generated
View File

@@ -16,7 +16,7 @@
"@modelcontextprotocol/inspector-client": "0.2.4",
"@modelcontextprotocol/inspector-server": "0.2.4",
"concurrently": "^9.0.1",
"spawn-rx": "^5.0.4",
"spawn-rx": "^5.1.0",
"ts-node": "^10.9.2"
},
"bin": {
@@ -5737,9 +5737,9 @@
}
},
"node_modules/spawn-rx": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/spawn-rx/-/spawn-rx-5.0.4.tgz",
"integrity": "sha512-Do11ahkHLlqN9G/J6fs10gdx25BU33NrpkyN3/DFXIIUVojBiJysl12nC0iGUkE+msJAPflzyfpLWWHGHw/6Xg==",
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/spawn-rx/-/spawn-rx-5.1.0.tgz",
"integrity": "sha512-b4HX44hI0usMiHu6LNaZUVg0BGqHuBcl+81iEhZwhvKHz1efTqD/CHBcUbm/uIe5TARy9pJolxU2NMfh6GuQBA==",
"license": "MIT",
"dependencies": {
"debug": "^4.3.7",

View File

@@ -36,11 +36,11 @@
"@modelcontextprotocol/inspector-client": "0.2.4",
"@modelcontextprotocol/inspector-server": "0.2.4",
"concurrently": "^9.0.1",
"spawn-rx": "^5.0.4",
"spawn-rx": "^5.1.0",
"ts-node": "^10.9.2"
},
"devDependencies": {
"@types/node": "^22.7.5",
"prettier": "3.3.3"
}
}
}