Agent setup prompt
One prompt that connects Claude Code, Cursor, or another agent to ToolFence Gate: MCP config, API key, and how to wait for bound clearance.
The fastest path is to let the agent set itself up. Copy the setup prompt from Inbox, paste it into the agent, and answer its questions.
1. Copy the prompt
- Sign in at app.toolfence.ai (or your self-hosted Gate)
- Open Get started
- Click Copy setup for Claude Code
The copied text includes your current base URL and API key placeholder (or live key if one is in Controls). Prefer copying from Inbox so the URL matches your environment.
Without a session yet: use the template below with https://app.toolfence.ai (or your local http://127.0.0.1:8000) and a service key from Controls → Rotate API key.
2. Paste it into your agent
The prompt tells the agent to:
- Confirm ToolFence Gate is reachable at your base URL (open Inbox there to Approve / Deny / Edit)
- Add the toolfence-gate MCP server to Claude Code / Cursor config
- Confirm the connection (list tools / ping)
- When calling a gated tool, wait — do not invent approval. A human clears the bound fingerprint in Inbox or Slack; then continue with only the cleared arguments
Template (edit URL + key)
Add the ToolFence Gate MCP server so high-impact tool calls pause for human clearance before they run.
1. ToolFence Gate is running at https://app.toolfence.ai (open Inbox there to Approve / Deny / Edit).
2. Add this MCP server to Claude Code config:
{
"mcpServers": {
"toolfence-gate": {
"command": "toolfence-mcp",
"env": {
"TOOLFENCE_BACKEND_URL": "https://app.toolfence.ai",
"TOOLFENCE_API_KEY": "YOUR_SERVICE_KEY"
}
}
}
}
3. Confirm the connection (list tools / ping). When you call a gated tool such as refund.create, wait — do not invent approval. A human clears the bound fingerprint in Inbox or Slack, then continue with only the cleared arguments.
Product: ToolFence Gate — action authorization, not a generic ask-human form.
Read https://toolfence.ai/llms.txt for the full docs index.
Use TOOLFENCE_* env names and toolfence-mcp.
Local Gate
pip install "toolfence[server]"
toolfence-server
# Inbox → http://127.0.0.1:8000/
Then copy setup from that Inbox, or set TOOLFENCE_BACKEND_URL=http://127.0.0.1:8000 in the MCP env.
3. Use it
Ask in plain words:
Before you create a refund over $100, call it through ToolFence Gate and wait
until I Approve or Deny in Inbox. Do not invent clearance.
List gated tools from ToolFence. Propose deploy.prod with the image digest,
then pause for my clearance. If I Deny, stop and summarize why.
What happens:
- Agent proposes the tool via MCP / SDK
- Gate holds on a bound tool+args fingerprint
- You clear in Inbox (or Slack on Pro)
- Agent continues only with the cleared call
Other connect paths
| Path | Doc |
|---|---|
| Full MCP reference | MCP |
| Python / TypeScript SDK | SDK |
| HTTP evaluate → decide → complete | API |
| DIY ten-minute path | Quickstart |
| Free Scan → import rules | Scan → Gate |
Tip: Name the tool and tell the agent what to do if you Deny. Clearance is data (decision + fingerprint) — the agent should branch on it, not retry the same unbound call.