Class: RailsAiBridge::Config::Server
- Inherits:
-
Object
- Object
- RailsAiBridge::Config::Server
- Defined in:
- lib/rails_ai_bridge/config/server.rb
Overview
Holds MCP server transport and extensibility settings.
Instance Attribute Summary collapse
-
#additional_resources ⇒ Hash{String => Hash}
Additional MCP resources merged with built-in resources.
-
#additional_tools ⇒ Array<Class>
Additional MCP tool classes appended to the built-in list.
-
#auto_mount ⇒ Boolean
Auto-mount MCP HTTP endpoint via Rack middleware.
-
#http_bind ⇒ String
Bind address for the standalone HTTP transport.
-
#http_path ⇒ String
HTTP path for the MCP endpoint.
-
#http_port ⇒ Integer
Port for the standalone HTTP transport.
-
#server_name ⇒ String
MCP server name advertised to clients.
-
#server_version ⇒ String
MCP server version advertised to clients.
Instance Method Summary collapse
-
#initialize ⇒ Server
constructor
A new instance of Server.
Constructor Details
#initialize ⇒ Server
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_resources ⇒ Hash{String => Hash}
Returns 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_tools ⇒ Array<Class>
Returns 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_mount ⇒ Boolean
Returns 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_bind ⇒ String
Returns 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_path ⇒ String
Returns 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_port ⇒ Integer
Returns 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_name ⇒ String
Returns 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_version ⇒ String
Returns 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 |