Ratchet MCP server
{
"mcpServers": {
"ratchetgate": {
"command": "npx",
"args": [
"-y",
"ratchet-mcp@latest"
],
"env": {
"AUTH_SECRET": "<auth_secret>",
"PUBLIC_URL": "https://...",
"DATABASE_URL": "postgresql://user:password@host:5432/db",
"RATCHET_API_KEY": "<ratchet_api_key>",
"STRIPE_SECRET_KEY": "sk_live_...",
"STRIPE_WEBHOOK_SECRET": "sk_live_..."
}
}
}
}{
"mcpServers": {
"ratchetgate": {
"command": "npx",
"args": [
"-y",
"ratchet-mcp@latest"
],
"env": {
"AUTH_SECRET": "<auth_secret>",
"PUBLIC_URL": "https://...",
"DATABASE_URL": "postgresql://user:password@host:5432/db",
"RATCHET_API_KEY": "<ratchet_api_key>",
"STRIPE_SECRET_KEY": "sk_live_...",
"STRIPE_WEBHOOK_SECRET": "sk_live_..."
}
}
}
}{
"mcpServers": {
"ratchetgate": {
"command": "npx",
"args": [
"-y",
"ratchet-mcp@latest"
],
"env": {
"AUTH_SECRET": "<auth_secret>",
"PUBLIC_URL": "https://...",
"DATABASE_URL": "postgresql://user:password@host:5432/db",
"RATCHET_API_KEY": "<ratchet_api_key>",
"STRIPE_SECRET_KEY": "sk_live_...",
"STRIPE_WEBHOOK_SECRET": "sk_live_..."
}
}
}
}{
"servers": {
"ratchetgate": {
"command": "npx",
"args": [
"-y",
"ratchet-mcp@latest"
],
"env": {
"AUTH_SECRET": "${input:auth_secret}",
"PUBLIC_URL": "${input:public_url}",
"DATABASE_URL": "${input:database_url}",
"RATCHET_API_KEY": "${input:ratchet_api_key}",
"STRIPE_SECRET_KEY": "${input:stripe_secret_key}",
"STRIPE_WEBHOOK_SECRET": "${input:stripe_webhook_secret}"
}
}
},
"inputs": [
{
"id": "auth_secret",
"type": "promptString",
"description": "Auth secret",
"password": true
},
{
"id": "public_url",
"type": "promptString",
"description": "Public url",
"password": true
},
{
"id": "database_url",
"type": "promptString",
"description": "Database url",
"password": true
},
{
"id": "ratchet_api_key",
"type": "promptString",
"description": "Ratchet api key",
"password": true
},
{
"id": "stripe_secret_key",
"type": "promptString",
"description": "Stripe secret key",
"password": true
},
{
"id": "stripe_webhook_secret",
"type": "promptString",
"description": "Stripe webhook secret",
"password": true
}
]
}{
"mcpServers": {
"ratchetgate": {
"command": "npx",
"args": [
"-y",
"ratchet-mcp@latest"
],
"env": {
"AUTH_SECRET": "<auth_secret>",
"PUBLIC_URL": "https://...",
"DATABASE_URL": "postgresql://user:password@host:5432/db",
"RATCHET_API_KEY": "<ratchet_api_key>",
"STRIPE_SECRET_KEY": "sk_live_...",
"STRIPE_WEBHOOK_SECRET": "sk_live_..."
}
}
}
}file .mcp.json (in your project root)file claude_desktop_config.jsonfile ~/.cursor/mcp.jsonfile .vscode/mcp.jsonfile ~/.codeium/windsurf/mcp_config.jsoninstall npx -y ratchet-mcpversion 0.3.0
What it does
Ratchet is an effect gate that prevents AI agents from executing duplicate side effects across retries and crashes. It holds durable decision records for irreversible actions—like charging cards, sending emails, or deploying code—and ensures each action is attempted at most once, with explicit handling of ambiguous failures.
- Prevent duplicate charges or transfers when a payment request is retried after a network failure.
- Track and enforce spending limits for AI agents attempting financial or resource-consuming operations.
- Record durable outcomes of one-way actions so later callers can retrieve what was already done instead of repeating it.
Tools this server exposes
| Tool | Does |
|---|---|
| begin | Request a decision before executing an effect, receiving execute, duplicate, blocked, or other decision states with a lease token. |
| report | Report the outcome of an executed effect with a lease token, recording whether it succeeded, failed, or remains indeterminate. |
Before you enable it
An MCP server runs with whatever access you give it. Start with a development account rather than production, and check which tools the server exposes before you let an agent call them unattended.