Skip to main content

writ-mcp

The Writ gate as an MCP server. Give any MCP-compatible agent point-of-action control: the agent calls Writ before a consequential write, gets back ALLOW, DENY, or STEP_UP, and every outcome creates an audit receipt.

Install

pip install writ-mcp

Requires Python 3.9+. Installs the writ-mcp command (stdio transport).

Configure

export WRIT_API_KEY="writ_..."        # required; get one free: POST /v1/keys with an email
export WRIT_SPONSOR_TOKEN="..."       # only for sponsor tools (grant, revoke, reinstate)
# export WRIT_BASE_URL="..."          # default: https://api.withwrit.com

Add to your agent

Claude Code:

claude mcp add writ --env WRIT_API_KEY="$WRIT_API_KEY" -- writ-mcp

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "writ": {
      "command": "writ-mcp",
      "env": { "WRIT_API_KEY": "writ_..." }
    }
  }
}

Any MCP client (generic stdio config):

{
  "command": "writ-mcp",
  "env": {
    "WRIT_API_KEY": "writ_...",
    "WRIT_SPONSOR_TOKEN": "writ_sp_..."
  }
}

Hermes (NousResearch/hermes-agent) catalog entry — once published, this package is installable from the optional-mcps catalog:

hermes mcp install writ

The check-before-write loop

The tool descriptions teach the agent this flow, but the short version:

  1. writ_check(sponsor_id, agent_id, verb, target, purpose) — before the write.
  2. ALLOW → you get a 90-second authToken bound to that exact write.
  3. writ_verify_token(auth_token, verb, target, purpose) — immediately before executing, to prove the authorization still matches what you're doing.
  4. DENY → do not proceed. STEP_UP → a human sponsor approves (via writ_grant or the dashboard), then check again.

Tools

Tool Who What
writ_check agent Decision + 90s purpose-bound token
writ_verify_token agent Point-of-action token verification
writ_grant sponsor Approve a STEP_UP (one-time grant)
writ_revoke / writ_reinstate sponsor Kill switch on/off for a principal
writ_receipts agent Audit trail of decisions
writ_policy agent Tenant verb policy
writ_sandbox anyone Free 90-second demo grant, no key needed
writ_github_installations admin List connected GitHub App installations
writ_github_set_threshold admin Set the check-run fail threshold per install
writ_github_toggle_pr_comments admin Enable/disable the PR-comment bot
writ_manifests agent List repos with risk profiles or fetch one manifest
writ_explain_receipt agent Explain a receipt in plain language
writ_tenant_notify admin Get or update step-up notification settings
writ_principals admin List the tenant's principals
writ_verbs admin List the tenant's verb vocabulary
writ_keys admin List API key metadata

Try it with no key: writ_sandbox → writ_check with verb="demo_write".

Source

Public repo: withwrit/pywrit (mcp/ directory). License: MIT.

Directory listings: Glama · MCP Registry io.github.withwrit/writ.

Metadata

Release files for writ-mcp 0.2.0

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

Source distribution (sdist)

Source distribution for writ-mcp 0.2.0
File Size Uploaded Provenance Actions
writ_mcp-0.2.0.tar.gz 9.4 kB Without provenance Details for writ_mcp-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for writ-mcp 0.2.0
File Interpreter ABI Platform Actions
writ_mcp-0.2.0-py3-none-any.whl Python 3 none any Details for writ_mcp-0.2.0-py3-none-any.whl

Total release size: 17.8 kB

Release files / writ_mcp-0.2.0.tar.gz

Download URL writ_mcp-0.2.0.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ab93b4111fb14d1815b7f9cb49724e638fa5afd45a1be8fbaffc9382fe780281
BLAKE2b-256 checksum
How to use checksums
62b5cc496d5c2719cc21d41b0c298301e45d7b862ccdb54e598c3de6042c8398
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.1

Release files / writ_mcp-0.2.0-py3-none-any.whl

Download URL writ_mcp-0.2.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7fdd5875c77c2c729f6aaef86dfba3e668710469d809ad243617f649ff19f12f
BLAKE2b-256 checksum
How to use checksums
f0d8d4bd69f164a9fecacbba48f69d32bdf19fe64e05ac6e6910da0b2f27bd4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.1

Security for writ-mcp 0.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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