ocentra-enforcer
OfficialSupports integration with plain Git hooks to enforce rules locally.
Enables enforcement rules to be run as part of GitHub Actions workflows.
Supports integration with Lefthook for managing Git hooks with enforcement rules.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ocentra-enforcerexplain rule RR-7.3"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Ocentra Enforcer
product: native Rust repository-enforcement engine
entrypoints: "enforcer CLI | enforcer serve (MCP stdio) | optional Tauri UI"
core_model: "typed rules + deterministic validators -> structured findings"
scopes: "check/scan/verify: paths | git diff (--base/--head) | --all; verify also selects a named mode"
workflow: "choose the smallest check/scan/verify scope -> repair findings -> widen validation"
implementation: "Rust workspace; TypeScript is presentation-only in the optional UI"Ocentra Enforcer is a native Rust enforcement engine for local development and CI, with an MCP control boundary for coding assistants. It makes repository policy executable: the same rule system can scan a scope and return structured findings through the native CLI. Additional proof, diagnostics, and coordination engines exist in the workspace, but not every engine is wired to every public boundary yet.
The goal is straightforward: code should be accepted because deterministic checks support it, not because a person or agent remembered every convention.
What it provides
A Rust CLI and MCP stdio server from one codebase.
Typed rule records with documented IDs, validators, fixtures, and findings.
File, directory, workspace, and diff-oriented validation scopes.
Native Rust validation plus structural validation for TypeScript/JavaScript, Python, Dart, CFML, configuration, CI, dependencies, and generated files.
Library support for durable run diagnostics, proof artifacts, and coordination, with public-boundary availability documented below.
An optional Tauri control plane; the CLI remains standalone.
Related MCP server: AI Code Review MCP Server
Architecture
flowchart LR
A["Developer or CI"] --> B["CLI validation boundary"]
B --> C["Routing and scope"]
C --> D["Typed rule registry"]
D --> E["Native validators and tool adapters"]
E --> F["Structured findings"]
F --> G["Accept, repair, or escalate"]The Rust workspace separates the concerns deliberately:
Area | Responsibility |
| Command-line contract and human-readable output. |
| Stdio MCP boundary and structured tool responses. |
| Rule registry, policy evaluation, and validation. |
Language crates | Syntax-aware Rust, TypeScript/JavaScript, Python, Dart, CFML, infrastructure, and security analysis. |
| Durable run records, artifacts, and tool-result ingestion. |
| Optional claims, guard decisions, mail, and ledger state. |
| Optional desktop control plane. |
See the architecture guide for boundaries and runtime flow.
Build from source
Requirements:
Rust stable with Cargo
Node.js only when building or working on the optional Tauri frontend
cargo check --workspace
cargo test --workspace
cargo build --release -p enforcer-cliDuring development, invoke the CLI through Cargo:
cargo run -p enforcer-cli -- --help
cargo run -p enforcer-cli -- check --help
cargo run -p enforcer-cli -- serve --helpThe current CLI surface is check, scan, serve, ui, install, plan,
proof, coordination (alias ledger), memory, verify, advise,
architecture, onboard, and hook. check, scan, and verify accept one
explicit scope: paths, a --base/--head diff pair, or --all; verify
also selects a named verification mode. Use --help as the source of truth
for the build you are running.
install is currently a no-argument, user-level operation that registers the
native binary with all supported harness adapters and runs its internal health
check. The visible plan, proof, and coordination command groups are
reserved boundaries; this build does not yet expose subcommands for them.
memory cli forwards a requested codebase-memory operation to the native
memory transport. hook pretooluse evaluates a Claude Code edit/write payload
from standard input before the write is accepted.
The Rust MCP server currently executes four tool families: server status, coordination status, exact-path coordination claim, and UI launch/status. Other tools may appear in MCP discovery as registered contracts, but they currently return a structured not-wired error and must not be used as product capabilities.
Typical workflow
Choose an explicit CLI scope with
check,scan, orverify.Run the smallest meaningful validation scope.
Read compact diagnostics and repair the reported condition.
Retain the command output or report required by the repository's current evidence process; the native proof command is not wired yet.
Run the wider local or CI gate before accepting the change.
For repositories wired to the frozen Node compatibility service, its route tool may still be used according to that service's own documentation. The current Rust CLI and MCP server do not expose a working route operation.
Documentation
Internal planning material is intentionally kept under docs/plans/; it is
not the product contract. The current CLI, tests, and validators define the
supported runtime behavior.
Contribution and verification
Use the smallest scoped Enforcer check while editing, then run the appropriate workspace gate before declaring work complete. Do not weaken a policy, suppress a test, or add a broad waiver simply to produce a green result.
cargo fmt --check
cargo clippy --workspace -- -D warnings
cargo test --workspaceSee CONTRIBUTING.md and SECURITY.md for contribution and security-reporting expectations.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceMCP server that provides code validation rules and analysis for various stacks/frameworks, enabling automated code reviews and reporting directly from VS Code and other editors.
- Alicense-qualityFmaintenanceA code review tool server based on Model Context Protocol (MCP) providing multi-dimensional code review and scoring.7MIT
- Alicense-qualityBmaintenanceMCP server for automated code review using AI agents. It analyzes code diffs or file paths for bugs, security issues, and style violations.MIT
- AlicenseAqualityBmaintenanceDeterministic code review MCP server that provides tools for file selection, rule matching, comment positioning, and reflection, ensuring stable review quality without LLM calls.5541MIT
Related MCP Connectors
Scans MCP servers for tool poisoning, prompt injection and supply chain risks.
A MCP server built for developers enabling Git based project management with project and personal…
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ocentra/ocentra-enforcer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server