Porticol Guard: let coding agents call your APIs without the keys

Claude Code, Cursor and Codex call your APIs through Porticol. Keys stay in your keychain or on your gateway, a risky call waits for a person, and every call goes into a log you can check.

Three levels of enforcement

LevelWhat it stopsWhat it does not stopPlans
1. GuidedThe agent calls through Porticol's MCP server. Keys never reach the model, a risky call waits for a person, and every call is recorded.An agent that finds a key somewhere else and runs curl itself.Free
2. EnforcedEvery call through MCP. On macOS and Linux, the agent's sandbox or proxy settings send shell traffic through the local proxy: Claude Code's sandbox, and Codex's network proxy for sandboxed commands.Someone who turns the sandbox off, a command that leaves the proxy, or a shell outside it. Cursor has hooks only, with no forced network path. The person owns the laptop.Free for one person; Team shares the policy
3. GatedThe production key lives only on the team gateway, and production accepts calls from the gateway alone, so an agent on any laptop, or a script, cannot send one with a key of its own.A call the gateway's policy allows, and any route to production your network leaves open beside the gateway.Business and self-hosted

Windows runs levels 1 and 3 only. An agent's name in the log is what the client reports, not a verified identity.

What each agent gets

AgentWhat Guard sets upWhat it stopsWhat it does not
Claude CodeThe sandbox in ~/.claude/settings.json, its network through the local proxy, writes to the data folder denied, reads of .env*, ~/.aws and similar denied, and a PreToolUse hook on Bash.Shell traffic through the proxy on macOS and Linux, and every call through MCP.File tools, MCP servers, WebFetch and hooks run outside the sandbox, and a person can turn the sandbox off unless managed settings forbid it.
CodexThe experimental [features.network_proxy] and the proxy variables in ~/.codex/config.toml, and a PreToolUse command hook in ~/.codex/hooks.json.Sandboxed shell commands that go through the proxy, a command that changes how its calls reach it or names a guarded host Guard cannot read, and every call through MCP.A command that leaves the proxy, and a hook that can only deny: it has no ask and no fail-closed setting.
CursorbeforeShellExecution and beforeMCPExecution hooks in ~/.cursor/hooks.json, with failClosed: true.One plain curl, wget or httpie call per shell command, which the hook asks about or denies, and MCP calls to a remote server, decided by its URL.It is not a forced network path: a command the hook cannot see, or a shell outside Cursor, still reaches the network.

Hooks are how Guard sees shell commands. Claude Code and Codex leave an HTTP call to the proxy, and ask (Claude Code) or deny (Codex) a command that changes how its calls reach it. Cursor's hook decides a plain call itself and waits 25 seconds for a person. porticol-cli agent setup --print-trust prints the certificate and proxy variables that make Node, Python, curl and other runtimes trust the local proxy, plus the Java keytool line.

A policy a team lead can read in a minute

One YAML file decides what every agent may do. Shadow mode logs what would have happened and lets the call through, so a team can tune the rules before anything is blocked. Switch mode to enforce when the rules match how the team works.

version: 1
mode: shadow                      # log what would happen first; switch to enforce when tuned
environments: [local, staging, production]
hosts:
  api.stripe.com: { env: production, key: "{{stripe_live_key}}" }
  api.stripe.test: { env: staging, key: "{{stripe_test_key}}", header: Authorization, format: "Bearer {key}" }
rules:
  - id: reads
    match: { method: [GET, HEAD] }
    action: allow
  - match: { env: production, method: DELETE }
    action: deny
    reason: No agent deletes on production.
  - match: { host: api.stripe.com, method: POST, path: /v1/refunds }
    when: { body.amount: { over: 5000 } }
    action: ask
    approvers: [team:payments]
  - match: { env: production, method: [POST, PUT, PATCH] }
    limit: { per_minute: 10, per_agent: true }
    action: allow
  - match: { env: production }
    window: { days: [mon, tue, wed, thu, fri], from: "09:00", to: "18:00", zone: Asia/Kolkata }
    action: allow
agents:
  claude-code: { up_to: production }
  "*": { up_to: staging }

The first matching rule wins. A call above the agent's ceiling is denied before any rule. A call no rule matches asks on a protected environment and is allowed elsewhere. The Policy page validates the file as you type and, over the last seven days, shows how often each rule allowed, asked and denied and what shadow mode would have done.

How it's different from tools that only hide keys

Hiding a key is necessary and no longer enough. These are the parts that make the difference when an agent sends the call.

Tools that only hide keysPorticol Guard
ApprovalApprove access to a service for a session, or ask for nothing at all.Approve one exact call. The approval binds a SHA-256 of the request the policy decided: the method, URL, environment, headers, auth, protocol, settings and body over MCP, and the method, URL, environment, headers and body through the local proxy. It works once and expires in 10 minutes. Allow for today makes a rule-scoped allowance until local midnight.
ScopeOne path, usually the agent's MCP server or a shell proxy.One policy over MCP calls, the shell path each agent allows, and the team gateway. One decision function on every path.
RecordA request log, or nothing.A hash-chained log of every call: the rule, the decision, the approver and what came back. porticol-cli guard log verify checks the chain, and export gives JSON or CSV.
Where it runsA hosted service, or a proxy you must route everything through.Local first: the desktop app, the CLI and a proxy on 127.0.0.1, with no account. The team gateway is the one server component, on Business.
PriceAn enterprise quote.A price per seat: Free for one person with no account, Team at $9 a seat a month, Business at $19 a seat a month.

The core is open source

The Guard policy engine, the local proxy, the CLI, the MCP server and agent setup, plus the engine crates they need, are published under Apache-2.0 at github.com/pavanmanishd/porticol-cli. The desktop app, team features and gateway stay proprietary. Read the code that holds your keys before you route a production call through it.

Try it on your own APIs

Free for one seat, on macOS, Windows and Linux.