# Chimera-Protocol/csl-core [Health: Active]

**Category:** 🔒 Security  
**Repository:** https://github.com/Chimera-Protocol/csl-core  
**GitHub Stars:** 16  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/chimera-protocol-csl-core

## Description
Deterministic AI safety policy engine with Z3 formal verification. Write, verify, and enforce machine-verifiable constraints for AI agents via MCP.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "csl-core": {
    "command": "uvx",
    "args": ["csl-core"]
  }
}
```

## Documentation

## What Chimera-Protocol/csl-core does

Chimera-Protocol/csl-core MCP server is built around CSL policy files that describe allowed values, state constraints, and enforcement behavior. A policy can, for example, permit reads while blocking deletes for users below a specified level. The rules are compiled into an executable policy representation and evaluated independently of the language model.

The runtime returns an allow or block result for an input context. In the documented Python example, `load_guard()` loads a `.csl` file and `guard.verify()` evaluates a dictionary of values. This design is intended for controls such as user tiers, environments, rate limits, and restrictions on sensitive or destructive operations.

## How it works

A CSL file contains a `CONFIG` section and one or more domains. Domains declare variables and constraints. Conditions can combine comparisons with `AND` and `OR`, allowing policies to distinguish between actions instead of applying one global deny rule.

The `verify` command compiles a policy and checks its logical consistency with Z3. The `simulate` command evaluates one input or a batch of JSON test cases. The `repl` command provides an interactive way to submit scenarios and inspect whether they are allowed or blocked.

For policies that enable formal verification, the `formal` command runs the TLC model checker through Java. The README describes exhaustive exploration of the abstract state space and reports counterexample traces when temporal properties do not hold. This is separate from the normal runtime verification path.

## Setup and configuration

Install the Python package with:

```bash
pip install csl-core
```

Create a `.csl` policy file, then use commands such as `cslcore verify policy.csl`, `cslcore simulate policy.csl --input '{"action":"DELETE","user_level":2}'`, or `cslcore repl policy.csl`. Batch simulation accepts a JSON file and can produce JSON output for CI/CD workflows.

Python applications can load a policy with `from chimera_core import load_guard`. The documented LangChain integration wraps tools with `guard_tools()` or inserts a policy checkpoint with `gate()`. Context values passed through `inject` are supplied by the application rather than generated by the model.

## Tools and capabilities

Chimera-Protocol/csl-core MCP server supports these documented capabilities:

- Define constraints in `.csl` files.
- Check policy consistency with Z3.
- Evaluate individual and batch scenarios.
- Inspect policies interactively through a REPL.
- Run TLA+ model checking when enabled.
- Enforce checks before LangChain tools execute.
- Add application-controlled runtime context to policy evaluation.

The material does not list named MCP tools, an MCP endpoint, or configuration examples for a particular MCP client.

## Limitations and notes

The README presents benchmark results for a specific set of models, attacks, and model versions, with reruns pending against current models. Those figures should not be treated as a general guarantee for every policy or deployment.

The policy engine can only evaluate variables and constraints that the application supplies. Integrators must decide where to place checks and provide trustworthy context such as the authenticated user role or deployment environment. The LangChain examples cover tool interception and LCEL chain checkpoints; no equivalent integration details are provided for other agent frameworks.

Although the listing describes Chimera-Protocol/csl-core MCP server, the supplied documentation focuses on the Python package, CLI, and LangChain plugin. It does not establish whether Claude Desktop, Cursor, Windsurf, or Cline can connect directly, nor does it specify an MCP launch command.

## Getting started with this Chimera-Protocol/csl-core MCP server
Always refer to the official documentation for the most accurate and up-to-date information.

_Full upstream README: https://allmcps.com/mcp/chimera-protocol-csl-core/readme_

