Class: GroqRuby::MCP::ServerConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/groq_ruby/mcp/server_config.rb

Overview

Description of an MCP server to connect to via stdio. Immutable —build one per server, then pass to Client.connect or Bridge.new.

Examples:

Filesystem server

ServerConfig.new(
  name: "fs",
  command: "npx",
  args: ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/docs"]
)

Instance Method Summary collapse

Constructor Details

#initialize(name:, command:, args: [], env: {}) ⇒ ServerConfig

Returns a new instance of ServerConfig.

Parameters:

  • name (String)

    short identifier used to namespace tools in Bridge

  • command (String)

    executable to spawn (looked up in PATH)

  • args (Array<String>) (defaults to: [])

    arguments passed to the executable

  • env (Hash{String => String}) (defaults to: {})

    extra environment variables for the child process



17
18
19
# File 'lib/groq_ruby/mcp/server_config.rb', line 17

def initialize(name:, command:, args: [], env: {})
  super
end