Hermes.Transport.STDIO (hermes_mcp v0.1.0)
A transport implementation that uses standard input/output.
This module is a Hermes.Transport.Behaviour
implementation.
Example
{:ok, stdio} =
STDIO.start_link(
command: "mcp",
args: ["run", server_path],
client: :stdio_test
)
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type option() :: {:command, Path.t()} | {:args, [String.t()] | nil} | {:env, map() | nil} | {:cwd, Path.t() | nil} | Supervisor.init_option()
The parameters to start the transport.
:command
- The command to execute:args
- The arguments to pass to the command, as a list of strings:env
- The environment variables to set for the command, as a map:cwd
- The working directory for the command, as a string:client
- The client to send messages to, as a PID or registered name (atom)
@type params_t() :: Enumerable.t(option())