Class: RailsAiBridge::Config::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_ai_bridge/config/server.rb

Overview

Holds MCP server transport and extensibility settings.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeServer

Returns a new instance of Server.



31
32
33
34
35
36
37
38
39
40
# File 'lib/rails_ai_bridge/config/server.rb', line 31

def initialize
  @server_name        = 'rails-ai-bridge'
  @server_version     = RailsAiBridge::VERSION
  @http_path          = '/mcp'
  @http_bind          = '127.0.0.1'
  @http_port          = 6029
  @auto_mount         = false
  @additional_tools   = []
  @additional_resources = {}
end

Instance Attribute Details

#additional_resourcesHash{String => Hash}

Returns additional MCP resources merged with built-in resources.

Returns:

  • (Hash{String => Hash})

    additional MCP resources merged with built-in resources



29
30
31
# File 'lib/rails_ai_bridge/config/server.rb', line 29

def additional_resources
  @additional_resources
end

#additional_toolsArray<Class>

Returns additional MCP tool classes appended to the built-in list.

Returns:

  • (Array<Class>)

    additional MCP tool classes appended to the built-in list



26
27
28
# File 'lib/rails_ai_bridge/config/server.rb', line 26

def additional_tools
  @additional_tools
end

#auto_mountBoolean

Returns auto-mount MCP HTTP endpoint via Rack middleware.

Returns:

  • (Boolean)

    auto-mount MCP HTTP endpoint via Rack middleware



23
24
25
# File 'lib/rails_ai_bridge/config/server.rb', line 23

def auto_mount
  @auto_mount
end

#http_bindString

Returns bind address for the standalone HTTP transport.

Returns:

  • (String)

    bind address for the standalone HTTP transport



17
18
19
# File 'lib/rails_ai_bridge/config/server.rb', line 17

def http_bind
  @http_bind
end

#http_pathString

Returns HTTP path for the MCP endpoint.

Returns:

  • (String)

    HTTP path for the MCP endpoint



14
15
16
# File 'lib/rails_ai_bridge/config/server.rb', line 14

def http_path
  @http_path
end

#http_portInteger

Returns port for the standalone HTTP transport.

Returns:

  • (Integer)

    port for the standalone HTTP transport



20
21
22
# File 'lib/rails_ai_bridge/config/server.rb', line 20

def http_port
  @http_port
end

#server_nameString

Returns MCP server name advertised to clients.

Returns:

  • (String)

    MCP server name advertised to clients



8
9
10
# File 'lib/rails_ai_bridge/config/server.rb', line 8

def server_name
  @server_name
end

#server_versionString

Returns MCP server version advertised to clients.

Returns:

  • (String)

    MCP server version advertised to clients



11
12
13
# File 'lib/rails_ai_bridge/config/server.rb', line 11

def server_version
  @server_version
end