Noizu.MCP.Server.Supervisor (Noizu MCP v0.1.3)

Copy Markdown View Source

Supervision tree for one logical MCP server: a session registry, a dynamic supervisor for per-client sessions, a task supervisor for handler execution, and (when transport: :stdio) the stdio transport with its single implicit session.

Started for you by use Noizu.MCP.Server — add the server module to your application's supervision tree:

children = [{MyApp.MCP, transport: :stdio}]

Summary

Functions

Returns a specification to start this module under a supervisor.

List the pids of all live sessions for server.

Start a new session for server. Used by transports; opts must include :sink and may include :session_id and :transport.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

sessions(server)

@spec sessions(module()) :: [pid()]

List the pids of all live sessions for server.

start_session(server, opts)

@spec start_session(
  module(),
  keyword()
) :: DynamicSupervisor.on_start_child()

Start a new session for server. Used by transports; opts must include :sink and may include :session_id and :transport.