Module: Otto::MCP::Core
- Included in:
- Otto
- Defined in:
- lib/otto/mcp/core.rb
Overview
Core MCP (Model Context Protocol) methods included in the Otto class. Provides the public API for enabling and querying MCP server support.
Instance Method Summary collapse
-
#enable_mcp!(options = {}) ⇒ Object
Enable MCP (Model Context Protocol) server support.
-
#mcp_enabled? ⇒ Boolean
Check if MCP is enabled.
Instance Method Details
#enable_mcp!(options = {}) ⇒ Object
Enable MCP (Model Context Protocol) server support
18 19 20 21 22 23 24 |
# File 'lib/otto/mcp/core.rb', line 18 def enable_mcp!( = {}) ensure_not_frozen! @mcp_server ||= Otto::MCP::Server.new(self) @mcp_server.enable!() Otto.logger.info '[MCP] Enabled MCP server' if Otto.debug end |
#mcp_enabled? ⇒ Boolean
Check if MCP is enabled
28 29 30 |
# File 'lib/otto/mcp/core.rb', line 28 def mcp_enabled? @mcp_server&.enabled? end |