Stdio Transport
The stdio transport spawns an MCP server as a child process and communicates via stdin/stdout. This is the most common transport for local servers.
Configuration
[mcp.servers.filesystem]
transport = { type = "stdio", command = "npx", args = ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/documents"] }
auto_connect = true
timeout_secs = 120Fields
| Field | Required | Description |
|---|---|---|
command | Yes | Executable path or command name |
args | No | Command arguments (array of strings) |
env | No | Additional environment variables |
Environment Variables
Pass environment variables to the server process:
[mcp.servers.github]
transport = { type = "stdio", command = "npx", args = ["-y", "@modelcontextprotocol/server-github"], env = { GITHUB_TOKEN = "${GITHUB_TOKEN}" } }Environment variables support ${VAR} expansion from the host environment.
How It Works
- Ryvos spawns the command as a subprocess
- JSON-RPC messages are exchanged over stdin/stdout
- The server publishes its tool list via
tools/list - Ryvos bridges each tool into the ToolRegistry
- When a tool is called, Ryvos sends
tools/callvia stdin - The result is read from stdout
Auto-Reconnection
If a stdio server crashes, Ryvos detects the broken pipe and marks the server as disconnected. On the next tool call attempt, it tries to reconnect by respawning the process.
Examples
# Filesystem access
[mcp.servers.filesystem]
transport = { type = "stdio", command = "npx", args = ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"] }
# Git operations
[mcp.servers.git]
transport = { type = "stdio", command = "npx", args = ["-y", "@modelcontextprotocol/server-git"] }
# Custom Python server
[mcp.servers.custom]
transport = { type = "stdio", command = "python3", args = ["./my_mcp_server.py"] }CLI
ryvos mcp add filesystem --command npx --args "-y" "@modelcontextprotocol/server-filesystem" "/tmp"
ryvos mcp list
ryvos mcp remove filesystem