Shared wrapper for provider-backed component sources.
Providers are how a server exposes components that do not live directly on the
%FastestMCP.Server{} struct. Common examples are:
- mounted servers
- OpenAPI-backed tools
- skill-directory resources
- the live
FastestMCP.ComponentManager
This module wraps provider implementations so the runtime can ask every provider the same questions:
- what components do you expose?
- can you return a bounded keyset page for wire list operations?
- can you resolve this identifier directly?
- for a concrete resource URI, what is the backing target?
- do you expose extra HTTP routes?
Transforms
A provider can also be wrapped with transforms. Transforms rewrite component identifiers on the way out and translate them back on the way in. That is how namespacing and tool renaming are applied without changing the underlying provider implementation.
Summary
Functions
Adds a transform to the current definition.
Returns whether this provider can perform a bounded source-level component page lookup.
Resolves one component by type and identifier.
Resolves the backing resource target for a concrete URI.
Returns additional HTTP routes exposed by this provider.
Reads one source-level component page.
Lists the components exposed by this module.
Builds a new value for this module from the supplied options.
Returns the component or provider type.
Types
Functions
Adds a transform to the current definition.
Returns whether this provider can perform a bounded source-level component page lookup.
Resolves one component by type and identifier.
Resolves the backing resource target for a concrete URI.
Returns additional HTTP routes exposed by this provider.
Reads one source-level component page.
The optional provider callback is list_component_page/5 and receives the
provider value, component type, normalized stable after-key, requested limit,
and current operation. It must return {:ok, %{items: components, next_after: key_or_nil}} (the outer {:ok, ...} may be omitted). Components
use FastestMCP.Pagination.default_key/1 ordering. A non-nil next_after
declares that another source page is available. The callback returns source
candidates only; the shared pipeline still owns component transforms,
visibility, and authorization.
Provider transforms intentionally disable this callback because an arbitrary
rename can change ordering. Those providers retain the correct streaming
keyset fallback in FastestMCP.OperationPipeline.
Lists the components exposed by this module.
Builds a new value for this module from the supplied options.
Returns the component or provider type.