feat: PLANNING体系首版(00路线图/02任务总表/03执行协议/I-03/I-04/registry42口径)+M1止血交付
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// Stdio handshake smoke test for arbitrary MCP stdio servers.
|
||||
// Usage: node mcp-smoke.mjs <command> [args...]
|
||||
// Lists tools and prints the first few names.
|
||||
import { Client } from "file:///C:/Users/12914/.dsh/profiles/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js";
|
||||
import { StdioClientTransport } from "file:///C:/Users/12914/.dsh/profiles/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js";
|
||||
|
||||
const [command, ...args] = process.argv.slice(2);
|
||||
if (!command) {
|
||||
console.error("usage: node mcp-smoke.mjs <command> [args...]");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const transport = new StdioClientTransport({ command, args, env: { ...process.env } });
|
||||
const client = new Client({ name: "smoke", version: "0.0.1" });
|
||||
await client.connect(transport);
|
||||
|
||||
const tools = await client.listTools();
|
||||
console.log(JSON.stringify({ toolCount: tools.tools.length, sample: tools.tools.slice(0, 10).map((t) => t.name) }));
|
||||
|
||||
await client.close();
|
||||
process.exit(0);
|
||||
Reference in New Issue
Block a user