Menerapkan pengecekan kebijakan untuk penulisan oleh AI agent dengan keputusan ALLOW, DENY, atau STEP_UP serta audit log yang tahan manipulasi.
Juga dikenal sebagai withwrit/pywrit, writ-mcp
- Stars
- 2
- Tools
- 17
- Unduhan, 30 hari
- —
- Versi terbaru
- 0.2.2
- Commit terakhir
- 13 Nov 2026
- Lisensi
- MIT
Apa itu Writ MCP?
Writ adalah MCP server. Menerapkan pengecekan kebijakan untuk penulisan oleh AI agent dengan keputusan ALLOW, DENY, atau STEP_UP serta audit log yang tahan manipulasi. Server ini menyediakan 17 tool, seperti writ_check, writ_verify_token, writ_lease.
Ringkasan dibuat dari README proyek
Tentang Writ MCP server
Server ini memungkinkan Anda mengontrol tindakan krusial oleh AI agent melalui policy gate. Server ini menyediakan mekanisme bagi agent untuk meminta izin sebelum melakukan penulisan (writes), dengan menerima keputusan seperti ALLOW, DENY, atau STEP_UP. Proses ini memastikan bahwa setiap tindakan didukung oleh audit receipt yang tahan manipulasi demi keamanan dan akuntabilitas.
Developer dapat mengintegrasikan ini ke dalam Claude Desktop, Claude Code, atau client MCP generik menggunakan transport stdio. Setup server memerlukan WRIT_API_KEY dan opsional WRIT_SPONSOR_TOKEN untuk mengelola grant atau pencabutan izin. Workflow ini menggunakan tool spesifik seperti writ_check untuk mendapatkan authToken selama 90 detik dan writ_execute untuk menjalankan gated request menggunakan single-use lease.
Selain pengecekan izin sederhana, server ini menyertakan tool administratif untuk mengelola instalasi GitHub App, mengatur threshold, dan melihat tenant principals. Tersedia juga sandbox mode untuk pengujian tanpa API key, sehingga siapa pun dapat mencoba tool writ_check dengan demo write verb.
Apa yang bisa Anda lakukan dengannya
- 1Menerapkan izin penulisan yang terproteksiMinta agent untuk mengecek izin sebelum memodifikasi file sensitif atau entri database.
- 2Memerlukan persetujuan manusia untuk tugas berisikoInstruksikan agent untuk memicu peninjauan manual saat menemui keputusan STEP_UP.
- 3Audit riwayat keputusan agentMinta ringkasan dari semua keputusan otorisasi dan hasil sebelumnya.
- 4Menjalankan gated API request secara amanMinta agent untuk mengubah token otorisasi menjadi single-use lease guna menjalankan upstream request tertentu.
Ditulis berdasarkan README proyek. Setiap use case diperiksa terhadap kutipan dari README tersebut.
Cara menginstal Writ MCP
Format diverifikasi 10 Nov 2026Instal Writ MCP di Claude Code
$ claude mcp add --env WRIT_API_KEY=<YOUR_WRIT_API_KEY> --env WRIT_SPONSOR_TOKEN=<YOUR_WRIT_SPONSOR_TOKEN> writ -- uvx writ-mcpInstal Writ MCP di Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"writ": {
"command": "uvx",
"args": [
"writ-mcp"
],
"env": {
"WRIT_API_KEY": "<YOUR_WRIT_API_KEY>",
"WRIT_SPONSOR_TOKEN": "<YOUR_WRIT_SPONSOR_TOKEN>"
}
}
}
}Instal Writ MCP di VS Code
.vscode/mcp.json
{
"servers": {
"writ": {
"type": "stdio",
"command": "uvx",
"args": [
"writ-mcp"
],
"env": {
"WRIT_API_KEY": "<YOUR_WRIT_API_KEY>",
"WRIT_SPONSOR_TOKEN": "<YOUR_WRIT_SPONSOR_TOKEN>"
}
}
}
}Instal Writ MCP di Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"writ": {
"command": "uvx",
"args": [
"writ-mcp"
],
"env": {
"WRIT_API_KEY": "<YOUR_WRIT_API_KEY>",
"WRIT_SPONSOR_TOKEN": "<YOUR_WRIT_SPONSOR_TOKEN>"
}
}
}
}Instal Writ MCP di Codex
~/.codex/config.toml
[mcp_servers.writ] command = "uvx" args = ["writ-mcp"] [mcp_servers.writ.env] WRIT_API_KEY = "<YOUR_WRIT_API_KEY>" WRIT_SPONSOR_TOKEN = "<YOUR_WRIT_SPONSOR_TOKEN>"
Instal Writ MCP di Gemini CLI
~/.gemini/settings.json
{
"mcpServers": {
"writ": {
"command": "uvx",
"args": [
"writ-mcp"
],
"env": {
"WRIT_API_KEY": "<YOUR_WRIT_API_KEY>",
"WRIT_SPONSOR_TOKEN": "<YOUR_WRIT_SPONSOR_TOKEN>"
}
}
}
}Tool Writ MCP 17
Terdeteksi dari READMEwrit_checkwrit_verify_tokenwrit_leasewrit_executewrit_grantwrit_receiptswrit_policywrit_sandboxwrit_github_installationswrit_github_set_thresholdwrit_github_toggle_pr_commentswrit_manifests
| writ_check | — | |
| writ_verify_token | — | |
| writ_lease | — | |
| writ_execute | — | |
| writ_grant | — | |
| writ_receipts | — | |
| writ_policy | — | |
| writ_sandbox | — | |
| writ_github_installations | — | |
| writ_github_set_threshold | — | |
| writ_github_toggle_pr_comments | — | |
| writ_manifests | — |
Tampilkan semua 17 toolTampilkan lebih sedikit tool
writ_explain_receiptwrit_tenant_notifywrit_principalswrit_verbswrit_keys
| writ_explain_receipt | — | |
| writ_tenant_notify | — | |
| writ_principals | — | |
| writ_verbs | — | |
| writ_keys | — |
Konfigurasi
WRIT_API_KEYWajibRahasiaWrit API key (get one free at https://withwrit.com)
WRIT_SPONSOR_TOKENRahasiaWrit sponsor token, only required for sponsor tools (grant, revoke, reinstate)
WRIT_BASE_URLOptional custom Writ API base URL (default: https://api.withwrit.com)
| Nama | Deskripsi | Tipe |
|---|---|---|
| WRIT_API_KEY | Writ API key (get one free at https://withwrit.com) | WajibRahasia |
| WRIT_SPONSOR_TOKEN | Writ sponsor token, only required for sponsor tools (grant, revoke, reinstate) | Rahasia |
| WRIT_BASE_URL | Optional custom Writ API base URL (default: https://api.withwrit.com) |
Pengecekan otomatis
Berjalan 13 Nov 2026Laporan lengkap →Lolos checks otomatis kami. Ini bukan audit keamanan: baca kodenya dan berikan server akses paling terbatas yang dibutuhkannya. Cara kerja checks
- Source repository terhubung dan dapat dijangkauLolos
- Lisensi open source (OSI)Lolos
- Ada commit atau release dalam satu tahun terakhirLolos
- Nama package tidak mirip dengan package populerLolos
- Remote endpoint menggunakan HTTPSTidak diperiksa
- Tools yang bersifat destruktif telah diberi labelLolos
- Tidak ada instruksi tersembunyi untuk modelLolos
- Tidak ada advisory kritis di paket maupun dependensinyaLolos
README
Lihat di GitHubwrit-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:
writ_check(sponsor_id, agent_id, verb, target, purpose)— before the write.ALLOW→ you get a 90-secondauthTokenbound to that exact write.writ_verify_token(auth_token, verb, target, purpose)— immediately before executing, to prove the authorization still matches what you're doing.DENY→ do not proceed.STEP_UP→ a human sponsor approves (viawrit_grantor the dashboard), then check again.writ_lease(auth_token, system_id, method, path, body)- convert the ALLOW token into a single-use lease bound to the exact upstream request.writ_execute(lease_id, method, path, body)- run the gated write with the same method/path/body; the gate forwards it with the vaulted credential and returns the upstream response verbatim.
Tools
| Tool | Who | What |
|---|---|---|
writ_check |
agent | Decision + 90s purpose-bound token |
writ_verify_token |
agent | Point-of-action token verification |
writ_lease |
agent | Convert an ALLOW token into a single-use gated-execution lease |
writ_execute |
agent | Run one gated upstream request with a lease or ALLOW token |
writ_grant |
sponsor | Approve a STEP_UP (one-time grant) |
writ_revoke / writ_reinstate |
sponsor | Kill switch on/off for a principal |
writ_receipts |
agent | Audit trail of decisions |
writ_policy |
agent | Tenant verb policy |
writ_sandbox |
anyone | Free 90-second demo grant, no key needed |
writ_github_installations |
admin | List connected GitHub App installations |
writ_github_set_threshold |
admin | Set the check-run fail threshold per install |
writ_github_toggle_pr_comments |
admin | Enable/disable the PR-comment bot |
writ_manifests |
agent | List repos with risk profiles or fetch one manifest |
writ_explain_receipt |
agent | Explain a receipt in plain language |
writ_tenant_notify |
admin | Get or update step-up notification settings |
writ_principals |
admin | List the tenant's principals |
writ_verbs |
admin | List the tenant's verb vocabulary |
writ_keys |
admin | List 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.
Pertanyaan tentang Writ MCP
Bagaimana cara menambahkan Writ MCP ke Claude Code?
Jalankan claude mcp add --env WRIT_API_KEY=<YOUR_WRIT_API_KEY> --env WRIT_SPONSOR_TOKEN=<YOUR_WRIT_SPONSOR_TOKEN> writ -- uvx writ-mcp di terminal Anda. Tambahkan --scope user agar tersedia di semua proyek.
Bagaimana cara menambahkan Writ MCP ke Cursor?
Buka ~/.cursor/mcp.json dan tambahkan server di bawah mcpServers, menggunakan config Cursor yang ditunjukkan di bagian instalasi di atas.
Tool apa yang disediakan Writ MCP?
Server ini menyediakan 17 tool, termasuk writ_check, writ_verify_token, writ_lease, writ_execute, writ_grant.
Apa saja kemungkinan hasil dari pengecekan penulisan?
Agent akan menerima keputusan ALLOW, DENY, atau STEP_UP.
Bagaimana cara saya mengetes Writ tanpa API key?
Anda dapat menggunakan tool writ_sandbox untuk mendapatkan demo grant gratis selama 90 detik.
Apa yang terjadi saat keputusan STEP_UP muncul?
Seorang sponsor manusia harus menyetujui tindakan tersebut melalui writ_grant atau dashboard sebelum agent dapat melanjutkan.