Class: ClaudeAgentSDK::McpStdioServerConfig

Inherits:
Type
  • Object
show all
Defined in:
lib/claude_agent_sdk/types.rb

Overview

MCP Server configurations

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Type

#[], #[]=, from_hash, wrap

Constructor Details

#initialize(attributes = {}) ⇒ McpStdioServerConfig

Returns a new instance of McpStdioServerConfig.



1365
1366
1367
1368
# File 'lib/claude_agent_sdk/types.rb', line 1365

def initialize(attributes = {})
  super
  @type = 'stdio'
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ClaudeAgentSDK::Type

Instance Attribute Details

#argsObject

Returns the value of attribute args.



1362
1363
1364
# File 'lib/claude_agent_sdk/types.rb', line 1362

def args
  @args
end

#commandObject

Returns the value of attribute command.



1362
1363
1364
# File 'lib/claude_agent_sdk/types.rb', line 1362

def command
  @command
end

#envObject

Returns the value of attribute env.



1362
1363
1364
# File 'lib/claude_agent_sdk/types.rb', line 1362

def env
  @env
end

#typeObject (readonly)

Returns the value of attribute type.



1363
1364
1365
# File 'lib/claude_agent_sdk/types.rb', line 1363

def type
  @type
end

Instance Method Details

#to_hObject



1370
1371
1372
1373
1374
1375
# File 'lib/claude_agent_sdk/types.rb', line 1370

def to_h
  result = { type: @type, command: @command }
  result[:args] = @args if @args
  result[:env] = @env if @env
  result
end