Attesto-native MCP server core.
The core is transport-neutral. AttestoMCP.Server.Plug and
AttestoMCP.Server.Stdio both call dispatch/4; handlers run under a
separately supervised task and receive only an explicit authorization
context.
Summary
Types
Registered primitive definition accepted by the registry.
A normal, failed, or modern interactive handler return.
Options for startup, limits, timeouts, cursor policy, and disabled task flags.
Functions
Consumes one bounded rate-limit token for a principal/category key.
Returns a specification to start this module under a supervisor.
Dispatch one decoded request and return a correlated response/result.
Returns normalized options used by the protocol adapters.
Registers one supported primitive type.
Registers a completion handler for an explicit prompt/template reference.
Registers a prompt and publishes a modern prompts-list invalidation.
Registers a static resource and publishes a modern resources-list invalidation.
Registers a URI-template resource and publishes a modern resources-list invalidation.
Registers a tool and publishes a modern tools-list invalidation.
Returns the negotiated minimum legacy log level for an owned session.
Sets the negotiated minimum legacy log level for an owned session.
Returns a deterministic registry snapshot.
Starts the supervised protocol core and its registry/subscription children.
Returns bounded public counters for sessions, streams, subscriptions, and requests.
Types
@type context() :: map()
Registered primitive definition accepted by the registry.
A normal, failed, or modern interactive handler return.
@type server_opts() :: AttestoMCP.Server.API.server_opts()
Options for startup, limits, timeouts, cursor policy, and disabled task flags.
Functions
Consumes one bounded rate-limit token for a principal/category key.
Returns a specification to start this module under a supervisor.
See Supervisor.
Dispatch one decoded request and return a correlated response/result.
Returns normalized options used by the protocol adapters.
Registers one supported primitive type.
@spec register_completion(pid() | atom(), String.t(), definition()) :: :ok | {:error, term()}
Registers a completion handler for an explicit prompt/template reference.
@spec register_prompt(pid() | atom(), String.t(), definition()) :: :ok | {:error, term()}
Registers a prompt and publishes a modern prompts-list invalidation.
@spec register_resource(pid() | atom(), String.t(), definition()) :: :ok | {:error, term()}
Registers a static resource and publishes a modern resources-list invalidation.
@spec register_resource_template(pid() | atom(), String.t(), definition()) :: :ok | {:error, term()}
Registers a URI-template resource and publishes a modern resources-list invalidation.
@spec register_tool(pid() | atom(), String.t(), definition()) :: :ok | {:error, term()}
Registers a tool and publishes a modern tools-list invalidation.
Returns the negotiated minimum legacy log level for an owned session.
@spec set_session_logging_level(pid() | atom(), binary(), term(), term(), String.t()) :: :ok | {:error, :not_found}
Sets the negotiated minimum legacy log level for an owned session.
Returns a deterministic registry snapshot.
@spec start_link(server_opts()) :: GenServer.on_start()
Starts the supervised protocol core and its registry/subscription children.
Returns bounded public counters for sessions, streams, subscriptions, and requests.