Firewall for AI agents: checks actions, holds risky ones for a human, drafts your rules.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Bearer followed by your Leashgate API key (lg_...). Free key at leashgate.com
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Ask Leashgate whether an agent may run an action (refund, delete, send email, payment...) BEFORE running it. Returns allow, approval_required (a human must approve), block or quarantine. Only run the action when the decision is allow.
Action name, e.g. refund_customer or delete_rows.
Name of the agent taking the action.
The action's parameters, e.g. { amount: 4800, order_id: 'A-1042' }.
This tool isn't marked read-only, so it may change something on the server or in an account you connected.
Pick your client. Values in capitals, like YOUR_TOKEN, are yours to fill in.
Run in a terminal
claude mcp add --transport http leashgate https://gw.leashgate.com/mcp \ --header 'Authorization: Bearer YOUR_TOKEN'
Headers
Authorization (required): Bearer followed by your Leashgate API key (lg_...). Free key at leashgate.comAsk Leashgate whether an agent may run an action (refund, delete, send email, payment...) BEFORE running it. Returns allow, approval_required (a human must approve), block or quarantine. Only run the action when the decision is allow.
| Argument | Type | Description |
|---|---|---|
| agent | string | Name of the agent taking the action. |
| action* | string | Action name, e.g. refund_customer or delete_rows. |
| params | object | The action's parameters, e.g. { amount: 4800, order_id: 'A-1042' }. |
{
"type": "object",
"required": [
"action"
],
"properties": {
"agent": {
"type": "string",
"description": "Name of the agent taking the action."
},
"action": {
"type": "string",
"description": "Action name, e.g. refund_customer or delete_rows."
},
"params": {
"type": "object",
"description": "The action's parameters, e.g. { amount: 4800, order_id: 'A-1042' }."
}
}
}Get the exact address and the one change needed to put an AI agent behind Leashgate, for a given model provider. Use this when the user asks to add, install or connect Leashgate. The provider API key stays where it is; only the base URL changes.
| Argument | Type | Description |
|---|---|---|
| agent | string | A short name for the agent, e.g. support-bot. Shown in the Leashgate console. |
| provider* | string | The model provider the agent calls. |
{
"type": "object",
"required": [
"provider"
],
"properties": {
"agent": {
"type": "string",
"description": "A short name for the agent, e.g. support-bot. Shown in the Leashgate console."
},
"provider": {
"enum": [
"openai",
"anthropic",
"gemini",
"vertex",
"azure",
"mistral",
"groq",
"deepseek",
"openrouter",
"xai",
"together",
"fireworks",
"perplexity",
"cerebras",
"cohere",
"moonshot",
"qwen"
],
"type": "string",
"description": "The model provider the agent calls."
}
}
}Register several AI agents in Leashgate at once, before they send their first call, so each gets its own name, category, budget and history. Use it after scanning a codebase or infrastructure for code that calls an AI provider (OpenAI, Anthropic, Gemini...): one entry per agent, service or worker. Then point each agent at the address returned.
| Argument | Type | Description |
|---|---|---|
| agents* | array |
{
"type": "object",
"required": [
"agents"
],
"properties": {
"agents": {
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Short unique name, lowercase with dashes, e.g. refunds-bot."
},
"where": {
"type": "string",
"description": "Where it runs or lives, e.g. services/refunds/worker.py or Render service refunds-worker."
},
"provider": {
"enum": [
"openai",
"anthropic",
"gemini",
"vertex",
"azure",
"mistral",
"groq",
"deepseek",
"openrouter",
"xai",
"together",
"fireworks",
"perplexity",
"cerebras",
"cohere",
"moonshot",
"qwen"
],
"type": "string",
"description": "The AI provider this agent calls."
},
"description": {
"type": "string",
"description": "One line on what the agent does."
}
}
}
}
}
}The rules Leashgate applies today to every agent action (what is blocked, what waits for a human, thresholds, daily caps), plus batches already waiting for review. Read it before propose_rules so you only propose what is missing.
No arguments.
{
"type": "object",
"properties": {}
}Propose new rules after auditing the codebase, the agents' tools and skills, and any written policy (CLAUDE.md, AGENTS.md, internal docs). One rule per real risk you found: money that can move, data that can be deleted, people who can be contacted in bulk, actions that should not run at night. Rules are NOT applied: the user approves the batch in the Leashgate console in one click. You can only add rules, never turn one off or loosen one. A rule matches when the action name contains one of the words in 'match' (e.g. "refund|reimburse"); add 'fields' + 'threshold' for amounts or counts, 'dailyCap' for a daily total in USD, 'hours' to limit to working hours, 'allow' for allowed beneficiaries. Explain each rule in 'why' and point to the code in 'where'.
| Argument | Type | Description |
|---|---|---|
| rules* | array | |
| source | string | Who drafted the batch, e.g. Claude Code, Cursor, Codex. |
| summary | string | Two lines for the user: what you audited and the main risks found. |
{
"type": "object",
"required": [
"rules"
],
"properties": {
"rules": {
"type": "array",
"items": {
"type": "object",
"required": [
"title",
"match",
"effect"
],
"properties": {
"why": {
"type": "string",
"description": "One sentence the user will read: the risk and where it comes from."
},
"allow": {
"type": "array",
"items": {
"type": "string"
},
"description": "Allowed beneficiaries: domains, emails, IBANs, account ids."
},
"hours": {
"type": "object",
"properties": {
"to": {
"type": "number"
},
"tz": {
"type": "number"
},
"from": {
"type": "number"
}
},
"description": "Allowed hours (24 h clock, tz = UTC offset). Outside them the rule triggers."
},
"match": {
"type": "string",
"description": "Action words separated by |, e.g. refund|reimburse|chargeback."
},
"title": {
"type": "string",
"description": "Short name, e.g. Refund above $200."
},
"where": {
"type": "string",
"description": "File, function or tool where the action lives, e.g. services/refunds.py:issue_refund."
},
"effect": {
"enum": [
"approval",
"block"
],
"type": "string",
"description": "approval = a human approves each time; block = never allowed."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "Argument names holding the amount or the count, e.g. [\"amount\"] or [\"recipients\"]."
},
"dailyCap": {
"type": "number",
"description": "Trigger when today's total for this agent would pass this amount in USD."
},
"threshold": {
"type": "number",
"description": "Trigger only above this amount or count."
}
}
}
},
"source": {
"type": "string",
"description": "Who drafted the batch, e.g. Claude Code, Cursor, Codex."
},
"summary": {
"type": "string",
"description": "Two lines for the user: what you audited and the main risks found."
}
}
}What the workspace's AI agents did over the last days: actions checked, actions stopped and the money held back, loops cut, approvals, AI spend per agent, and tips to spend less. Use it when the user asks how their agents are doing, what Leashgate did for them, or where their AI money goes.
| Argument | Type | Description |
|---|---|---|
| days | number | Window in days, 1 to 30. Default 7. |
{
"type": "object",
"properties": {
"days": {
"type": "number",
"description": "Window in days, 1 to 30. Default 7."
}
}
}Summary of the Leashgate workspace: plan, mode (enforce or observe), number of agents, calls recorded, and whether a first agent is connected. Use it to verify a setup worked.
No arguments.
{
"type": "object",
"properties": {}
}We read every tool's name, description and inputs the way the model will, looking for instructions hidden from you. A clean result means no warning signs, not a guarantee. Scanned Dec 6, 2026.
No readOnlyHint / destructiveHint annotations, so clients can't tell a read from a write without asking.
Fix: Add annotations to each tool, e.g. { readOnlyHint: true } for tools that only read.