Class: RailsAiBridge::Doctor::Checkers::McpBuildableChecker

Inherits:
BaseChecker
  • Object
show all
Defined in:
lib/rails_ai_bridge/doctor/checkers/mcp_buildable_checker.rb

Overview

Verifies the MCP server can be built for this application.

Instance Attribute Summary

Attributes inherited from BaseChecker

#app

Instance Method Summary collapse

Methods inherited from BaseChecker

#initialize

Constructor Details

This class inherits a constructor from RailsAiBridge::Doctor::Checkers::BaseChecker

Instance Method Details

#callDoctor::Check

Returns +:pass+ on successful build; +:fail+ if build raises.

Returns:

  • (Doctor::Check)

    +:pass+ on successful build; +:fail+ if build raises



9
10
11
12
13
14
15
# File 'lib/rails_ai_bridge/doctor/checkers/mcp_buildable_checker.rb', line 9

def call
  Server.new(app).build
  new_check(name: 'MCP server', status: :pass, message: 'MCP server builds successfully', fix: nil)
rescue StandardError => error
  new_check(name: 'MCP server', status: :fail, message: "MCP server failed to build: #{error.message}",
            fix: 'Check mcp gem installation: `bundle info mcp`')
end