Home / Servers / Vercel API / run_session_command

Execute a command

An MCP tool from the Vercel API server, hosted on mcp.hjlabs.in.

Execute a command Executes a shell command inside a running session. The command runs asynchronously and returns immediately with a command ID that can be used to track its progress and retrieve its output.… [POST /v2/sandboxes/sessions/{sessionId}/cmd]

Name on the gateway: vercel_api__run_session_command · may change things.

Parameters

NameTypeDescription
sessionId requiredstringThe unique identifier of the session in which to execute…
teamIdstringThe Team identifier to perform the request on behalf of.
slugstringThe Team slug to perform the request on behalf of.
command requiredstringThe executable or shell command to run. This is the program name without…
argsarrayArguments to pass to the command. Each argument should be a separate array…
cwdstringThe working directory in which to execute the command. Defaults to the sandbox…
envobjectAdditional environment variables to set for this command. These are merged…
sudobooleanExecute the command with root (superuser) privileges.
waitbooleanIf true, returns an ND-JSON stream that emits the command status when started…
logsbooleanIf true, stream the logs of the command execution in real-time via ND-JSON.…
timeoutintegerMaximum duration in milliseconds the command may run before it is killed with…
attachStdinbooleanIf true, keeps the command stdin open so it can be written to with the stdin…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "vercel_api__run_session_command",
  "arguments": {
    "sessionId": "…",
    "command": "…"
  }
}

Or connect the Vercel API server directly, which lists 472 tools including this one:

Run in your terminal
claude mcp add --transport http hj-vercel-api https://mcp.hjlabs.in/mcp/vercel-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the execute a command tool with sessionId set to ….

More from Vercel API