Class: PromptObjects::MCP::Server
- Inherits:
-
Object
- Object
- PromptObjects::MCP::Server
- Defined in:
- lib/prompt_objects/mcp/server.rb
Overview
MCP Server exposing PromptObjects functionality This allows any MCP client (Claude Desktop, Go TUI, etc.) to interact with POs
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#mcp_server ⇒ Object
readonly
Returns the value of attribute mcp_server.
Instance Method Summary collapse
-
#initialize(objects_dir: "objects", primitives_dir: nil) ⇒ Server
constructor
A new instance of Server.
- #start ⇒ Object
Constructor Details
#initialize(objects_dir: "objects", primitives_dir: nil) ⇒ Server
Returns a new instance of Server.
12 13 14 15 16 17 |
# File 'lib/prompt_objects/mcp/server.rb', line 12 def initialize(objects_dir: "objects", primitives_dir: nil) @objects_dir = objects_dir @primitives_dir = primitives_dir @env = nil @context = nil end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
10 11 12 |
# File 'lib/prompt_objects/mcp/server.rb', line 10 def env @env end |
#mcp_server ⇒ Object (readonly)
Returns the value of attribute mcp_server.
10 11 12 |
# File 'lib/prompt_objects/mcp/server.rb', line 10 def mcp_server @mcp_server end |
Instance Method Details
#start ⇒ Object
19 20 21 22 23 |
# File 'lib/prompt_objects/mcp/server.rb', line 19 def start setup_environment setup_mcp_server run_stdio_transport end |