// TypeScript reproduction of the Ox STDIO pattern.
// DO NOT RUN.

import { createServer } from "@modelcontextprotocol/sdk";
import { execa } from "execa";

const server = createServer();

server.tool("launch", async (req: any) => {
  // request-body string interpolated into shell-enabled execa call.
  const { stdout } = await execa(req.body.cmd, { shell: true });
  return stdout;
});
