Class: SimpleCovMcp::MCPServer
- Inherits:
-
Object
- Object
- SimpleCovMcp::MCPServer
- Defined in:
- lib/simplecov_mcp/mcp_server.rb
Constant Summary collapse
- TOOLSET =
[ Tools::AllFilesCoverageTool, Tools::CoverageDetailedTool, Tools::CoverageRawTool, Tools::CoverageSummaryTool, Tools::CoverageTotalsTool, Tools::UncoveredLinesTool, Tools::CoverageTableTool, Tools::ValidateTool, Tools::HelpTool, Tools::VersionTool ].freeze
Instance Method Summary collapse
-
#initialize(context: SimpleCovMcp.context) ⇒ MCPServer
constructor
A new instance of MCPServer.
- #run ⇒ Object
-
#toolset ⇒ Object
Expose the registered tools so embedders can introspect without booting the server.
Constructor Details
#initialize(context: SimpleCovMcp.context) ⇒ MCPServer
Returns a new instance of MCPServer.
5 6 7 |
# File 'lib/simplecov_mcp/mcp_server.rb', line 5 def initialize(context: SimpleCovMcp.context) @context = context end |
Instance Method Details
#run ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/simplecov_mcp/mcp_server.rb', line 9 def run SimpleCovMcp.with_context(context) do server = ::MCP::Server.new( name: 'simplecov-mcp', version: SimpleCovMcp::VERSION, tools: toolset ) ::MCP::Server::Transports::StdioTransport.new(server).open end end |
#toolset ⇒ Object
Expose the registered tools so embedders can introspect without booting the server.
34 35 36 |
# File 'lib/simplecov_mcp/mcp_server.rb', line 34 def toolset TOOLSET end |