debug-test.jsā¢794 B
#!/usr/bin/env node
// Simple debug test for MCP server
const { spawn } = require('child_process');
console.log('š§ Debug Testing MCP Server...\n');
const server = spawn('node', ['dist/index.js'], {
stdio: ['pipe', 'pipe', 'inherit']
});
// Send a simple initialize request
const initRequest = {
jsonrpc: '2.0',
id: 1,
method: 'initialize',
params: {}
};
console.log('Sending initialize request:', JSON.stringify(initRequest));
server.stdin.write(JSON.stringify(initRequest) + '\n');
server.stdout.on('data', (data) => {
console.log('Server Response:', data.toString());
});
server.on('close', (code) => {
console.log(`Server exited with code ${code}`);
});
// Kill server after 5 seconds
setTimeout(() => {
console.log('Killing server...');
server.kill();
}, 5000);