Class: RailsMcpInsight::Server
- Inherits:
-
Object
- Object
- RailsMcpInsight::Server
- Defined in:
- lib/rails_mcp_insight/server.rb
Overview
Sets up the MCP server with all tools registered and starts the stdio transport for AI assistant communication.
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(config) ⇒ Server
constructor
A new instance of Server.
- #start ⇒ Object
Constructor Details
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
9 10 11 |
# File 'lib/rails_mcp_insight/server.rb', line 9 def config @config end |
Instance Method Details
#start ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rails_mcp_insight/server.rb', line 16 def start require "mcp" server = MCP::Server.new( name: "rails-mcp-insight", version: VERSION, tools: tool_classes ) transport = MCP::Server::Transports::StdioTransport.new(server) transport.open end |