finnhub-mcp
Version:
A Model Context Protocol server for Finnhub financial data
30 lines (23 loc) • 651 B
JavaScript
const path = require("path");
const { spawn } = require("child_process");
const os = require("os");
const fs = require("fs");
const binDir = path.join(__dirname, "bin");
const platform = process.platform;
let executable = "finnhub-mcp-server";
if (platform === "win32") {
executable += ".exe";
}
const execPath = path.join(binDir, executable);
if (!fs.existsSync(execPath)) {
console.error(`❌ Executable not found at: ${execPath}`);
process.exit(1);
}
const child = spawn(execPath, process.argv.slice(2), {
stdio: "inherit",
shell: platform === "win32",
});
child.on("exit", (code) => {
process.exit(code);
});