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 分