mcpField
W
writ

writ

Local
withwrit.comSecurity2Updated 1d ago

About writ

writ is an MCP server for agents that need authorization checks before consequential writes. It returns ALLOW, DENY, or STEP_UP decisions, verifies short-lived write-bound tokens, and records audit receipts.

Key features

  1. 01Pre-write ALLOW/DENY/STEP_UP decisions
  2. 0290-second, write-bound authorization tokens
  3. 03Point-of-action token verification
  4. 04Sponsor grants and principal revocation
  5. 05Policy lookup and decision receipts
  6. 06Keyless sandbox demo

Use cases

  1. 01Gate an agent's consequential write operations
  2. 02Require sponsor approval for STEP_UP decisions
  3. 03Verify authorization immediately before execution

MCP support

writ exposes policy checks, token verification, sponsor controls, and audit receipts as tools to MCP clients. It runs over stdio and requires a Writ API key except for the sandbox demo.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"avenuedadmin-writ": {
"command": "uvx",
"args": [
"writ-mcp"
],
"env": {
"WRIT_API_KEY": "<WRIT_API_KEY>",
"WRIT_SPONSOR_TOKEN": "<WRIT_SPONSOR_TOKEN>",
"WRIT_BASE_URL": "<WRIT_BASE_URL>"
}
}
}
}
Run commanduvx writ-mcp
Environment variables to set
WRIT_API_KEYSecretWrit API key (get one free at https://withwrit.com)
WRIT_SPONSOR_TOKENSecretWrit sponsor token, only required for sponsor tools (grant, revoke, reinstate)
WRIT_BASE_URLOptional custom Writ API base URL (default: https://api.withwrit.com)

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypiwrit-mcp0.1.2

Tools

8

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
verbstringYes
targetstringYes
purposestringYes
agent_idstringYes
sponsor_idstringYes

Details

From the project README

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

ToolWhoWhat
writ_checkagentDecision + 90s purpose-bound token
writ_verify_tokenagentPoint-of-action token verification
writ_grantsponsorApprove a STEP_UP (one-time grant)
writ_revoke / writ_reinstatesponsorKill switch on/off for a principal
writ_receiptsagentAudit trail of decisions
writ_policyagentTenant verb policy
writ_sandboxanyoneFree 90-second demo grant, no key needed

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

Source

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

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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.