Applique des contrôles de politique pour les écritures d'agents IA avec des décisions ALLOW, DENY ou STEP_UP et un journal d'audit infalsifiable.
Aussi connu sous withwrit/pywrit, writ-mcp
- Étoiles
- 2
- Outils
- 17
- Téléchargements, 30 jours
- —
- Dernière version
- 0.2.2
- Dernier commit
- 13 nov. 2026
- Licence
- MIT
Qu'est-ce que Writ MCP ?
Writ est un serveur MCP. Applique des contrôles de politique pour les écritures d'agents IA avec des décisions ALLOW, DENY ou STEP_UP et un journal d'audit infalsifiable. Il expose 17 outils, comme writ_check, writ_verify_token, writ_lease.
Résumé généré à partir du README du projet
À propos du MCP server Writ
Ce serveur permet de contrôler les actions critiques effectuées par les agents IA via une passerelle de politique. Il fournit un mécanisme permettant aux agents de demander une autorisation avant d'effectuer des écritures, en recevant des décisions telles que ALLOW, DENY ou STEP_UP. Ce processus garantit que chaque action est appuyée par un reçu d'audit infalsifiable pour assurer la sécurité et la responsabilité.
Les développeurs peuvent intégrer cela dans Claude Desktop, Claude Code ou des clients MCP génériques en utilisant un transport stdio. La configuration du serveur nécessite une WRIT_API_KEY et, optionnellement, un WRIT_SPONSOR_TOKEN pour la gestion des octrois ou des révocations. Le flux de travail utilise des outils spécifiques comme writ_check pour obtenir un authToken de 90 secondes et writ_execute pour effectuer la requête sécurisée à l'aide d'un bail à usage unique.
Au-delà des simples contrôles de permission, le serveur inclut des outils administratifs pour gérer les installations d'applications GitHub, définir des seuils et consulter les principaux locataires. Il propose un mode sandbox pour tester sans clé API, permettant à n'importe qui d'essayer l'outil writ_check avec un verbe d'écriture de démonstration.
Ce que vous pouvez faire avec
- 1Appliquer des permissions d'écriture restreintesDemandez à l'agent de vérifier les permissions avant de modifier un fichier sensible ou une entrée de base de données.
- 2Exiger une approbation humaine pour les tâches risquéesDonnez instruction à l'agent de déclencher une révision manuelle lorsqu'il rencontre une décision STEP_UP.
- 3Auditer l'historique des décisions de l'agentDemandez un résumé de toutes les décisions d'autorisation et des résultats précédents.
- 4Exécuter des requêtes API sécuriséesDemandez à l'agent de convertir un jeton d'autorisation en un bail à usage unique pour effectuer une requête amont spécifique.
Extrait du README du projet. Chaque cas d'utilisation est vérifié par rapport à une citation du document.
Comment installer Writ MCP
Formats vérifiés le 10 nov. 2026Installer Writ MCP dans Claude Code
$ claude mcp add --env WRIT_API_KEY=<YOUR_WRIT_API_KEY> --env WRIT_SPONSOR_TOKEN=<YOUR_WRIT_SPONSOR_TOKEN> writ -- uvx writ-mcpInstaller Writ MCP dans 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>"
}
}
}
}Installer Writ MCP dans 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>"
}
}
}
}Installer Writ MCP dans 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>"
}
}
}
}Installer Writ MCP dans 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>"
Installer Writ MCP dans 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>"
}
}
}
}Outils MCP Writ 17
Détectés depuis le 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 | — |
Afficher les 17 outilsAfficher moins d'outils
writ_explain_receiptwrit_tenant_notifywrit_principalswrit_verbswrit_keys
| writ_explain_receipt | — | |
| writ_tenant_notify | — | |
| writ_principals | — | |
| writ_verbs | — | |
| writ_keys | — |
Configuration
WRIT_API_KEYRequisSecretWrit API key (get one free at https://withwrit.com)
WRIT_SPONSOR_TOKENSecretWrit sponsor token, only required for sponsor tools (grant, revoke, reinstate)
WRIT_BASE_URLOptional custom Writ API base URL (default: https://api.withwrit.com)
| Nom | Description | Type |
|---|---|---|
| WRIT_API_KEY | Writ API key (get one free at https://withwrit.com) | RequisSecret |
| WRIT_SPONSOR_TOKEN | Writ sponsor token, only required for sponsor tools (grant, revoke, reinstate) | Secret |
| WRIT_BASE_URL | Optional custom Writ API base URL (default: https://api.withwrit.com) |
Vérifications automatisées
Exécuté le 13 nov. 2026Rapport complet →A passé nos vérifications automatisées. Il ne s'agit pas d'un audit de sécurité : lisez le code et donnez au serveur l'accès le plus restreint dont il a besoin. Fonctionnement des vérifications
- Dépôt source lié et accessibleRéussi
- Licence open source (OSI)Réussi
- Commit ou version publiée au cours de l'année écouléeRéussi
- Nom du package non proche d'un package populaireRéussi
- L'endpoint distant utilise HTTPSNon vérifié
- Les outils destructifs sont étiquetésRéussi
- Aucune instruction cachée destinée au modèleRéussi
- Aucun avis critique dans le paquet ni ses dépendancesRéussi
README
Voir sur 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.
Questions sur Writ MCP
Comment ajouter Writ MCP à Claude Code ?
Exécutez claude mcp add --env WRIT_API_KEY=<YOUR_WRIT_API_KEY> --env WRIT_SPONSOR_TOKEN=<YOUR_WRIT_SPONSOR_TOKEN> writ -- uvx writ-mcp dans votre terminal. Ajoutez --scope user pour le rendre disponible dans tous les projets.
Comment ajouter Writ MCP à Cursor ?
Ouvrez ~/.cursor/mcp.json et ajoutez le serveur sous mcpServers, avec la configuration Cursor indiquée dans la section d'installation ci-dessus.
Quels outils Writ MCP fournit-il ?
Il expose 17 outils, dont writ_check, writ_verify_token, writ_lease, writ_execute, writ_grant.
Quels sont les résultats possibles d'un contrôle d'écriture ?
L'agent reçoit une décision ALLOW, DENY ou STEP_UP.
Comment puis-je tester Writ sans clé API ?
Vous pouvez utiliser l'outil writ_sandbox pour une démo gratuite de 90 secondes.
Que se passe-t-il lors d'une décision STEP_UP ?
Un sponsor humain doit approuver l'action via writ_grant ou le tableau de bord avant que l'agent ne puisse continuer.