writ

v0.2.8
io.github.withwrit/writ Checked 1 day ago Published 6 days ago

Policy checks for AI agent writes (ALLOW/DENY/STEP_UP) with a tamper-evident audit log.

Values you need

VariableWhat it is
WRIT_API_KEYrequired secret Writ API key (get one free at https://withwrit.com)
WRIT_SPONSOR_TOKENoptional secret Writ sponsor token, only required for sponsor tools (grant, revoke, reinstate)
WRIT_BASE_URLoptional Optional custom Writ API base URL (default: https://api.withwrit.com)

PyPI (uvx) discovery passed

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add writ -e 'WRIT_API_KEY=<WRIT_API_KEY>' -- uvx writ-mcp==0.2.8
Add to claude_desktop_config.json
{
  "mcpServers": {
    "writ": {
      "args": [
        "writ-mcp==0.2.8"
      ],
      "command": "uvx",
      "env": {
        "WRIT_API_KEY": "<WRIT_API_KEY>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "writ": {
      "args": [
        "writ-mcp==0.2.8"
      ],
      "command": "uvx",
      "env": {
        "WRIT_API_KEY": "<WRIT_API_KEY>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "WRIT_API_KEY",
      "id": "writ-api-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "writ": {
      "args": [
        "writ-mcp==0.2.8"
      ],
      "command": "uvx",
      "env": {
        "WRIT_API_KEY": "${input:writ-api-key}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.writ]
command = "uvx"
args = ["writ-mcp==0.2.8"]
env = { "WRIT_API_KEY" = "<WRIT_API_KEY>" }

For AI agents

  1. Ask the user for: WRIT_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: writ_check, writ_verify_token, writ_lease, writ_execute, writ_grant, writ_revoke, writ_reinstate, writ_receipts, ….
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json