Class: Rubydex::CLI::Command::Mcp

Inherits:
Command
  • Object
show all
Defined in:
lib/rubydex/cli/command/mcp.rb

Instance Method Summary collapse

Instance Method Details

#runObject

: -> void



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/rubydex/cli/command/mcp.rb', line 16

def run
  parse_options!

  path = argv.shift || Dir.pwd
  abort_with_usage("unexpected argument: #{argv.first}") unless argv.empty?

  # The MCP server manages its own graph lifecycle for the given workspace, so it does not go
  # through `build_graph`.
  require "rubydex/mcp_server"
  Rubydex::MCPServer.run(path)
end