MCPC::HttpConnection
This MCP connection encapsulates HttpTransport and JsonRpcSession, adding additional
processing and awareness.
Usage example:
mcp = MCPC::HttpConnection.new(ECHO)
puts mcp.list_tools
puts mcp.call_tool("echo", Hash{"message" => "Hello, world!"})
Constructors
new(url, tracing : Bool = false, auth_token : Nil | SensitiveData(String) = nil, transport_type : MCPC::TransportType = TransportType::AutoDetect)
Sets up the MCP connection
Instance methods
Calls a tool and returns the content from the reply on success
Calls a tool and returns the content from the reply on success
list_prompts
Sourcereset
Reset to re-initialize the connection whenever calls fail with a 404 error; sets up a new transport and session, and initializes the session. TODO better handling of reset scenarios.
server_name
Sourceserver_version
Sourcesupports_prompts?
Sourcesupports_resources?
Sourcesupports_roots?
Sourcesupports_tools?
Sourcetracing?
Sourcetransport_type
Sourceuri
Source