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

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

ToolArgumentsReturns
list_agentsAgents with status, budget, spend, risk
list_transactionsstatus?, agent?, limit?Recent transactions
list_pending_approvalsPending approval queue
approve_transactionid, note?{ ok, id, status: 'approved' }
deny_transactionid, note?{ ok, id, status: 'denied' }
engage_org_kill_switchreason?Blocks ALL new gateway calls org-wide
release_org_kill_switchRestores traffic
quarantine_agentagent_id, reason?Blocks a single agent
create_policyname, description?, rules[]{ ok, id }
summarize_todayNatural-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 }
  ]
}

Example prompts (once MCP is connected)

More