Class: Pikuri::Mcp::Registry::StdioEntry
- Inherits:
-
Data
- Object
- Data
- Pikuri::Mcp::Registry::StdioEntry
- Defined in:
- lib/pikuri/mcp/registry.rb
Overview
One local-subprocess MCP server’s configuration: a unique id (used by the LLM to call mcp_connect) and the argv array used to spawn the server process.
command is an argv array (not a shell string) to align with Subprocess.spawn conventions even though the mcp gem owns the actual spawn — see CLAUDE.md “Subprocess seam” carve-out. First element is the executable; remaining elements are arguments.
env carries extra environment variables for the spawned process —the stdio counterpart of HttpEntry‘s headers:, and the right place for a server’s auth token (e.g. {“GITHUB_TOKEN” => “…”}) rather than baking secrets into the argv. The mcp gem merges it over the inherited environment; an empty hash (the default) changes nothing. Like HttpEntry‘s headers, env is excluded from the cache fingerprint (Cache#transport_descriptor) so secrets never land on disk.
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(id:, command:, env: {}) ⇒ StdioEntry
constructor
A new instance of StdioEntry.
Constructor Details
#initialize(id:, command:, env: {}) ⇒ StdioEntry
Returns a new instance of StdioEntry.
66 67 68 |
# File 'lib/pikuri/mcp/registry.rb', line 66 def initialize(id:, command:, env: {}) super(id: id, command: command, env: env.freeze) end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command
65 66 67 68 69 |
# File 'lib/pikuri/mcp/registry.rb', line 65 StdioEntry = Data.define(:id, :command, :env) do def initialize(id:, command:, env: {}) super(id: id, command: command, env: env.freeze) end end |
#env ⇒ Object (readonly)
Returns the value of attribute env
65 66 67 68 69 |
# File 'lib/pikuri/mcp/registry.rb', line 65 StdioEntry = Data.define(:id, :command, :env) do def initialize(id:, command:, env: {}) super(id: id, command: command, env: env.freeze) end end |
#id ⇒ Object (readonly)
Returns the value of attribute id
65 66 67 68 69 |
# File 'lib/pikuri/mcp/registry.rb', line 65 StdioEntry = Data.define(:id, :command, :env) do def initialize(id:, command:, env: {}) super(id: id, command: command, env: env.freeze) end end |