Skip to main content

deus-witness

MCP proxy and SDK for Deus Witness: every tool call of your agent is checked by an independent witness before it runs, and you get a signed receipt for it.

One line in your MCP client config

{"mcpServers": {"fs-witnessed": {"command": "deus-witness-mcp",
  "args": ["--", "npx", "-y", "@modelcontextprotocol/server-filesystem", "/tmp/sandbox"],
  "env": {"DEUS_WITNESS_KEY": "dwk_...", "DEUS_WITNESS_URL": "https://witness.sipkigroup.com"}}}}

Install: pipx install https://witness.sipkigroup.com/dl/deus_witness-0.2.16-py3-none-any.whl

Behaviour per tools/call: pass -> forwarded; allow -> receipt verified (witness key pinned at first use in ~/.config/deus-witness/witness.json), then present, then the tool runs, then report; deny -> the tool is NOT called, the agent gets Blocked by Deus Witness: <reason> (receipt <rid>); defer -> waits up to ~50 s for the owner, then Held for owner approval at <url>. Retry the same call after approval. If the witness is unreachable the call is blocked (fail closed). tools/list, resources, prompts and notifications pass through untouched. The proxy log (stderr) holds only tool, rid, verdict.

0.2: status: held (held by the advisor for owner review) is waited for like defer, then the agent gets Held by advisor for owner review at <url>. Retry the same call after review.

At start (after the client's initialized) the proxy asks the upstream for tools/list itself (the answer is not shown to the client), sends it as POST /v1/catalog (the server suggests a strict toolmap from it), runs the light doctor (configs only, no network) and sends POST /v1/coverage; once per run, before the first call is judged. If the witness cannot be reached at that moment, every call of the run is blocked (fail closed). An HTTP error there (e.g. a 0.1 server) is only logged.

Env: DEUS_WITNESS_KEY (required), DEUS_WITNESS_URL, DEUS_WITNESS_WAIT (s per long poll, 25), DEUS_WITNESS_POLLS (2), DEUS_WITNESS_VERIFY=0 or --no-verify-aar (testing against a stub that does not sign).

Doctor: where can the agent go around the witness

deus-witness doctor [--json] [--no-network] [--project DIR]

Reads (never writes) the client configs: Claude Desktop (claude_desktop_config.json), Claude Code (~/.claude.json, ~/.claude/settings.json, project .mcp.json, .claude/settings.json, .claude/settings.local.json), Cursor (~/.cursor/mcp.json). Prints coverage: C0|C1|C2|C3 and one bypass: <what> -> <how to close> per hole; rc 0 for C2/C3, 2 for C0/C1.

  • C0: no MCP server is behind deus-witness-mcp (a server is behind it when its command is deus-witness-mcp).
  • C1: proxy in place, but a server is not behind it, or Claude Code's Bash/Write/Edit/WebFetch are not in permissions.deny, or a pass tool has a network effect (known to the proxy at start from the agent toolmap), or Cursor's built-in agent tools.
  • C2: all MCP servers behind the proxy and those built-ins denied. C3: C2 + no /bin/sh + egress to 1.1.1.1:443 and example.com:443 refused (only probed without --no-network; the sandbox recipe gives it).

The level is a claim of the operator made from local files, not a proof; the output says so. --no-network opens no socket.

Claude Code hook (built-in tools)

deus-witness-hook is a Claude Code PreToolUse hook: Bash, Edit, Write, NotebookEdit, Read, WebFetch and mcp__* calls are judged by the witness before they run. Answers allow / deny / ask; fail closed. 0.2.16: a thin client - it sends the call as Claude Code gave it (the command line, paths, cwd, CLAUDE_PROJECT_DIR), the realpath / existence of the paths the witness asks about and SHA-256 fingerprints of project files from a list the witness signs; the witness classifies and decides, the hook verifies the signed receipts. What leaves the machine: https://witness.sipkigroup.com/docs/coverage.html and the privacy notice on https://witness.sipkigroup.com. Setup: https://witness.sipkigroup.com/docs/quickstart.html.

SDK (no MCP)

from deus_witness import Witness
w = Witness("https://witness.sipkigroup.com", "dwk_...")
r = w.act("send_email", {"to": "bob@acme.example", "subject": "hi", "body": "..."})
if r.verdict == "allow" and w.present(r.rid)["result"] == "accept":
    ...                      # do the thing
    w.report(r.rid, True)

0.2: w.catalog(tools) sends a tools/list ([{name, description, inputSchema}]) as POST /v1/catalog; w.coverage() runs the light doctor here and sends POST /v1/coverage (or pass your own report: w.coverage({"level": "C2", "unwitnessed": []})). See examples/agent_loop.py. verify_aar(aar_bytes, witness_pub, expect_request) is a standalone receipt check.

Demo tools

deus-witness-demo-tools is a stdio MCP server with send_email, purchase, delete_resource, publish, read_file; nothing real happens, each call appends a line to $DEUS_DEMO_OUT/effects.jsonl.

Tests

.venv/bin/python -m pytest -q tests (starts the contract stub itself). Against a real server: DW_TEST_URL=http://localhost:8810 DW_TEST_KEY=dwk_... pytest tests.

Metadata

Release files for deus-witness 0.2.18

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

Source distribution (sdist)

Source distribution for deus-witness 0.2.18
File Size Uploaded Provenance
deus_witness-0.2.18.tar.gz 34.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for deus-witness 0.2.18
File Interpreter ABI Platform
deus_witness-0.2.18-py3-none-any.whl Python 3 none any Details

Total release size: 75.5 kB

Release files / deus_witness-0.2.18.tar.gz

Download URL deus_witness-0.2.18.tar.gz
Size 34.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6e1ad1723f6170bf24461404c5c18c73fb965f1ec9fca8377a6d2b7fe5f50db4
BLAKE2b-256 checksum
How to use checksums
9aded1088084d2fc6a79541d2cb1faec0e64ff02fd7bcffd8092d047c775b51d
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 Oct 21, 2026.

Transparency log

Release files / deus_witness-0.2.18-py3-none-any.whl

Download URL deus_witness-0.2.18-py3-none-any.whl
Size 40.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6fe436cfe23fce5b04c63edfa3445e11456df85f09d1c3e2302d16a32d110b25
BLAKE2b-256 checksum
How to use checksums
1a7bf2779531316f9da72a922ce4e446ead08499f06eee8577bda4c988e0f370
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 Oct 21, 2026.

Transparency log

Security for deus-witness 0.2.18

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for deus_witness-0.2.18.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 Oct 21, 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.

Release history Release notifications | RSS feed

This release

0.2.18 This release

2 release files Full provenance

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