ODOCK.AI
Models & MCPMCP Servers

STDIO transport

Configure MCP servers that Odock launches as local commands.

STDIO transport

Use STDIO when Odock should launch a local command and communicate with it through standard input and output.

This transport is useful for packaged MCP servers that are designed to run as commands, such as Node packages launched with npx. The command runs in the gateway environment, so it must be installed or downloadable there.

When To Use It

Use STDIO when:

  • The MCP server is distributed as a command-line package.
  • The server is intended to speak MCP over stdin/stdout.
  • The command can run safely in the Odock gateway environment.
  • You need local environment variables for the tool server.

Use HTTP or SSE instead when the MCP server is already deployed as a service.

Required Fields

FieldValue
TransportSTDIO
STDIO CommandCommand to run, for example npx
STDIO ArgsArguments, for example -y,@modelcontextprotocol/server-sequential-thinking
STDIO EnvOptional JSON object of environment variables
EnabledOn for runtime use

Runtime Flow

Odock sends framed MCP input with a Content-Length header. If a server returns an empty response, Odock also has compatibility behavior for newline-delimited JSON. If the command fails, Odock returns an MCP STDIO gateway error.

Example Configuration

UI fieldExample
NameSequential Thinking
Slugsequential-thinking
TransportSTDIO
STDIO Commandnpx
STDIO Args-y,@modelcontextprotocol/server-sequential-thinking
STDIO Env{}
Auth TypeNONE
Allowed Toolssequentialthinking

Example Request

curl "$ODOCK_GATEWAY_URL/v1/mcp/sequential-thinking" \
  -H "Authorization: Bearer $ODOCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": "call-1",
    "method": "tools/call",
    "params": {
      "name": "sequentialthinking",
      "arguments": {
        "thought": "Break down the release checklist",
        "nextThoughtNeeded": true,
        "thoughtNumber": 1,
        "totalThoughts": 3
      }
    }
  }'

Security Notes

STDIO commands run where the gateway runs. Treat them as executable code:

  • Only use trusted MCP packages or internal commands.
  • Pin package versions when possible.
  • Keep environment variables minimal.
  • Avoid broad filesystem or network access for command-based tools.
  • Prefer HTTP/SSE for shared production tools that need independent isolation.

For broader controls, see MCP security.

On this page