Excessibility.MCP.Registry (Excessibility v0.14.0)
View SourceAuto-discovers MCP tools, resources, and prompts at compile time.
Built-in modules are discovered from:
lib/excessibility/mcp/tools/- Tool moduleslib/excessibility/mcp/resources/- Resource moduleslib/excessibility/mcp/prompts/- Prompt modules
Custom Plugins
Users can register custom modules via application config:
# config/test.exs
config :excessibility,
custom_mcp_tools: [MyApp.MCP.Tools.Custom],
custom_mcp_resources: [MyApp.MCP.Resources.Custom],
custom_mcp_prompts: [MyApp.MCP.Prompts.Custom]Custom modules must implement the appropriate behaviour.
Usage
# Get all tools (built-in + custom)
Registry.discover_tools()
# Get tool by name
Registry.get_tool("e11y_check")
# Get all resources
Registry.discover_resources()
# Find resource for URI
Registry.get_resource_for_uri("snapshot://test.html")
Summary
Functions
Returns all registered prompts (built-in + custom).
Returns all registered resources (built-in + custom).
Returns all registered tools (built-in + custom).
Finds a prompt by name.
Finds a resource by name.
Finds a resource that can handle the given URI.
Finds a tool by name.
Functions
Returns all registered prompts (built-in + custom).
Custom prompts can be configured via :custom_mcp_prompts in app config.
Returns all registered resources (built-in + custom).
Custom resources can be configured via :custom_mcp_resources in app config.
Returns all registered tools (built-in + custom).
Custom tools can be configured via :custom_mcp_tools in app config.
Finds a prompt by name.
Returns nil if not found.
Finds a resource by name.
Returns nil if not found.
Finds a resource that can handle the given URI.
Returns nil if no matching resource found.
Finds a tool by name.
Returns nil if not found.