Class: Esp::CLI::Mcp
Overview
‘esp mcp` — Model Context Protocol frontend. `serve` speaks JSON-RPC over stdio so an AI client can drive the toolchain as native tools; `install` wires that server into a client’s config.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
12 |
# File 'lib/esp/cli/mcp.rb', line 12 def self.exit_on_failure? = true |
Instance Method Details
#install ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/esp/cli/mcp.rb', line 29 def install result = Esp::McpInstaller.install([:client], name: [:name]) respond(result_payload(result)) do say t('mcp.install.result', action: result.action, name: result.name, label: result.label) say t('mcp.install.config', path: result.config_path) say t('mcp.install.restart') if needs_restart?(result) end rescue ArgumentError => e fail_with(e.) end |