Vercel Sandbox adds stdin support for running commands

·2026.10.26 09:00

Key point

Developers can now send input to running commands via the TypeScript or Python SDKs to interact with stdio MCP servers like agent-browser.

Details

  • Vercel Sandbox now supports sending input to running commands through standard input (stdin).
  • Use case includes exchanging messages with stdio MCP servers such as agent-browser or sending data to command-line programs while they run.
  • In the TypeScript SDK, set stdin: true and detached: true in runCommand(), then use writeStdin() to send input and closeStdin() to finish.
  • The TypeScript SDK also accepts a Node.js readable stream (e.g., process.stdin) for stdin, automatically closing the command's stdin when the stream ends.
  • In the Python SDK, set stdin=subprocess.PIPE and send input with server.stdin.send(), then call communicate() to close stdin, collect output, and wait for exit.
  • Python's run_process() allows passing input directly for commands that receive all input at once.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.