class
ActionController::MCPServer::Transport
- ActionController::MCPServer::Transport
- Reference
- Object
Overview
implements the Streamable HTTP transport
Defined in:
action-controller/mcp/transport.crConstant Summary
-
KEEPALIVE =
25.seconds -
RESOURCE_METADATA_PATH =
"/.well-known/oauth-protected-resource" -
SESSION_HEADER =
"Mcp-Session-Id" -
VERSION_HEADER =
"MCP-Protocol-Version"
Constructors
-
.new(route_handler : Router::RouteHandler, path : String = "/mcp", endpoint : Bool = false)
endpoint: trueserves the controller endpoint mounted at#path
Instance Method Summary
- #auth_cache : AuthCache
-
#bound : Array(String)
the path params bound from the URL, for controller endpoints
-
#delete(context : HTTP::Server::Context) : HTTP::Server::Context
terminates the session
-
#get(context : HTTP::Server::Context, head_request : Bool) : HTTP::Server::Context
opens an event stream for server to client messages
-
#path : String
the path the transport is mounted at, a template for controller endpoints
-
#post(context : HTTP::Server::Context) : HTTP::Server::Context
client to server messages
- #protocol : Protocol
-
#resource_metadata(context : HTTP::Server::Context) : HTTP::Server::Context
OAuth 2.0 protected resource metadata, see
MCPServer.resource_metadata - #sessions : SessionStore
Constructor Detail
def self.new(route_handler : Router::RouteHandler, path : String = "/mcp", endpoint : Bool = false)
#
endpoint: true serves the controller endpoint mounted at #path
Instance Method Detail
terminates the session
opens an event stream for server to client messages
client to server messages
OAuth 2.0 protected resource metadata, see MCPServer.resource_metadata