Ask a command-line MCP server one request

Ask a command-line MCP server one request the way the web gateway answers a caller with no session: start it in a working folder of its own, initialize it, ask, and stop it

Makes the gateway (do-work/gateway.mjs createGateway) for the one stdio MCP server the input names (cli, args, env) and hands it one POST /<app>/mcp with no session id, in this process: no port is opened. The gateway starts the server as a child process in a fresh empty working folder with only PATH, HOME, TMPDIR and LANG (plus env), sends initialize (protocol_version, 2025-06-18 when left out) and notifications/initialized, writes the request (one JSON-RPC message per line), waits at most timeout_seconds (30 when left out), answers a request the server asks back with method not found, then kills the server and removes its folder. An arg that starts with ./ or ../ names a file in the run's working folder (the tool folder) and is made absolute first. Answers the HTTP status the gateway gave (200, or 502 when the server would not start or initialize) and the JSON-RPC reply. The server runs whatever command cli names inside the run's container, with no internet; this run reads and writes nothing else and keeps nothing. Refuses a missing cli, args that are not text, an app name the gateway's path would not take, a request with no method, and initialize as the request. The hosted gateway (do-work/serve.mjs) also keeps sessions open between requests (Mcp-Session-Id), streams a server's notifications, caps and reaps idle sessions and serves on a port for the web; this run does only the one-off flow.

What it asks for

Nothing: your AI starts it with your words.

Use it from your AI

Connect the AI you already use to Trillion once. Then ask in your own words; your AI finds this tool by what it does and runs it.

Say to your AI: “Use Trillion to ask a command-line MCP server one request the way the web gateway answers a caller with no session: start it in a working folder of its own, initialize it, ask, and stop it”