Class: Textus::Surface::CLI::Verb::MCPServe

Inherits:
Verb
  • Object
show all
Defined in:
lib/textus/surface/cli/verb/mcp_serve.rb

Overview

Launches the MCP stdio server in the current process. Blocks on stdin; never returns until stdin closes. The connection acts as the agent role by default (ADR 0040): the agent channel proposes, it does not inherit the human's authority. Override per connection with --as, or TEXTUS_ROLE / .textus/role (same chain as every other verb).

Instance Method Summary collapse

Instance Method Details

#call(store) ⇒ Object



15
16
17
18
19
# File 'lib/textus/surface/cli/verb/mcp_serve.rb', line 15

def call(store)
  role = resolved_role(store, default: Textus::Value::Role::AGENT)
  Textus::Surface::MCP::Server.new(store: store, stdin: @stdin, stdout: @stdout, role: role).run
  0
end