UNPKG

@upamune/chrono-mcp

Version:

MCP server for parsing natural language dates using chrono-node

23 lines (19 loc) 619 B
#!/usr/bin/env node import { spawn } from 'child_process'; import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; const __dirname = dirname(fileURLToPath(import.meta.url)); const serverPath = join(__dirname, '../dist/index.js'); // Bunがインストールされているか確認 const runtime = process.versions.bun ? 'bun' : 'node'; const child = spawn(runtime, [serverPath], { stdio: 'inherit', env: process.env }); child.on('error', (err) => { console.error('Failed to start chrono-mcp server:', err); process.exit(1); }); child.on('exit', (code) => { process.exit(code || 0); });