Class: RuboCop::MCP::Server Private
- Inherits:
-
Object
- Object
- RuboCop::MCP::Server
- Defined in:
- lib/rubocop/mcp/server.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
RuboCop MCP Server.
Instance Method Summary collapse
-
#initialize(config_store) ⇒ Server
constructor
private
A new instance of Server.
- #start ⇒ Object private
Constructor Details
#initialize(config_store) ⇒ Server
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Server.
12 13 14 15 16 |
# File 'lib/rubocop/mcp/server.rb', line 12 def initialize(config_store) @config_store = config_store @runtime = RuboCop::LSP::Runtime.new(@config_store) @options = {} end |
Instance Method Details
#start ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rubocop/mcp/server.rb', line 18 def start # No `protocol_version` is specified because draft feature by default can be used. server = ::MCP::Server.new( name: 'rubocop_mcp_server', version: RuboCop::Version::STRING, tools: [inspection_tool, autocorrection_tool] ) ::MCP::Server::Transports::StdioTransport.new(server).open end |