systemprompt-mcp 0.21.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.
Documentation

Production infrastructure for AI agents

Website · Documentation · Guides · Core · Template · Discord


systemprompt-mcp

Crates.io Docs.rs License: BSL-1.1 codecov

Every MCP tool call through one audited path. Native Model Context Protocol orchestration with per-server OAuth2, RBAC middleware, and tool-call governance, so no tool runs without passing the same checks and landing in the same audit trail.

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 across systemprompt.io.

Usage

[dependencies]
systemprompt-mcp = "0.21"

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

Module Layout

Module Purpose
middleware/ Request middleware: rbac/ (JWT and proxy-verified identity) and session_handler/ (DatabaseSessionHandler implementing the rmcp SessionManager trait against the database).
orchestration/ Batch tool loading and service-state queries.
repository/ Compile-time-verified persistence for MCP sessions, artifacts, and tool-usage stats.
services/client/ MCP client with context-propagating HTTP transport and connection validation.
services/lifecycle/ Server startup, restart, graceful shutdown, and health.
services/network/ Port allocation, HTTP proxy, and router/CORS routing.
services/orchestrator/ McpOrchestrator: daemon, event bus, reconciliation, schema sync, and event handlers.
services/process/ Subprocess spawning, PID tracking, monitoring, and cleanup.
services/registry/ RegistryManager and the McpRegistry/McpToolProvider/McpDeploymentProvider trait impls.
services/schema/ Schema loading and validation.
services/tool_provider/ McpToolProvider implementation and tool-invocation context.
services/ui_renderer/ MCP Apps UI rendering with a CSP policy builder.
models/ · jobs/ · cli/ Execution/validation types, the stale-session cleanup job, and CLI command handlers.

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.