Skip to main content
Pre-release

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


DW CORE is a sovereign, self-hosted governance and control layer for AI agents — not an agent orchestrator.

It sits deterministically between any MCP-compatible AI client (Claude Code, Cursor, Codex, custom agents) and your upstream MCP servers (stdio and Streamable HTTP/TLS), enforcing declarative policy, cryptographic human-in-the-loop approval, tool definition pinning, and tamper-evident execution logs without binding you to any LLM vendor.

DW Core Architecture — Connect. Govern. Trust.

The Six Pillars

Pillar What It Enforces
Policy Guard Re-reads declarative TOML policy on every tools/call via a fail-closed PolicyReloader. destructive, egress, and unknown tools can never be configured as allow.
Human Approval Single-use out-of-band HITL (dw-approve-ui) binding (client, call_fingerprint, tool_definition_hash, matched_rule, policy_hash). Self-approval is disabled by default; payloads > 32 KiB require explicit truncated-payload confirmation.
Flight Recorder Append-only SHA-256 hash-chained SQLite events ledger with transactional HITL audit (BEGIN IMMEDIATE) and external anchor verification (dwcore audit verify --anchor-seq ... --anchor-hash ...).
Registry & Pinning Canonical SHA-256 pinning over name, title, description, inputSchema, and outputSchema. Automatically quarantines drifted tools, new unapproved tools, injection-like descriptions, and schemas deeper than 20 levels.
Shadow Mode Time-bounded observation (shadow_until, max 30 days) with automatic fallback to enforce on expiry — while preserving absolute ToolClass.DESTRUCTIVE protection, OutputGuard, CaMeL-lite, and Registry quarantine.
Policy Replay Deterministic offline policy impact simulation against recorded ledger calls (dwcore policy replay), with exact call_id deduplication, zero business-argument leakage, and factual coverage metrics.

Design Philosophy

  • Sovereignty & Self-Hosted: Runs locally in stdio or behind your own HTTPS/TLS boundary (--trusted-proxies CIDR-aware). Zero SaaS telemetry, zero external control plane.
  • Determinism over Prompts: Safety invariants live in policy rules, cryptographic bindings, and deterministic guards — not system prompt wishes.
  • LLM-Agnostic: Works in front of any model or host that speaks Model Context Protocol (2024-11-05 to 2025-06-18 + oneOf outputSchema compatibility).
  • Technical Sobriety (ADR-02 / ADR-30): Core runtime depends only on Python >= 3.11 standard library plus dw-mcp-guard >= 1.3.4. Optional integrations hook strictly through standard-library entry_points(group="dw_core.hooks").

Install

# PyPI distribution name is `dw-mcp-core` (provides the `dwcore` CLI and imports as `dw_core`)
pip install dw-mcp-core==0.1.0a2

# Or run via container image (GHCR)
docker run --rm ghcr.io/dw-design-org/dw-core:0.1.0a2 version

Package naming note: Install from PyPI using pip install dw-mcp-core (the unrelated PyPI package dw-core belongs to a different project and also uses a dw_core module namespace — do not install both into the same Python environment).


2-Minute Quickstart

1. Zero-config wrap around any stdio MCP server

dwcore wrap --mode shadow --shadow-days 7 -- npx -y @modelcontextprotocol/server-filesystem /tmp

2. Import an existing Claude / Cursor config & validate

dwcore init --from-claude --mode shadow --shadow-days 7 --out policy.toml
dwcore check policy.toml

3. Run stdio gateway or authenticated Streamable HTTPS server

# Local stdio gateway (Claude Desktop, Cursor, local MCP clients)
dwcore serve policy.toml

# Authenticated Streamable HTTPS server
dwcore token create agent-ci --tokens tokens.json --scopes mcp
dwcore server policy.toml --tokens tokens.json --host 0.0.0.0 --port 8765 \
  --certfile cert.pem --keyfile key.pem

4. Out-of-band approval UI, offline replay & ledger verification

# Create an approver account and start DW Approve UI
dwcore approve-ui account alice --roles operator,admin --accounts accounts.txt
dwcore approve-ui run --ledger ~/.local/state/dw-core/ledger.sqlite3 --accounts accounts.txt

# Offline policy simulation & hash-chain audit verification
dwcore policy replay candidate-policy.toml --ledger ~/.local/state/dw-core/ledger.sqlite3
dwcore audit verify --ledger ~/.local/state/dw-core/ledger.sqlite3

Known V0.1 Alpha Limits

DW Core V0.1 Alpha states its boundaries openly so operators can deploy with accurate expectations:

  • CaMeL-lite fail-closed without HITL override: Reading a tainted or injection-flagged document can block subsequent legitimate writes that share context tokens (such as working directory or topic terms) with no HITL override in V0.1. Guarded human escalation is the top strategic priority for V0.2.
  • Registry drift checked at startup: Tool definitions are pinned and verified on Gateway.start(). There is no mid-session revalidation in persistent HTTP mode in V0.1; unknown tools are Trust-On-First-Use (TOFU) on initial startup, and pinning verifies declared JSON metadata/schemas rather than hidden upstream runtime behavior.
  • In-memory taint state: Session taint is held in memory per client_id with TTL (persists across HTTP reconnects while the server runs; process-scoped in stdio).
  • Audit ledger & audit verify scope: dwcore audit verify validates the full events SHA-256 chain and cross-checks requests.status, requests.decided_by, and missing/deleted requests rows. Validity-affecting columns requests.binding and requests.expires_at are not included in the chained events table: even with external anchoring of events, direct local SQLite tampering of requests.binding or requests.expires_at is not detected by dwcore audit verify (both remain enforced at runtime on consume()). External anchoring only protects the events hash chain against local history rewriting under root or the same OS UID.
  • Post-dispatch ledger failure & indeterminate execution: If the ledger fails after dispatching a call upstream, or if the upstream crashes or times out mid-mutation, DW Core halts with AUDIT FAILURE AFTER DISPATCH / upstream_indeterminate and never auto-retries.
  • Policy rollback (A → B → A): Without a policy_epoch counter (planned for V0.2), an unexpired approval created under policy hash H_A (default 10-minute TTL) becomes valid again if policy reverts strictly to H_A before expiration.

Companion Library & Security

  • Security runtime kernel: dw-mcp-guard (standalone zero-dependency Python library, >= 1.3.4).
  • Vulnerability reporting & full trust model: SECURITY.md.
  • License: Apache-2.0 — see LICENSE.

Metadata

Release files for dw-mcp-core 0.1.0a2

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

Source distribution (sdist)

Source distribution for dw-mcp-core 0.1.0a2
File Size Uploaded Provenance Actions
dw_mcp_core-0.1.0a2.tar.gz 81.0 kB With provenance Details for dw_mcp_core-0.1.0a2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dw-mcp-core 0.1.0a2
File Interpreter ABI Platform Actions
dw_mcp_core-0.1.0a2-py3-none-any.whl Python 3 none any Details for dw_mcp_core-0.1.0a2-py3-none-any.whl

Total release size: 148.4 kB

Release files / dw_mcp_core-0.1.0a2.tar.gz

Download URL dw_mcp_core-0.1.0a2.tar.gz
Size 81.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d3d26c8bac39053a790f1da789c92359b4f9b95437291cb5267aaffb80e2c402
BLAKE2b-256 checksum
How to use checksums
de56ba6487a9df6fc339ceb5012fb615b2e8f1617a650e85a5d258f720dc1fa5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 5, 2026.

Transparency log

Release files / dw_mcp_core-0.1.0a2-py3-none-any.whl

Download URL dw_mcp_core-0.1.0a2-py3-none-any.whl
Size 67.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8393fc62e846472882669dcf556d50b84292fe4a36fb93747525b441bdc8587
BLAKE2b-256 checksum
How to use checksums
500c34c0126e0b2670abeec10b849c2872bd0ad1f5966138f300398c6105225f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 5, 2026.

Transparency log

Security for dw-mcp-core 0.1.0a2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dw_mcp_core-0.1.0a2.tar.gz

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 Dec 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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