writ
Commit-time policy gate for AI agent writes: ALLOW, DENY or STEP_UP with audit receipts
- Pricing
- Freemium
- Platforms
- CLI, API, self-hosted
- Runs
- Locally
- Version
- 0.1.2
- Listing updated
- 1 day ago
About writ
writ is a freemium MCP server for security. It runs locally on your machine and is started by your AI client.
Writ asks an agent to check before it does anything consequential. The agent sends a sponsor, agent, verb, target and purpose, and the policy answers ALLOW, DENY or STEP_UP. An ALLOW comes with a 90-second token bound to that exact write, and a STEP_UP waits for a human sponsor to approve a one-time grant. Every outcome, allowed or denied, becomes a receipt in an HMAC-SHA256 chained audit log that can be verified for tampering.
The MCP server runs over stdio from the writ-mcp Python package and needs a WRIT_API_KEY. Beyond checking, it can convert an ALLOW into a single-use lease and execute the gated upstream request itself using a credential held in Writ's vault, so the agent never touches the raw key. Sponsor tools grant, revoke and reinstate, with revoke acting as a kill switch. A writ_sandbox tool gives a free 90-second demo grant with no key.
The wider product scans Python, TypeScript and JavaScript code for write sites such as refunds, deletes and emails, and offers a GitHub App that flags ungated writes. The site says it supports NIST SP 800-53 AU-9 but leaves compliance to your assessor. The first 10,000 receipts per month are free and then $1 per 1,000.
Install
Run in a terminal
claude mcp add writ --env WRIT_API_KEY='<WRIT_API_KEY>' --env WRIT_SPONSOR_TOKEN='<WRIT_SPONSOR_TOKEN>' -- uvx writ-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"writ": {
"command": "uvx",
"args": [
"writ-mcp"
],
"env": {
"WRIT_API_KEY": "<WRIT_API_KEY>",
"WRIT_SPONSOR_TOKEN": "<WRIT_SPONSOR_TOKEN>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"writ": {
"command": "uvx",
"args": [
"writ-mcp"
],
"env": {
"WRIT_API_KEY": "<WRIT_API_KEY>",
"WRIT_SPONSOR_TOKEN": "<WRIT_SPONSOR_TOKEN>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"writ": {
"type": "stdio",
"command": "uvx",
"args": [
"writ-mcp"
],
"env": {
"WRIT_API_KEY": "<WRIT_API_KEY>",
"WRIT_SPONSOR_TOKEN": "<WRIT_SPONSOR_TOKEN>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"writ": {
"command": "uvx",
"args": [
"writ-mcp"
],
"env": {
"WRIT_API_KEY": "<WRIT_API_KEY>",
"WRIT_SPONSOR_TOKEN": "<WRIT_SPONSOR_TOKEN>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"writ": {
"command": "uvx",
"args": [
"writ-mcp"
],
"env": {
"WRIT_API_KEY": "<WRIT_API_KEY>",
"WRIT_SPONSOR_TOKEN": "<WRIT_SPONSOR_TOKEN>"
}
}
}
}Configuration
WRIT_API_KEYWrit API key (get one free at https://withwrit.com)RequiredWRIT_SPONSOR_TOKENWrit sponsor token, only required for sponsor tools (grant, revoke, reinstate)WRIT_BASE_URLOptional custom Writ API base URL (default: https://api.withwrit.com)
Tools this server provides (20)
Taken from the project documentation; the running server may differ.
- writ_check
- Decision plus a 90-second purpose-bound token.
- writ_verify_token
- Verifies an authorization token at the point of action.
- writ_lease
- Converts an ALLOW token into a single-use lease.
- writ_execute
- Runs one gated upstream request with a lease or token.
- writ_grant
- Sponsor approval of a STEP_UP.
- writ_revoke
- Kill switch for a principal.
- writ_reinstate
- Turns the kill switch off.
- writ_receipts
- Audit trail of decisions.
- writ_verify_receipts
- Verifies the audit-log hash chain.
- writ_policy
- Shows the tenant verb policy.
- writ_sandbox
- Free demo grant without a key.
- writ_github_installations
- Lists GitHub App installations.
- writ_github_set_threshold
- Sets the check-run fail threshold per install.
- writ_github_toggle_pr_comments
- Enables or disables the PR comment bot.
- writ_manifests
- Lists repos with risk profiles or fetches a manifest.
- writ_explain_receipt
- Explains a receipt in plain language.
- writ_tenant_notify
- Gets or updates step-up notification settings.
- writ_principals
- Lists the tenant's principals.
- writ_verbs
- Lists the tenant's verb vocabulary.
- writ_keys
- Lists API key metadata.
What it does
- Check before write
- Agents ask for a decision with verb, target and purpose before acting.
- Purpose-bound tokens
- ALLOW returns a 90-second token tied to the exact write.
- Tamper-evident log
- Receipts are hash-chained and verifiable with a chain check.
- Gated execution
- Leases let Writ run the upstream request with a vaulted credential.
- Kill switch
- Revoke a principal so later checks are denied.
- Sandbox
- A free demo grant works without an API key.
Good for
- Require approval before an agent issues a refund
- Stop an agent from deleting data without a policy match
- Keep an auditable record of every agent write
- Revoke a misbehaving agent immediately
- Verify that an audit log has not been altered
Pricing
Freemium
10,000 receipts/month free, then $1 per 1,000
Prices change. Check withwrit.com before you buy.
writ FAQ
What does it cost?
The first 10,000 receipts per month are free with no card, then $1 per 1,000 receipts.
What happens on STEP_UP?
A human sponsor approves a one-time grant, then the agent checks again.
Can I try it without a key?
Yes, writ_sandbox gives a free 90-second demo grant.
What are the requirements?
Python 3.9 or newer and a WRIT_API_KEY for non-sandbox tools.
Is writ free?
writ has a free plan, with paid plans for more usage or features.
How do I add writ to Claude Code?
Run this command in your terminal: claude mcp add writ --env WRIT_API_KEY='<WRIT_API_KEY>' --env WRIT_SPONSOR_TOKEN='<WRIT_SPONSOR_TOKEN>' -- uvx writ-mcp
What are the best alternatives to writ?
The closest alternatives to writ are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.
Alternatives to writ

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Ouroboros
MCP serverSpec-first layer that pins requirements and verifies results of AI coding agent work
Runs locally- Open source
- 6.4K GitHub stars
- Developer tools