chess-fen-mcp
Version:
MCP server for chess FEN notation visualization
23 lines (19 loc) • 515 B
JavaScript
import { spawn } from 'child_process';
const child = spawn('node', ['index.js'], { stdio: ['pipe', 'pipe', 'inherit'] });
const request = {
jsonrpc: "2.0",
id: 1,
method: "callTool",
params: {
name: "visualize_fen",
arguments: {
fen: "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
}
}
};
child.stdout.on('data', (data) => {
console.log('Response from MCP server:');
console.log(data.toString());
child.kill();
});
child.stdin.write(JSON.stringify(request) + '\n');