Class: GroqRuby::MCP::HttpServerConfig

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

Overview

Description of an MCP server reachable over HTTP Streamable transport. Sibling of ServerConfig (which describes a stdio-launched server). Immutable — build one per server, then pass to Client.connect or Bridge.new.

Examples:

A remote MCP server with bearer auth

HttpServerConfig.new(
  name: "spectrumferret",
  url: "https://mcp-staging.spectrumferret.com/mcp",
  headers: {"Authorization" => "Bearer #{ENV['SF_TOKEN']}"}
)

Instance Method Summary collapse

Constructor Details

#initialize(name:, url:, headers: {}) ⇒ HttpServerConfig

Returns a new instance of HttpServerConfig.

Parameters:

  • name (String)

    short identifier used to namespace tools in Bridge

  • url (String)

    full URL of the MCP endpoint (single endpoint —the transport POSTs JSON-RPC and may receive SSE responses)

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

    extra HTTP headers added to every request (e.g. authorization)



20
21
22
# File 'lib/groq_ruby/mcp/http_server_config.rb', line 20

def initialize(name:, url:, headers: {})
  super
end