Expand description
An advanced handler registry with metrics and enhanced features. Advanced registry with MCP protocol handler support and observability.
This registry extends the crate::registry::Registry base with:
- MCP protocol handlers (elicitation, completion, resource templates, ping)
- Handler call statistics (invocation count, duration, errors)
- Capability tracking per handler
- Thread-safe concurrent access via
DashMap
§When to Use This Registry
Use EnhancedRegistry when you need:
- MCP protocol handler registration (elicitation, completion, etc.)
- Observability into handler usage patterns
- Production-grade monitoring and debugging
- Capability discovery per registered handler
§Comparison with Base Registry
| Feature | crate::registry::Registry | EnhancedRegistry |
|---|---|---|
| Component storage | ✅ | ✅ (via base) |
| MCP handlers | ❌ | ✅ |
| Statistics | ❌ | ✅ |
| Observability | ❌ | ✅ |
| Overhead | Zero | Minimal (atomic counters) |
§Related Registries
crate::registry::Registry- Base registry (used internally by this one)turbomcp_server::registry::HandlerRegistry- Server-specific DashMap-based registry
Structs§
- Enhanced
Registry - Enhanced registry with handler support
- Handler
Stats - Statistics about registered handlers