Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Cask - Agent tool supply chain and verification

Turn any web API into a governed, agent-ready MCP server in one command.

Cask captures real API traffic, compiles it into governed tool definitions, and serves them through MCP with lockfile-based approval, drift detection, and verification contracts. Every tool your AI agent uses is auditable, versioned, and fail-closed by default.

See It Work (30 seconds)

pip install caskmcp
cask demo

What just happened:

  • Compiled a governed toolpack from offline fixtures
  • Enforced fail-closed lockfile governance (no lockfile = no runtime)
  • Proved deterministic replay parity between two independent runs
  • Emitted prove_summary.json, prove_twice_report.md, and prove_twice_diff.json

Exit code 0 means governance held, parity passed, and everything is deterministic.

Quick Start (5 minutes)

# 1. Initialize cask in your project
cask init

# 2. Capture traffic and compile a governed toolpack
cask mint https://your-app.com -a api.your-app.com

# 3. Review what changed (risk-classified diff)
cask diff --toolpack .caskmcp/toolpacks/*/toolpack.yaml

# 4. Approve tools for use
cask gate allow --all

# 5. Start the governed MCP server
cask serve --toolpack .caskmcp/toolpacks/*/toolpack.yaml

Your AI agent now has governed, auditable access to your API.

How It Works

  Capture ─── Compile ─── Review ─── Approve ─── Serve ─── Verify
    │            │           │          │           │          │
  HAR/OTEL    tools.json   cask diff  lockfile   MCP stdio  contracts
  OpenAPI     policy.yaml            signatures              drift
  Browser     contracts                                      evidence

Capture real traffic (HAR, OpenTelemetry, OpenAPI specs, or live browser sessions). Compile into deterministic, versioned tool definitions with risk classification. Review changes with cask diff -- every new tool, schema change, or host addition is risk-classified. Approve via signed lockfile entries -- explicit human decisions, not silent defaults. Serve through MCP with fail-closed enforcement -- unapproved tools never execute. Verify with assertion-based contracts, drift detection, and evidence bundles for CI.

Traffic Capture

Start where you already are:

You have Command Best for
Nothing (just exploring) cask demo Fastest first run, no credentials needed
A web app to capture cask mint https://app.example.com -a api.example.com Capturing real authorized behavior
HAR/OTEL files cask capture import traffic.har -a api.example.com Adopting Cask without recapturing
An OpenAPI spec cask capture import openapi.yaml -a api.example.com Generating tools from specs

All paths converge to the same governed runtime.

Core Commands

Command What it does
cask init Initialize Cask in your project
cask mint <url> Capture traffic and compile a toolpack
cask diff Generate a risk-classified change report
cask gate allow Approve tools for use
cask gate check CI gate: exit 0 only if all tools approved
cask serve Start the governed MCP server (stdio)
cask run Execute a toolpack with policy enforcement
cask drift Detect capability surface changes
cask verify Run verification contracts
cask config Generate MCP client config snippet
cask demo Prove governance works (offline, 30 seconds)

Tip: Both cask and caskmcp work as the CLI entry point. cask is preferred.

Run cask --help for the full command tree, or cask --help-all for advanced commands.

Why Cask?

Safe by default. Fail-closed lockfile enforcement means unapproved tools never run. No lockfile, no runtime. Period.

Auditable. Every approval is signed. Every runtime decision produces a trace. Every verification run creates an evidence bundle.

Deterministic. Same inputs produce identical artifacts and digests. Replay parity is a first-class contract, not an aspiration.

Zero friction. cask demo proves the entire governance loop offline in 30 seconds. cask mint captures and compiles in one command. OpenAPI specs are auto-detected on import.

CI-native. cask gate check gates deployments. cask drift catches API surface changes. cask verify runs assertion-based contracts. All exit codes are machine-readable.

MCP Client Config

Generate a config snippet for your AI client:

# For Claude Desktop
cask config --toolpack .caskmcp/toolpacks/*/toolpack.yaml --format json

# For Codex
cask config --toolpack .caskmcp/toolpacks/*/toolpack.yaml --format codex

Or add this to your Claude Desktop config (~/.claude/claude_desktop_config.json):

{
  "mcpServers": {
    "my-api": {
      "command": "cask",
      "args": ["serve", "--toolpack", "/path/to/toolpack.yaml"]
    }
  }
}

Verification Workflows

Cask integrates with Tide for structured, multi-step verification workflows:

# Create a starter workflow
cask workflow init

# Execute a workflow and emit evidence
cask workflow run tide.yaml

# Replay a previous run
cask workflow replay .tide/runs/<run_id>

# Compare two runs
cask workflow diff run_a/ run_b/

# Generate a report
cask workflow report .tide/runs/<run_id>

# Bundle a run into a portable zip
cask workflow pack .tide/runs/<run_id>

# Export evidence in a specific format
cask workflow export cask .tide/runs/<run_id>

# Check dependency status
cask workflow doctor

Workflows support shell, HTTP, browser, and MCP step types. Each run produces an evidence bundle with digests.

Installation

# Base install (includes offline demo)
pip install caskmcp

# With MCP server support
pip install "caskmcp[mcp]"

# With live browser capture
pip install "caskmcp[playwright]"
python -m playwright install chromium

# Everything
pip install "caskmcp[all]"

For development:

git clone https://github.com/caskmcp/CaskMCP.git
cd CaskMCP/cask
pip install -e ".[dev]"

The Problem Cask Solves

AI agents need tools. MCP gives them tools. But who governs what those tools can do?

MCP adoption is accelerating while trust and safety remain unsolved:

Cask provides the missing governance layer: local, deterministic, auditable, fail-closed.

Documentation

Development

pip install -e ".[dev,packaging-test]"
pytest tests/ -v
ruff check caskmcp tests
mypy caskmcp --ignore-missing-imports

Metadata

Release files for caskmcp 0.2.0rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for caskmcp 0.2.0rc1
File Size Uploaded
caskmcp-0.2.0rc1.tar.gz 519.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for caskmcp 0.2.0rc1
File Interpreter ABI Platform
caskmcp-0.2.0rc1-py3-none-any.whl Python 3 none any Details

Total release size: 832.8 kB

Release files / caskmcp-0.2.0rc1.tar.gz

Download URL caskmcp-0.2.0rc1.tar.gz
Size 519.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5b9a0eb83e8fa404497ffd8c228e9063203014953bf1df287d45528e72777c7c
BLAKE2b-256 checksum
How to use checksums
34616942c0f0f393d039232a26b521dfdc9357149e479aa614785cdb096ccfd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 21, 2026.

Transparency log

Release files / caskmcp-0.2.0rc1-py3-none-any.whl

Download URL caskmcp-0.2.0rc1-py3-none-any.whl
Size 313.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23f20b6c658af18369d9f22d08a877f8bbc1449260735498ba1c8e6a01d6b5ff
BLAKE2b-256 checksum
How to use checksums
9c7fdfe8eac1ab133ca6c63313ce744a1e8586e644d6ac53718353a44c409293
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0rc1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page