systemprompt-mcp 0.14.5

Native Model Context Protocol (MCP) implementation for systemprompt.io. Orchestration, per-server OAuth2, RBAC middleware, and tool-call governance — the core of the AI governance pipeline.
docs.rs failed to build systemprompt-mcp-0.14.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: systemprompt-mcp-0.15.1

Production infrastructure for AI agents

Website · Documentation · Guides · Core · Template · Discord


systemprompt-mcp

Crates.io Docs.rs License: BSL-1.1

Native Model Context Protocol (MCP) implementation for systemprompt.io. Orchestration, per-server OAuth2, RBAC middleware, and tool-call governance — the core of the AI governance pipeline.

Layer: Domain — business-logic modules that implement systemprompt.io features. Part of the systemprompt-core workspace.

Overview

Capabilities · MCP Governance

Native MCP server lifecycle, orchestration, and governance. Manages MCP process spawning, port allocation, proxy routing, RBAC middleware, schema validation, tool execution, artifact persistence, and UI rendering for the systemprompt.io platform.

Usage

[dependencies]
systemprompt-mcp = "0.14.0"

Architecture

Trait Implementations

Trait Implementation Location
ToolProvider McpToolProvider services/tool_provider/mod.rs
McpRegistry RegistryManager services/registry/trait_impl.rs
McpToolProvider RegistryManager services/registry/trait_impl.rs
McpDeploymentProvider McpDeploymentProviderImpl services/registry/trait_impl.rs
Extension McpExtension extension.rs

Structure

src/
├── lib.rs                          # Crate entry, router creation, re-exports
├── capabilities.rs                 # MCP Apps UI extension helpers
├── error.rs                        # McpDomainError and error types
├── extension.rs                    # McpExtension - schema registration, jobs, routes
├── progress.rs                     # Tool execution progress reporting
├── resources.rs                    # MCP resource definitions
├── response.rs                     # McpResponseBuilder and artifact response shaping
├── schema.rs                       # McpOutputSchema trait + artifact type bindings
├── state.rs                        # Shared crate state
├── tool.rs                         # Tool trait, McpToolExecutor
├── cli/
│   ├── mod.rs                      # CLI command exports
│   └── commands/mod.rs             # CLI command handlers
├── jobs/
│   ├── mod.rs                      # Background job exports
│   └── mcp_session_cleanup.rs      # Stale session cleanup job
├── middleware/
│   ├── mod.rs                      # Middleware exports
│   ├── session_manager.rs          # DatabaseSessionManager
│   ├── rbac.rs                     # RBAC entry point
│   └── rbac/
│       ├── jwt.rs                  # JWT-based RBAC
│       └── proxy.rs                # Proxy-verified identity RBAC
├── models/
│   └── mod.rs                      # ExecutionStatus, ValidationResultType, ToolExecution
├── orchestration/
│   ├── mod.rs                      # Orchestration module exports
│   ├── loader.rs                   # McpToolLoader - batch tool loading
│   ├── state.rs                    # ServiceStateManager - service state queries
│   └── models.rs                   # McpServiceState, ServerStatus, SkillLoadingResult
├── repository/
│   ├── mod.rs                      # Repository exports
│   ├── artifact/mod.rs             # McpArtifactRepository
│   ├── session/mod.rs              # McpSessionRepository
│   └── tool_usage/
│       ├── mod.rs                  # Tool execution persistence
│       └── stats.rs                # Tool usage statistics
└── services/
    ├── mod.rs                      # Service traits, manager exports
    ├── auth.rs                     # Auth helpers
    ├── providers.rs                # Provider trait wiring
    ├── client/
    │   ├── mod.rs                  # MCP client
    │   ├── http_client_with_context.rs  # HTTP client with context propagation
    │   ├── types.rs                # Client types
    │   └── validation.rs           # Connection validation
    ├── database/
    │   ├── mod.rs                  # Database manager
    │   ├── state.rs                # State operations
    │   └── sync.rs                 # State synchronisation
    ├── deployment/mod.rs           # Deployment configuration
    ├── lifecycle/
    │   ├── mod.rs                  # Lifecycle manager
    │   ├── health.rs               # Health checks
    │   ├── restart.rs              # Server restart
    │   ├── shutdown.rs             # Graceful shutdown
    │   └── startup.rs              # Server startup
    ├── monitoring/
    │   ├── mod.rs                  # Monitoring manager
    │   ├── health.rs               # HealthStatus, health execution
    │   ├── proxy_health.rs         # Proxy health monitoring
    │   └── status.rs               # Service status reporting
    ├── network/
    │   ├── mod.rs                  # Network manager
    │   ├── port_manager.rs         # Port allocation
    │   ├── proxy.rs                # HTTP proxy
    │   └── routing.rs              # Router and CORS
    ├── orchestrator/
    │   ├── mod.rs                  # McpOrchestrator coordinator
    │   ├── daemon.rs               # Background daemon
    │   ├── event_bus.rs            # Pub/sub event bus
    │   ├── events.rs               # McpEvent definitions
    │   ├── lifecycle_ops.rs        # Lifecycle operations
    │   ├── process_cleanup.rs      # Stale process cleanup
    │   ├── reconciliation.rs       # State reconciliation
    │   ├── schema_sync.rs          # Schema synchronisation
    │   ├── server_startup.rs       # Server startup orchestration
    │   ├── service_validation.rs   # Service validation
    │   ├── target_resolution.rs    # Server target routing
    │   └── handlers/
    │       ├── mod.rs              # EventHandler trait
    │       ├── database_sync.rs    # DB sync handler
    │       ├── health_check.rs     # Health check handler
    │       ├── lifecycle.rs        # Lifecycle handler
    │       └── monitoring.rs       # Monitoring handler
    ├── process/
    │   ├── mod.rs                  # Process manager
    │   ├── cleanup.rs              # Process termination
    │   ├── monitor.rs              # Process monitoring
    │   ├── pid_manager.rs          # PID tracking
    │   ├── spawner.rs              # Process spawning
    │   └── utils.rs                # Process utilities
    ├── registry/
    │   ├── mod.rs                  # Registry manager
    │   ├── manager.rs              # RegistryManager implementation
    │   ├── trait_impl.rs           # McpRegistry, McpToolProvider, McpDeploymentProvider impls
    │   └── validator.rs            # RegistryValidator
    ├── schema/
    │   ├── mod.rs                  # Schema service
    │   ├── loader.rs               # Schema loading
    │   └── validator.rs            # Schema validation
    ├── tool_provider/
    │   ├── mod.rs                  # McpToolProvider implementation
    │   ├── context.rs              # Tool invocation context
    │   └── conversions.rs          # Type conversions
    └── ui_renderer/
        ├── mod.rs                  # UI renderer entry point
        ├── csp.rs                  # CspPolicy builder
        └── registry.rs             # Renderer registry

Database

Schemas (in schema/):

  • mcp_tool_executions.sql — tool execution audit trail (ToolUsageRepository).
  • mcp_artifacts.sql — persisted MCP tool output artifacts (McpArtifactRepository).
  • mcp_sessions.sql — MCP session state for cross-restart resumption (McpSessionRepository).

License

BSL-1.1 (Business Source License). Source-available for evaluation, testing, and non-production use. Production use requires a commercial license. Each version converts to Apache 2.0 four years after publication. See LICENSE.


systemprompt.io · Documentation · Guides · Live Demo · Template · crates.io · docs.rs · Discord

Domain layer · Own how your organization uses AI.