Skip to main content

MCP server + cross-harness skills for building and operating AI agents safely

Project description

๐Ÿ›ก๏ธ Cinch

MCP server + cross-harness skills for building and operating AI agents safely.

The model proposes; the architecture authorizes and enforces.

PyPI Python License CI Security Docs


Grounded in NIST AI RMF, CISA Secure AI Development, OWASP, MITRE ATLAS, CUSTODY, LASM, Google SAIF, and DORA 2025.

๐Ÿ“– Live docs & explorers: https://nirhalfon.github.io/cinch-ai-security/ โ€” browse every checklist, mapping, protocol, skill, and template; read the threat model; and try the MCP tools.

AI agents can read data, invoke tools, execute code, call APIs, and initiate business processes. When they go wrong โ€” through prompt injection, excessive autonomy, credential theft, or model error โ€” the consequences are only as severe as the environment allows. Cinch gives you the enforceable controls, protocols, and runtime queries to keep that environment contained.

โœจ What's inside

What Why it matters
๐Ÿ“‹ 6 checklists (117 controls) Enforceable, framework-mapped YAML โ€” not advice, controls
๐Ÿ“ก MCP server (7 tools) Any MCP-compatible agent queries controls/protocols/mappings at runtime
๐Ÿง  3 skills Drop-in Hermes skill definitions for security reviews & red-teaming
๐Ÿ“ 5 protocols Step-by-step deployment, incident-response, and evidence collection
๐Ÿ”— 5 mappings Crosswalks: NIST AI RMF ยท OWASP LLM ยท MITRE ATLAS ยท CUSTODY ยท LASM
๐Ÿ“„ 4 templates Security review, risk assessment, agent policy, deployment ADR

๐Ÿš€ Quick start for AI agents

You are an AI agent reading this repo. This section is for you. Three commands and one config block get you operational.

1. Install

pip install cinch-ai-security
# or, from source:
git clone https://github.com/nirhalfon/cinch-ai-security.git
cd cinch-ai-security && pip install -e .

2. Wire it into your MCP client

Add this to your MCP config (Claude Desktop, Claude Code, Cursor, etc.):

{
  "mcpServers": {
    "cinch": {
      "command": "cinch",
      "args": ["serve"]
    }
  }
}

3. Query the controls you need

Your tools (all return JSON):

Tool Use it to
checklist_run Run a named checklist against a description of your deployment
checklist_list List the 6 checklists and their item counts
checklist_get Get a specific control by ID (AC-001, AE-005, โ€ฆ)
protocol_get Get a step-by-step protocol by name (agent-deployment, evidence-collect, โ€ฆ)
mapping_lookup Look up controls mapped to a framework (nist-rmf, owasp-llm, atlas, custody, lasm)
threat_search Find every control that mitigates a given threat โ€” scans threat + control + verification + sources
checklist_diff Compare two checklists to surface coverage gaps and duplicated controls

Checklist ID prefixes: AC agent-containment ยท AE agent-environment ยท HE harness-engineering ยท RT red-team ยท SC supply-chain ยท SH system-hardening.

30-second smoke test

cinch serve &            # start the MCP server on stdio
# then call checklist_list from your MCP client, or:
python -c "from cinch.loader import list_checklists; [print(c['name'], c['item_count']) for c in list_checklists()]"

Use as a skill (Hermes / Claude / OpenClaw / NanoClaw)

# Hermes skill
cp -r skills/ai-harness-review ~/.hermes/skills/

# Claude Code โ€” drop into your project root; it auto-loads
cp cross-harness/claude/CLAUDE.md /your/project/CLAUDE.md

# OpenClaw / NanoClaw โ€” see cross-harness/openclaw/ and cross-harness/nanoclaw/

๐Ÿงญ Philosophy

  1. The model proposes; the architecture authorizes and enforces. Prompts are not a security boundary.
  2. An AI agent can be manipulated, compromised, or wrong. Its environment must prevent a bad decision from becoming an unrestricted system action.
  3. Functional correctness โ‰  security. 47.5% of AI-generated code may be functionally correct, but only 8.25% is also secure (ICLR 2026 vibe-coding benchmark).
  4. Capability accretion is the core risk. Agents silently gain practical authority through inherited credentials, trust relationships, tool access, and delegation chains.
  5. Defense in depth maps to architecture layers. A control at one layer does not detect an attack at another (LASM principle).

๐Ÿ“š Project structure

cinch/
โ”œโ”€โ”€ src/cinch/                      # MCP server (SDK 2.0)
โ”‚   โ”œโ”€โ”€ server.py                   # 7 tool definitions + entry point
โ”‚   โ””โ”€โ”€ loader.py                   # YAML checklist/protocol/mapping loader (path-traversal-safe)
โ”œโ”€โ”€ checklists/                     # 6 checklists ยท 117 controls
โ”‚   โ”œโ”€โ”€ agent-containment.yaml      # CUSTODY-based agent containment (AC)
โ”‚   โ”œโ”€โ”€ agent-environment.yaml      # host/container controls, out-of-band audited (AE)
โ”‚   โ”œโ”€โ”€ harness-engineering.yaml    # AI dev harness safeguards (HE)
โ”‚   โ”œโ”€โ”€ system-hardening.yaml       # OS/infra hardening for AI workloads (SH)
โ”‚   โ”œโ”€โ”€ red-team.yaml               # AI red team engagement checklist (RT)
โ”‚   โ””โ”€โ”€ supply-chain.yaml           # AI supply chain security (SC)
โ”œโ”€โ”€ protocols/                      # 5 how-to procedures
โ”‚   โ”œโ”€โ”€ agent-deployment.md
โ”‚   โ”œโ”€โ”€ evidence-collect.md         # out-of-band signed-JSON host evidence for AE controls
โ”‚   โ”œโ”€โ”€ incident-response.md
โ”‚   โ”œโ”€โ”€ red-team-engagement.md
โ”‚   โ””โ”€โ”€ harness-setup.md
โ”œโ”€โ”€ skills/                         # 3 Hermes skills
โ”‚   โ”œโ”€โ”€ ai-harness-review/SKILL.md
โ”‚   โ”œโ”€โ”€ agent-audit/SKILL.md        # + separation-of-duties / --self-audit rule
โ”‚   โ””โ”€โ”€ ai-red-team/SKILL.md
โ”œโ”€โ”€ mappings/                       # 5 framework crosswalks
โ”‚   โ”œโ”€โ”€ nist-rmf-crosswalk.yaml
โ”‚   โ”œโ”€โ”€ owasp-llm-crosswalk.yaml
โ”‚   โ”œโ”€โ”€ atlas-crosswalk.yaml
โ”‚   โ”œโ”€โ”€ custody-crosswalk.yaml
โ”‚   โ””โ”€โ”€ lasm-crosswalk.yaml
โ”œโ”€โ”€ cross-harness/                  # agent platform configs
โ”‚   โ”œโ”€โ”€ claude/CLAUDE.md
โ”‚   โ”œโ”€โ”€ openclaw/agent-config.yaml
โ”‚   โ””โ”€โ”€ nanoclaw/agent-config.yaml
โ”œโ”€โ”€ templates/                      # 4 review/policy/ADR templates
โ”œโ”€โ”€ docs/                           # threat-model, research-references, design-rationale
โ”œโ”€โ”€ docs-site/                      # GitHub Pages SPA (vanilla JS) โ€” data/full.json is generated
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ build_docs_json.py          # deterministic full.json generator (run on every source change)
โ”‚   โ””โ”€โ”€ migrate_schema.py           # one-time Schema B โ†’ canonical Schema A migration
โ”œโ”€โ”€ tests/                          # pytest: loader + server (path-traversal, dispatch, diff)
โ””โ”€โ”€ .github/
    โ”œโ”€โ”€ dependabot.yml              # weekly pip + github-actions updates
    โ””โ”€โ”€ workflows/
        โ”œโ”€โ”€ validate.yaml           # CI: YAML, imports, ruff, bandit, pip-audit, content gate, pytest, full.json sync
        โ”œโ”€โ”€ security-scan.yml       # CodeQL, semgrep, dependency-review, gitleaks, SBOM
        โ””โ”€โ”€ pages.yml               # deploy docs-site to GitHub Pages

๐Ÿ”ฌ Research grounding

Source Coverage
NIST AI RMF 1.0 Risk governance (GOVERN, MAP, MEASURE, MANAGE)
NIST AI 600-1 GenAI Profile Generative AI-specific risks and controls
CISA Secure AI System Development Secure AI lifecycle controls
OWASP Top 10 for LLMs LLM application security risks
OWASP Agentic AI Agent threat modeling and controls
MITRE ATLAS Adversarial threat landscape for AI
CUSTODY Framework Autonomous agent containment
LASM Layered Attack Surface Model
Google SAIF Secure AI Framework
CSA AICM AI Controls Matrix
ETSI SAI AI cybersecurity standardization
AI Harness Scorecard Engineering safeguards for AI-assisted dev
DORA 2025 CI/CD practices, stability metrics
SlopCodeBench Subtle correctness in AI-generated code

๐Ÿค Contributing

See CONTRIBUTING.md. Every checklist item, protocol step, and mapping must cite a source. To regenerate the docs bundle after any source change:

python scripts/build_docs_json.py   # then commit docs-site/data/full.json (CI verifies sync)

๐Ÿ”’ Security

See SECURITY.md for vulnerability reporting. This project dogfoods its own controls โ€” the repo itself is scanned with CodeQL, semgrep, bandit, pip-audit, and gitleaks on every push.

๐Ÿ“„ License

CC BY 4.0 โ€” free to share and adapt with attribution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cinch_ai_security-1.0.0.tar.gz (162.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cinch_ai_security-1.0.0-py3-none-any.whl (78.3 kB view details)

Uploaded Python 3

File details

Details for the file cinch_ai_security-1.0.0.tar.gz.

File metadata

  • Download URL: cinch_ai_security-1.0.0.tar.gz
  • Upload date:
  • Size: 162.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.4

File hashes

Hashes for cinch_ai_security-1.0.0.tar.gz
Algorithm Hash digest
SHA256 03ae4910e76f5fbf57bfc67b6a9b617485a0d5199dee5b6809d7aebff06688b5
MD5 3be8d81fa99137d16947eb0e52783574
BLAKE2b-256 930884945d5be46648e9a3bf7f18cb9b3ac1db8f14da34b25366f8819e0c6872

See more details on using hashes here.

File details

Details for the file cinch_ai_security-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cinch_ai_security-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ff2a0a6e98d37162b22c7a98de7e14af7f30ef3c677b19bcbc406e0b18042c9
MD5 3fd205b1e1a7c67a51dfd86e3c9c792c
BLAKE2b-256 3286db34f52b9a3005118eaad4aab3262828a526cc660f1b1d7d56145384895f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page