Expand description
Native Model Context Protocol (MCP) implementation for systemprompt.io.
This crate hosts the in-process MCP server runtime, the registry/orchestrator that supervises per-tenant MCP child processes, the OAuth2/RBAC middleware, and the tool/resource/UI-renderer abstractions used across the platform.
§Layered components
extension::McpExtension—Extensionregistration entry-point.services::McpManager,services::orchestrator::McpOrchestrator— top-level service supervisors.services::registry::RegistryManager— registry of MCP servers configured viaservices.yaml.services::tool_provider::McpToolProvider— tool-discovery + execution facade.middleware::rbac— JWT/proxy-verified RBAC layer.orchestration— multi-server lifecycle/state management.repository— Postgres persistence for sessions, artifacts, tool usage.
§Feature matrix
This crate has no Cargo features today; it is built as a single unit. The
facade crate systemprompt gates this crate behind the mcp / full
features.
§Errors
All public APIs return McpDomainResult — a typed Result aliased over
McpDomainError. External error types (sqlx, serde_json, io,
join errors) are composed via #[from] on the error enum. Third-party
errors without a typed adapter are converted at the boundary with
.map_err(|e| McpDomainError::Internal(e.to_string())).
Re-exports§
pub use repository::CreateMcpArtifact;pub use repository::McpArtifactRecord;pub use repository::McpArtifactRepository;pub use services::monitoring::health::HealthStatus;pub use services::registry::McpServerRegistry;pub use services::registry::trait_impl::McpDeploymentProviderImpl;pub use services::tool_provider::McpToolProvider;pub use services::EventBus as McpEventBus;pub use services::McpEvent;pub use services::McpManager;pub use services::ServiceManager;pub use orchestration::McpServerConnectionInfo;pub use orchestration::McpServiceState;pub use orchestration::McpToolLoader;pub use orchestration::ServerStatus;pub use orchestration::ServiceStateManager;pub use orchestration::SkillLoadingResult;
Modules§
- middleware
- Publicly re-exported submodule. See submodule rustdoc for details.
- models
- Domain models for MCP — sessions, artifacts, validation results, etc.
- orchestration
- Publicly re-exported submodule. See submodule rustdoc for details.
- registry
- repository
- Publicly re-exported submodule. See submodule rustdoc for details.
- services
- Publicly re-exported submodule. See submodule rustdoc for details.
Structs§
- Artifact
Viewer Config - Deployment
- Deployment
Config - McpError
- Error information for JSON-RPC error responses.
- McpExtension
- McpHttp
Config - McpResponse
Builder - McpServer
Config - McpServer
Metadata - McpServer
State - McpState
- McpTool
Executor - OAuth
Requirement - Protocol
Version - Represents the MCP protocol version used for communication.
- Session
Timeouts - Settings
Enums§
Constants§
Traits§
Functions§
- build_
artifact_ viewer_ resource - build_
experimental_ capabilities - create_
progress_ callback - create_
router - default_
server_ icons - default_
tool_ visibility - list_
services - mcp_
apps_ ui_ extension - mcp_
protocol_ version - model_
only_ visibility - read_
artifact_ viewer_ resource - show_
status - start_
services - stop_
services - tool_
ui_ meta - visibility_
to_ json