writ

io.github.AvenueDAdmin由 GitHub 账号 AvenueDAdmin 发布v0.1.2更新于 Oct 24, 2026

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

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

Writ 网关 MCP 服务器,让 AI 代理在执行重要写入前获得 ALLOW、DENY 或 STEP_UP 决策,并生成审计回执。

可以做什么
  • 在写入前请求策略决策,并获得与具体操作绑定的短期授权令牌
  • 在执行前校验令牌仍与动词、目标和用途一致
  • 批准升级请求,或对主体执行吊销与恢复的紧急开关
  • 读取审计回执、用通俗语言解释回执,并查看租户动词策略
  • 管理 GitHub App 安装、检查运行阈值和 PR 评论机器人设置
  • 列出主体、动词、API 密钥元数据和仓库风险清单,并可运行免费沙盒演示
适用场景
适用于代理会执行重要写入、需要在前面加一道策略或人工审批关卡并留下防篡改决策记录的场景。也适合需要升级审批、紧急开关并与 GitHub 检查运行联动的团队。
运行要求
以 Python 包形式通过 stdio 在本地运行(需 Python 3.9 及以上),通常用 uvx 或 writ-mcp 命令启动。需要 WRIT_API_KEY 中的 Writ API 密钥;赞助者工具还需 WRIT_SPONSOR_TOKEN。WRIT_BASE_URL 可覆盖默认 API 地址。需要访问 Writ API 的网络连接。
安装前请注意
需要 Writ API 密钥,赞助者工具还需可批准升级请求、吊销或恢复主体的赞助者令牌。决策与回执会发送到 Writ API,管理类工具会更改租户设置,例如 GitHub 阈值和 PR 评论行为。授权令牌有效期很短,应在执行前立即校验。

安装

在 SourceWeft 中

  1. 打开 控制台中的 writ,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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

bash
pip install writ-mcp

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

Configure

bash
export WRIT_API_KEY="writ_..."        # required; get one free: POST /v1/keys with an emailexport 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:

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

Claude Desktop (claude_desktop_config.json):

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

Any MCP client (generic stdio config):

json
{  "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:

bash
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
writ_github_installationsadminList connected GitHub App installations
writ_github_set_thresholdadminSet the check-run fail threshold per install
writ_github_toggle_pr_commentsadminEnable/disable the PR-comment bot
writ_manifestsagentList repos with risk profiles or fetch one manifest
writ_explain_receiptagentExplain a receipt in plain language
writ_tenant_notifyadminGet or update step-up notification settings
writ_principalsadminList the tenant's principals
writ_verbsadminList the tenant's verb vocabulary
writ_keysadminList 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.

来源:mcp/README.md,提交 bb2ae7c

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.2最新Oct 1, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分