Class: Toolchest::Endpoint

Inherits:
Object
  • Object
show all
Defined in:
lib/toolchest/endpoint.rb

Overview

Rack app for MCP protocol requests (JSON-RPC over HTTP). OAuth endpoints are handled by Rails controllers via engine routes.

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/toolchest/endpoint.rb', line 5

def call(env)
  Engine.ensure_initialized!

  mount_key = (env["toolchest.mount_key"] || "default").to_sym
  app = Toolchest.router(mount_key).rack_app ||= RackApp.new(mount_key: mount_key)
  app.call(env)
end