SuperAPIAI Directory

cleimesh

github.com · AI security

CleiMesh is a security protection tool for AI agents. Its core idea is to impose signature restrictions on every MCP tool call outside the model and generate verifiable signed receipts. It addresses the problem that after an agent reads untrusted content (such as a poisoned webpage, email, or ticket), it may use the user's full permissions to perform dangerous operations such as sending, writing, or paying. Once the agent has read external content through a certain MCP server, before human confirmation, it cannot perform actions through other servers; this restriction is enforced by the node and cannot be bypassed by prompts. Every call, whether allowed or denied, leaves a signed receipt. Receipts are recorded via a hash chain and a Merkle tree, and auditors can verify them offline using only the public key. CleiMesh supports any local or remote MCP server, can be integrated into Claude Code or a shell with a single command, and also provides a guard installation method for coding agents. The project also includes delegable signed permission tokens, WebAssembly-based sandboxed execution, deterministic replay verification, taint propagation along the delegation chain, privacy reports, and SIEM export. It is currently in the Alpha stage, and the official documentation explicitly warns against using it to protect important assets.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux

About this tool

CleiMesh is a security and audit layer for AI agent tool calls. Its starting point is a common risk: when an agent has real tool permissions such as email, files, payments, and production environments, once it reads untrusted content containing instructions (webpages, tickets, emails), it may execute the attacker's intent with the user's full permissions, while the logs are recorded by the agent host itself and cannot prove what the agent was allowed to do.

Purpose and Positioning CleiMesh's core purpose is to "block the next step and prove the previous step." It does not try to filter prompts; instead, it imposes restrictions on tool calls outside the model: after an agent reads untrusted content through one MCP server, before manual clearance, it cannot perform actions such as sending, writing, or paying through another MCP server. This restriction is enforced by an external node, and prompts cannot persuade it to abandon the restriction.

Main Capabilities

  1. Signed receipts: Every tool call, whether allowed or denied, generates a signed receipt recording what the agent was allowed to do, what it read, what it executed, and what it denied. Receipts are recorded via a hash chain and an RFC 6962 Merkle tree. Any line that is edited, deleted, or reordered will cause verification to fail, and auditors can verify using only the public key.
  2. Taint propagation: Tools that read the external world are marked with --taints, and tools that perform actions are marked with --clean-only. Once an agent touches external content through a read-type tool, action-type tools across its entire delegation chain will be denied until manual clearance. Delegating work to a new sub-agent cannot wash away the taint.
  3. Delegable signed permissions: Tokens follow the IETF Attenuating Agent Tokens JWT draft. Agents can pass narrower permissions offline to sub-agents, but can never exceed the permissions they received.
  4. WebAssembly sandbox: Tools run in a WebAssembly environment that by default allows no operations, and tokens determine the directories, network access, and restrictions visible to the tool. When a sub-agent is granted ./project/docs, it is physically unable to read ./project.
  5. Deterministic replay: Each call runs using the frozen clock and seeded random numbers recorded in the receipt. Auditors can re-run and verify the output byte by byte, and nodes that sign false results will be discovered.
  6. Audit and compliance: Provides audit view to generate an HTML audit page, and audit report to output reports by data subject or agent (corresponding to Article 30 of the GDPR, Article 37 of Brazil's LGPD), and audit exports are sent to the SIEM as OCSF events.
  7. Coding agent protection: cleimesh guard install can place Claude Code or Codex under the same rules; once a session introduces external content, operations such as push, reading secrets, piping to curl, and editing CLAUDE.md will wait for human confirmation, and every decision has a signed receipt.

Usage

  • Use as a plugin in Claude Code, or from the shell; brew install cleitonaugusto/cleimesh/cleimesh installs it on macOS and Linux.
  • cleimesh mcp add places each MCP server behind a signed token, and the agent calls tools as usual. Remote servers (streamable HTTP) are also supported; only https or local http is allowed, the bearer token is read from a specified environment variable, and only the variable name is stored.
  • The wrapper itself can be served over HTTP: cleimesh mcp wrap --servers servers.json --listen 127.0.0.1:8765 --listen-token-env WRAP_TOKEN; requests without a bearer token are rejected.
  • A Docker evaluation suite is provided, which checks 19 properties and outputs PASS or FAIL.
  • A demo command is provided, so you can see an attack being rejected in about ten seconds without cloning the repository.

Use cases Suitable for teams that grant agents real tool permissions, especially in scenarios involving email, files, payments, production environments, and customer data; for compliance and security teams that need to demonstrate agent behavior to third-party auditors; and for developers using agent frameworks such as Claude Code, Cursor, LangGraph, and CrewAI who want to restrict tool calls.

Limitations and caveats The official documentation explicitly marks the current stage as Alpha, under active development, and it should not be relied upon to protect important assets. The threat model document lists what it protects, what it does not protect, and the gaps before 1.0. CleiMesh only constrains tools that pass through it: if the agent also retains its own shell or filetools, it can still use those tools, so these tools need to be disabled or filtered, or the agent must be run in a sandbox. When used in Claude Code, the node must run as a different user; otherwise the agent may read the node key and lift its own restrictions. On Windows, download the .exe from releases.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools