Class: ClaudeCode::McpStdioServerConfig

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

Overview

MCP Server configurations

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command:, args: [], env: {}, type: 'stdio') ⇒ McpStdioServerConfig

Returns a new instance of McpStdioServerConfig.



88
89
90
91
92
93
# File 'lib/claude_code/types.rb', line 88

def initialize(command:, args: [], env: {}, type: 'stdio')
  @command = command
  @args = args
  @env = env
  @type = type
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



86
87
88
# File 'lib/claude_code/types.rb', line 86

def args
  @args
end

#commandObject (readonly)

Returns the value of attribute command.



86
87
88
# File 'lib/claude_code/types.rb', line 86

def command
  @command
end

#envObject (readonly)

Returns the value of attribute env.



86
87
88
# File 'lib/claude_code/types.rb', line 86

def env
  @env
end

#typeObject (readonly)

Returns the value of attribute type.



86
87
88
# File 'lib/claude_code/types.rb', line 86

def type
  @type
end

Instance Method Details

#to_hObject



95
96
97
98
99
100
101
102
# File 'lib/claude_code/types.rb', line 95

def to_h
  {
    type: @type,
    command: @command,
    args: @args,
    env: @env
  }
end