Class: McpStdioRuby::Server
- Inherits:
-
Object
- Object
- McpStdioRuby::Server
- Defined in:
- lib/mcp_stdio_ruby/server.rb
Overview
Encapsulates the MCP Server logic
Instance Attribute Summary collapse
-
#server ⇒ Object
readonly
Returns the value of attribute server.
Instance Method Summary collapse
-
#initialize ⇒ Server
constructor
A new instance of Server.
- #start ⇒ Object
Constructor Details
Instance Attribute Details
#server ⇒ Object (readonly)
Returns the value of attribute server.
10 11 12 |
# File 'lib/mcp_stdio_ruby/server.rb', line 10 def server @server end |
Instance Method Details
#start ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/mcp_stdio_ruby/server.rb', line 20 def start AppLogger.logger.info "Starting MCP server: #{server.name} (v#{server.version})" run_transport rescue Interrupt AppLogger.logger.info 'Shutting down MCP server...' rescue StandardError => e handle_error(e) end |