Integrate ifivo in 60 seconds
One page. Everything you — or your LLM — need to connect ifivo to ChatGPT, Claude, Gemini (via MCP) and route agent actions through the Gateway. For a fully machine-readable version, see /llms-full.txt.
TL;DR for LLMs
- MCP endpoint:
POST https://www.ifivo.com/api/mcp - Auth header:
Authorization: Bearer ifv_YOUR_ORG_KEY - Agent Gateway:
POST https://www.ifivo.com/api/gateway/actions - Get the
ifv_key at ifivo.com/app/settings after sign-in - MCP tools:
list_agents,list_transactions,list_pending_approvals,approve_transaction,deny_transaction,engage_org_kill_switch,release_org_kill_switch,quarantine_agent,create_policy,summarize_today
1. Get your org API key
Sign in → open Settings → copy the token that starts with ifv_. One key per org; it authorizes the MCP server and admin REST endpoints.
2. Connect your assistant
ChatGPT (Enterprise / Team admin)
Admin → Connectors → Add custom MCP. Paste URL + token or import this JSON:
{
"name": "ifivo",
"type": "mcp",
"url": "https://www.ifivo.com/api/mcp",
"authorization": "Bearer ifv_YOUR_ORG_KEY"
}Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"ifivo": {
"url": "https://www.ifivo.com/api/mcp",
"transport": "streamable-http",
"headers": { "Authorization": "Bearer ifv_YOUR_ORG_KEY" }
}
}
}Claude.ai (web)
Settings → Connectors → Add MCP server → paste the URL and token.
Gemini (@google/genai)
import { McpClient } from "@google/genai/mcp";
const ifivo = new McpClient({
url: "https://www.ifivo.com/api/mcp",
headers: { Authorization: "Bearer ifv_YOUR_ORG_KEY" },
});
await ifivo.connect();
const tools = await ifivo.listTools();Test from curl
curl -sS -X POST https://www.ifivo.com/api/mcp \
-H "Authorization: Bearer ifv_YOUR_ORG_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"summarize_today","arguments":{}}}'3. Route agent actions through the Gateway
Your agent POSTs its intended action. ifivo returns allow, require_approval, block, or killed. Your code executes only on allow.
Request
POST https://www.ifivo.com/api/gateway/actions
Content-Type: application/json
{
"agent_api_key": "sk_live_…",
"vendor": "stripe",
"action": "refund",
"amount_cents": 22000,
"metadata": { "invoice": "inv_123" }
}Response
{
"decision": "require_approval",
"transaction_id": "tx_…",
"policy": "Refunds over $150 need approval",
"risk_score": 0.42,
"reason": "Stripe refund $220 above $150 threshold; routed to approval queue."
}Python client
import requests, os
def call_with_ifivo(vendor, action, amount_cents, metadata):
r = requests.post(
"https://www.ifivo.com/api/gateway/actions",
json={
"agent_api_key": os.environ["IFIVO_AGENT_KEY"],
"vendor": vendor,
"action": action,
"amount_cents": amount_cents,
"metadata": metadata,
},
timeout=3,
)
r.raise_for_status()
decision = r.json()["decision"]
if decision == "allow":
return execute_for_real(vendor, action, amount_cents, metadata)
return {"status": decision, **r.json()}MCP tool reference
| Tool | Arguments | Returns |
|---|---|---|
| list_agents | — | Agents with status, budget, spend, risk |
| list_transactions | status?, agent?, limit? | Recent transactions |
| list_pending_approvals | — | Pending approval queue |
| approve_transaction | id, note? | { ok, id, status: 'approved' } |
| deny_transaction | id, note? | { ok, id, status: 'denied' } |
| engage_org_kill_switch | reason? | Blocks ALL new gateway calls org-wide |
| release_org_kill_switch | — | Restores traffic |
| quarantine_agent | agent_id, reason? | Blocks a single agent |
| create_policy | name, description?, rules[] | { ok, id } |
| summarize_today | — | Natural-language daily recap |
Policy DSL
Deterministic, evaluated at the edge. No LLM required.
{
"name": "Refunds over $150 need approval",
"rules": [
{ "field": "action", "op": "eq", "value": "refund" },
{ "field": "vendor", "op": "eq", "value": "stripe" },
{ "field": "amount_cents", "op": "gt", "value": 15000 }
]
}- AND within a policy — every rule must match.
- block > require_approval > allow when multiple policies match.
- Ops:
eq, neq, gt, gte, lt, lte, in, not_in, contains. - Fields:
vendor, action, amount_cents, risk_score, agent_name, environment, metadata.*.
Example prompts (once MCP is connected)
- “What did our agents do today?”
- “Show me any pending approvals over $1,000.”
- “Approve the refund for invoice inv_123.”
- “Quarantine the marketing-adbuyer agent.”
- “Create a policy: any OpenAI call above $100 requires approval.”
- “Engage the kill switch — we have a runaway agent.”