Skip to content

class ActionController::MCPServer::Transport
inherits Reference #

implements the Streamable HTTP transport

Constants#

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")#

View source

Methods#

#auth_cache : AuthCache#

View source

#delete(context : HTTP::Server::Context) : HTTP::Server::Context#

terminates the session

View source

#get(context : HTTP::Server::Context, head_request : Bool) : HTTP::Server::Context#

opens an event stream for server to client messages

View source

#path : String#

the path the transport is mounted at

View source

#post(context : HTTP::Server::Context) : HTTP::Server::Context#

client to server messages

View source

#protocol : Protocol#

View source

#resource_metadata(context : HTTP::Server::Context) : HTTP::Server::Context#

OAuth 2.0 protected resource metadata, see MCPServer.resource_metadata

View source

#sessions : SessionStore#

View source