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

Types

The parameters to start the transport.

Functions

Returns a specification to start this module under a supervisor.

Types

option()

@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)

params_t()

@type params_t() :: Enumerable.t(option())

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_schema(atom)

options_schema(data)

options_schema!(data)