GenAI.Approval.Executor.MCP (GenAI Approval v0.1.0)

Copy Markdown View Source

Executes script calls against MCP servers via Noizu.MCP.Client (M4, PRD §6.4 adapter 1). One client per declared endpoint, started under GenAI.Approval.ClientSupervisor and closed when the run terminates (R6.7).

Per-alias config (the second element of {Executor.MCP, config}):

  • :transport — explicit Noizu.MCP.Client transport tuple; overrides the script's declaration (used for stdio command config and tests)
  • :credentials — how preamble credential("id") references resolve to client auth: a map %{"id" => {StrategyMod, opts}} or a 1-arity fun returning {:ok, auth} | {:error, reason}
  • :client_opts — extra Noizu.MCP.Client options (:handler, :client_info, :request_timeout, …)
  • :ready_timeout — handshake wait (default 10s)
  • :call_timeout — per tool call (default: client request_timeout)

Script transports map as:

  • "streamable_http"{:streamable_http, url: <declared url>, auth: <resolved>}
  • "stdio" — requires :transport in config (commands are host configuration, never script input)

describe/2 serves the cached tools/list entry so UIs can render argument forms and risk badges (destructiveHint etc. are untrusted hints, per S10 — never a substitute for permission rules).