// Test MCP server integration
const { spawnSync } = require('child_process');
// Test the MCP server with JSON input
const testMCPInput = {
jsonrpc: "2.0",
id: 1,
method: "tools/call",
params: {
name: "validate",
arguments: {
system: "syllogistic",
input: "All men are mortal. Socrates is a man. Therefore, Socrates is mortal."
}
}
};
// Spawn the MCP server process
const serverProcess = spawnSync('node', ['dist/index.js'], {
input: JSON.stringify(testMCPInput) + '\n',
encoding: 'utf-8'
});
console.log('MCP Server Output:', serverProcess.stdout);
console.log('MCP Server Error:', serverProcess.stderr);
console.log('Exit Code:', serverProcess.status);