Class: Pikuri::Mcp::Registry::StdioEntry

Inherits:
Data
  • Object
show all
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

Instance Method Summary collapse

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

#commandObject (readonly)

Returns the value of attribute command

Returns:

  • (Object)

    the current value of 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

#envObject (readonly)

Returns the value of attribute env

Returns:

  • (Object)

    the current value of 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

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of 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