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 config: a unique id (the LLM's
mcp_connect handle) and the argv to spawn it. command is an argv array
(not a shell string) per Subprocess.spawn convention, even though
the mcp gem owns the actual spawn (the "Subprocess seam" carve-out).
env is the stdio counterpart of HttpEntry's headers: — the right
place for a server's auth token (+=> "..."+) rather than
baking secrets into argv; the mcp gem merges it over what
BundlerEnv hands it (this is the legitimate per-child
credential channel of the "Environment is not a secret store" seam).
Excluded from the cache fingerprint (Cache#transport_descriptor) so
secrets never hit disk.
Instance Attribute Summary collapse
-
#command ⇒ Array<String>
readonly
Argv to spawn the server, e.g.
-
#env ⇒ Hash{String => String}
readonly
Extra environment variables for the spawned process, merged over the de-bundlerized environment (BundlerEnv).
-
#id ⇒ String
readonly
Short identifier the LLM uses to refer to this server, e.g.
-
#private ⇒ Boolean
readonly
This server reaches data worth exfiltrating — a Notion workspace, a mail account, an internal wiki.
Instance Method Summary collapse
-
#initialize(id:, command:, env: {}, private: false) ⇒ StdioEntry
constructor
A new instance of StdioEntry.
Constructor Details
#initialize(id:, command:, env: {}, private: false) ⇒ StdioEntry
Returns a new instance of StdioEntry.
48 49 50 |
# File 'lib/pikuri/mcp/registry.rb', line 48 def initialize(id:, command:, env: {}, private: false) super(id: id, command: command, env: env.freeze, private: private) end |
Instance Attribute Details
#command ⇒ Array<String> (readonly)
Returns argv to spawn the server,
e.g. ["npx", "mcp-maven-deps"].
47 48 49 50 51 |
# File 'lib/pikuri/mcp/registry.rb', line 47 StdioEntry = Data.define(:id, :command, :env, :private) do def initialize(id:, command:, env: {}, private: false) super(id: id, command: command, env: env.freeze, private: private) end end |
#env ⇒ Hash{String => String} (readonly)
Returns extra environment variables for the spawned process, merged over the de-bundlerized environment (BundlerEnv). Frozen. Defaults to an empty hash.
47 48 49 50 51 |
# File 'lib/pikuri/mcp/registry.rb', line 47 StdioEntry = Data.define(:id, :command, :env, :private) do def initialize(id:, command:, env: {}, private: false) super(id: id, command: command, env: env.freeze, private: private) end end |
#id ⇒ String (readonly)
Returns short identifier the LLM uses to refer to this
server, e.g. "gmail" or "maven-tools".
47 48 49 50 51 |
# File 'lib/pikuri/mcp/registry.rb', line 47 StdioEntry = Data.define(:id, :command, :env, :private) do def initialize(id:, command:, env: {}, private: false) super(id: id, command: command, env: env.freeze, private: private) end end |
#private ⇒ Boolean (readonly)
Returns this server reaches data worth exfiltrating — a Notion
workspace, a mail account, an internal wiki. Declared per entry
because sensitivity is as unknowable to the framework here as it is
for a filesystem: the person registering the server knows, and the one
registering an open-data server knows too. Defaults to false, and
feeds Pikuri::Mcp::Registry#private?.
47 48 49 50 51 |
# File 'lib/pikuri/mcp/registry.rb', line 47 StdioEntry = Data.define(:id, :command, :env, :private) do def initialize(id:, command:, env: {}, private: false) super(id: id, command: command, env: env.freeze, private: private) end end |