You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

33 lines
1.1 KiB

'use strict';
// Test ArtCraft MCP CLI: initialize + tools/list.
const { McpClient } = require('./bridge/mcp-client');
const BIN = 'V:\\artcraft\\VectorCraft\\vectorcraft-cli.exe';
const ARGS = (process.argv[2] === 'raw') ? [] : ['mcp'];
const CWD = 'V:\\artcraft\\VectorCraft';
(async () => {
console.log('bin: ' + BIN);
console.log('args: ' + JSON.stringify(ARGS));
console.log('cwd: ' + CWD);
const c = new McpClient('vectorcraft', { bin: BIN, args: ARGS, cwd: CWD, idleMs: 30000, requestTimeoutMs: 15000 });
try {
const info = await c.start();
console.log('=== serverInfo ===');
console.log(JSON.stringify(info, null, 2));
const tools = await c.listTools();
console.log('=== tools count: ' + tools.length + ' ===');
for (const t of tools) {
console.log('- ' + t.name + ': ' + (t.description || '').slice(0, 120));
}
if (tools.length > 0) {
console.log('=== first tool schema ===');
console.log(JSON.stringify(tools[0], null, 2));
}
} catch (e) {
console.error('ERROR: ' + e.message);
process.exitCode = 1;
} finally {
c.close();
}
})();