oakallowAPI Docs
Get API Key
Table of Contents

MCP Connector

Claude and ChatGPT connect to oakallow at https://api.oakallow.io/mcp via OAuth 2.1. The authorization server is self-hosted on our own infrastructure, with full compliance details at /docs/oauth. This page documents the connection, the standard read-only toolkit every account ships with, how customer-defined tools are governed, and the error shapes you'll see.

Connection

Endpointhttps://api.oakallow.io/mcp
TransportJSON-RPC 2.0 over HTTPS POST (single messages and batched arrays).
AuthenticationOAuth 2.1 Bearer token, self-hosted authorization server.
Protected Resource MetadataGET /.well-known/oauth-protected-resource/mcp, RFC 9728.
Authorization serverhttps://oakallow.io
Scopesmcp:read and mcp:write. The user picks which to grant on the consent screen.
Compliance docsoakallow.io/docs/oauth
Rate limitsNone on MCP calls. The token + register endpoints are rate-limited per IP.
Origin headerNot validated. Authentication is by Bearer token only.

Authentication flow

The oakallow MCP connector uses self-hosted OAuth 2.1. The MCP client (Claude, ChatGPT, or any other MCP-compatible application) discovers our authorization server, registers via Dynamic Client Registration (RFC 7591), and walks a standard authorization-code flow with PKCE. The user signs in with their oakallow account and chooses which scopes to grant on a consent screen we host.

  1. The client fetches the Protected Resource Metadata at https://api.oakallow.io/.well-known/oauth-protected-resource/mcp (RFC 9728). The response advertises https://oakallow.io as the authorization server and https://api.oakallow.io/mcp as the resource.
  2. The client fetches the Authorization Server Metadata at https://api.oakallow.io/.well-known/oauth-authorization-server (RFC 8414) to discover the authorize, token, register, and revoke endpoints.
  3. The client posts to POST /register (RFC 7591) and receives a fresh client_id.
  4. The client opens GET /authorizein the user's browser with a PKCE code_challenge. We render an oakallow-branded consent screen. If the user is not signed in, we bounce through oakallow.io/login first.
  5. On approval, we redirect to the client's registered redirect URI with an authorization code. The client exchanges the code at POST /token for an opaque access token (1-hour lifetime) and a refresh token (30-day lifetime, rotated on every use).
  6. The client presents the token as Authorization: Bearer <token> on every /mcp POST. We validate it locally against our grant store, extract the user identity from the encrypted grant props, and dispatch the JSON-RPC call.

On this OAuth path the tokens are opaque bearer strings, stored encrypted in Cloudflare KV with the access token itself as key material. A person signs in interactively; there are no shared API keys, no client credentials on the user side, and no long-lived secrets to leak. Full compliance documentation lives at /docs/oauth.

For an autonomous agent that runs on its own with no human to complete an interactive sign-in, oakallow issues a separate scoped credential: an oak_agent_ bearer token. The same /mcp endpoint accepts it; the handler checks for an oak_agent_ bearer before the OAuth provider, so the two credential types coexist on one endpoint. An agent token is scoped to one organization, can submit and check permission requests but never approve, is rate-limited per identity, and is stored only as a SHA-256 hash. See /info/agents for the model and the dashboard's Account → Agents page to provision one.

Standard tools (oakallow-managed)

Every oakallow account is seeded at signup with a Default organization and five standard read-only tools. These are the tools oakallow itself executes on behalf of the connector. They cannot be deleted from the dashboard and every annotation (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) is precisely known.

check_approval_status

Poll a pending approval request by REF number. Use this between retries of a tool call that is pending approval. Do not call the original tool again to check status, that will create a duplicate approval.

Input: reference (string, required) . the REF-XXXXXXXX-XXXX identifier.
Annotations: readOnly, idempotent.

list_pending_approvals

List approval requests made through this connection (the account or agent signed in) that are still waiting for a decision, in the named org (or your only org). Returns up to 25 rows. For requests waiting on you as an approver, use list_approvals_waiting_for_me.

Input: none.
Annotations: readOnly, idempotent.

check_permission

Dry-run permission resolution. Asks whether a given tool call would be allowed, require approval, or be blocked. Without actually making the call.

Input: tool_name (string, required); optional org (the target org's external id. See Organizations), resource_id, method, tenant_id (or the oakallow_names). Same resolution as the real call; a value that isn't set up is refused.
Annotations: readOnly, idempotent.

Auto-discovery:if the tool isn't registered in the caller's org yet, check_permission auto-creates it as a draft with default_permission = requires_approval and conservative annotation defaults so the eventual tool call is gated and the user can triage the new tool from the dashboard. See Dynamic tools → Auto-discovery for the full behavior, defaults, and rate limits.

list_my_tools

Enumerate the customer-defined tools available in the named org (or the signed-in user's only org if they have one). Standard oakallow-managed tools are excluded to keep the output focused on the customer's own catalog.

Input: optional org(the target org's external id. See Organizations).
Annotations: readOnly, idempotent.

list_approvals_waiting_for_me

List requests waiting for your decision as an approver, up to 25, oldest first: across all of your orgs, or only the org you name. Read-only: it never approves or denies anything. In chats that support MCP Apps, each request appears on a card with Approve and Deny (see Approval cards). The text reply never contains a link. Agents get nothing to decide, because agents cannot decide approvals.

Input: org (string, optional). Leave it out to see every org you approve in.
Annotations: readOnly, idempotent.

Approval cards (MCP Apps)

In chats that support MCP Apps, such as Microsoft 365 Copilot Cowork, VS Code Copilot Chat, Claude, ChatGPT and Cursor, oakallow replies also appear as cards. Chats without card support show the same text as always. The text never changes. Microsoft 365 Copilot Chat shows the text (read-only); approve from a card in Cowork.

Status card. When a call is sent for approval or is still awaiting approval, and on check_approval_status and list_pending_approvals, the card shows the reference, the tool, what it is for, the status and who decided. It has no buttons.

Approver card. list_approvals_waiting_for_me shows each request with Approve and Deny. A button never decides. It opens the oakallow confirm page, where you confirm with a passkey or another second factor, exactly like the Slack, Discord and Teams cards. That confirmation signs the decision.

Each button link works once, only for the person it was made for, and only for that exact request and approval level. It expires with the request or after 24 hours, and listing again replaces it. Links are never in the text the model reads, and agents never receive them. The card loads nothing from the network and calls no tools.

Organizations

An oakallow account can hold more than one organization, and each org has its own registered tools, permission rules, approver groups, and alert destinations. A permission check must resolve against the org the action belongs to. That is what decides which rules apply and who is asked to approve.

Every org-scoped tool accepts an optional orgargument: the organization's name (for example OakAsh-TEST, any capitalization) or its external id (for example org_oak_…).

One org: omit org and the connector uses it. More than one org: pass org to name the target. If it is omitted, nothing is checked or created: the reply asks which org and names your orgs, so you can answer by name. The two approval lists, list_approvals_waiting_for_me and list_pending_approvals, are the exception: without org they cover all of your orgs, starting with a count per org. A name that matches two of your orgs is refused with their ids, never guessed.

The orgyou pass is authorized against your signed-in identity: you can only target an org you can act in (team owner or admin, or a member of that org's approver group), and a name only ever matches those orgs. The connector names only your own orgs, and only to a person signed in with OAuth. For agents, download the org-specific skillfrom that org's dashboard: it carries the org id and the agent passes it on every call. The skill is a convenience, never a grant of access.

Resources

oakallow exposes three read-only MCP resources alongside the tools: two preflight signals, described here, and the approval card, ui://oakallow/approval-card, which chats that support MCP Apps load to show approval cards. Resources are attachable context a client can pin for the agent, rather than verbs the agent calls. The two below are preflight signals an agent can read before committing to route an action through oakallow. Both require the mcp:read scope, neither is a tool call, and neither is billed.

oakallow://status

Liveness of the connector for the signed-in session. A successful read is itself the proof the session is valid, since the request only reaches this handler after the bearer token is validated and the account is confirmed active.

Returns: status, the endpoint URL, server name and version, the protocol version, and the granted scopes. No account identity or PII is returned.

oakallow://credits

Whether a governed call would currently be funded for the billing org this session resolves to, so an agent can fail fast before requesting an approval that could not be paid for. It resolves the billing org the same way a real tool call does, so a can_fund: true result genuinely means the eventual approval will be funded, including team-pool fallback.

Returns: a can_fundboolean and the org's name and external_id. It deliberately discloses no balance figures: dollar amounts are surfaced only to the team owner in the dashboard, never over the connector. If the session resolves to no org, or to more than one, it returns can_fund: false with a reason rather than guessing which org would be billed.

Dynamic tools (customer-defined)

Customers define their own tools in the oakallow dashboard or via POST /v1/tools. Those tools appear in tools/listfor the owning user with the MCP annotations the customer declared at registration time. The worker relays those annotations unchanged to Claude. oakallow does not execute the tool. It governs it; execution is the customer's responsibility.

Required annotations on create

POST /v1/tools, POST /v1/tools/bulk, and POST /v1/tools/seed all require four annotation fields on create. The singular create also requiresannotations_ack: true:

  • read_only_hint. True if the tool performs no state changes.
  • destructive_hint. True if effects cannot be trivially undone.
  • idempotent_hint. True if repeat calls with the same args leave the world in the same state.
  • open_world_hint. True if the tool reaches an external system beyond oakallow.
  • annotations_ack. True; the caller acknowledges the four values accurately describe the tool.

Missing any of the four returns HTTP 400 with the errortool annotations are required: read_only_hint, destructive_hint, idempotent_hint, open_world_hint must be set (boolean or 0/1).This matches the Anthropic Connector Directory and OpenAI Apps SDK requirement. Both treat missing annotations as a validation error, and ChatGPT's runtime usesreadOnlyHint to decide whether to show a confirmation prompt.

Auto-discovery via check_permission

Auto-discovery is MCP-only. REST callers must register tools explicitly via POST /v1/tools (or bulk/seed). The REST /v1/permissions/check endpoint does not auto-create. The split is intentional: REST customers are wiring their own backend and manage their catalog deliberately; MCP customers are connecting an agent that may try tools faster than a human can pre-register them.

When an MCP client (Cowork, Claude Desktop, ChatGPT, any compatible agent) calls check_permission with a tool_namethat isn't registered for the caller's org, oakallow inserts a new row with status = draft, auto_created = 1, and default_permission = requires_approval. The verdict still comes back as requires_approval, so the eventual tool call is gated. The user reviews the discovered tool from the dashboard (Tools page → Recently Discovered) and chooses to allow it, block it, or keep it gated. This makes check_permission safe to call eagerly on every tool name your agent might invoke. Your catalog grows as your agent works, and nothing executes without your sign-off.

Conservative annotation defaults. Auto-discovered tools come in with the most restrictive annotation values, not blank. The semantics of an unknown tool are unknown, so oakallow plants the cautious reading until the user reviews:

  • read_only_hint. False (assume it changes state)
  • destructive_hint. True (assume effects can't be undone)
  • idempotent_hint. False (assume repeat calls compound)
  • open_world_hint. True (assume it reaches external systems)
  • annotations_ack. False until the user reviews

Any agent reading the catalog after a discovery sees a tool flagged destructive, non-idempotent, and reaching the outside world. Which is what you want until the human says otherwise. The dashboard's needs annotations chip keys off annotations_ack = 0alone (the single signal of "user hasn't reviewed yet"); the user adjusts the four hints from the Recently Discovered queue.

Auto-discovery is rate-limited per org. Defaults: 50 per hour, 500 lifetime; both configurable on the orgs table. When a cap is hit, the verdict is still requires_approval (fail-closed) but no row is added to the Recently Discovered queue until existing discoveries are triaged. The tool.auto_created webhook event fires on every successful auto-create, separately from the approval.created event that fires later on the eventual tool call.

Tool-call behavior

When Claude invokes a customer-defined (approved) tool, the worker signs the decision and returns a REF-… signed decision receipt. For every verdict below, not just one. The receipt is the cryptographic proof oakallow made the decision; it is returned inline and persisted, no separate mint call.

  • Resolver = allowed: the worker returns the signed receipt with a "no dispatch configured" note. oakallow governs but does not execute. Customers who want immediate execution do it client-side or wire their own backend. The receipt is the proof the action was authorized.
  • Resolver = requires_approval: the worker creates an approval row, fires the approval.created webhook, pushes a notification to configured approvers, and returns a REF-…reference. The customer's backend handles execution on approval.decided.
  • Resolver = disabled: the worker returns a policy-denied result with the resolution level that matched, and a signed receipt that is the proof oakallow blocked the action.

This is the governed-intent pattern. The MCP connector surfaces the call to a human approver; the customer's infrastructure performs the side effect. Every verdict is signed either way.

Targeting a resource, method or tenant

Governed tools take three optional arguments: oakallow_resource, oakallow_method, oakallow_tenant. They are prefixed so they never clash with a tool's own arguments, and are removed before a gateway call is forwarded.

  • Sent but not set up in oakallow: the call is refused. It never falls back to allowed.
  • Left out: if a rule for the tool names one, you get the strictest of those rules.
  • Locked agents: an agent locked to resources or methods must send one from its list on every call. Anything else is refused.
  • One pending request per caller, tool and target. Calling again returns the same REF-….

Gateway-connected servers (oakGuard)

Everything above describes a directly-connected tool: oakallow decides and your infrastructure executes. A server registered through oakGuard (the gateway) behaves differently on the allowed path. Because the agent reaches that server only through oakallow, oakallow forwardsthe call to it after governance clears, rather than returning a "no dispatch configured" note. Your server still executes the tool against its own data; oakallow runs no business logic. It is the transport, not the executor.

  • allowed: oakallow signs the receipt and forwards the call to the registered server; the result returns to the agent with the receipt.
  • requires_approval: the call is held with a REF-…until a human approves; the agent's retry then forwards exactly once (one approval, one execution).
  • disabled: the call is refused and never leaves oakallow.

In gateway mode oakallow transits the request and response for a governed call (over TLS, both legs) but does not retain the payloads. This is the trade that makes governance unbypassable: to be the only route to your server, oakallow is in the request path. See the oakGuard page for the full trust boundary.

Accountability

oakallow does not vouch for the accuracy of customer-declared annotations. A governance platform enforces the policy a customer configured; it does not certify the third-party code it governs. That is why the dashboard form requires explicit acknowledgment before creating any tool and why oakallow relays annotations to Claude unchanged.

Published MCP tools

A verified partner can publish the tool list of an MCP server on one of its authorities. Customers who enabled that authority in an org see the published tools in the dashboard under Tools, Published, labeled with the authority and the server. oakallow only adds the tools to your catalog and your org settings. It does not call the server for you, and the permission check does not change: each org's own tool settings decide every call.

Absolute rules

These apply to every published server and every customer. No setting turns them off.

  1. A server without OAuth 2.1 sign-in cannot be published.
  2. Every published tool must declare MCP annotations: a title and readOnlyHint or destructiveHint.
  3. A tool lands as allowed only when it declares readOnlyHint: true or destructiveHint: false. Every other tool, including one with no annotations or with destructiveHint: true, lands as requiring approval, whatever the team and org choose and whoever publishes it.
  4. oakallow never invents a hint. Where the publisher left one out, the oakallow MCP connector reports the MCP specification default, which is the most cautious reading: not read-only, destructive, not idempotent, open world.
  5. Publishing never makes or forwards a call. Your org's own tool settings decide every call.
  6. An existing setting in your org is never overwritten.
  7. A failed read of the tool list never retires or disables anything.

For partners

  1. Your authority must be active with its domain verified (the DNS TXT record).
  2. On the Partner page, add the server URL and a display name. The server can be on any host.
  3. Every tool declares MCP annotations: a title and readOnlyHint or destructiveHint (all four safety hints recommended).
  4. The server must support OAuth 2.1 sign-in: protected-resource metadata whose resource names the URL, authorization-server metadata, PKCE S256, the authorization code grant, and no password grant. Servers with no sign-in, API keys or static tokens are refused.
  5. Sign in once. oakallow uses the token only to read initialize and tools/list.
  6. Set the server On to publish it. Disable is for maintenance; Off unpublishes it.

For customers

  1. Enable the partner's authority in an org. Published tools never reach an org that has not enabled it.
  2. On Tools, Published, a team owner or admin decides which tools the team allows: all tools (now and later) or selected tools (new tools wait in a pending list), and accepts the terms once for the team. Allowing enables nothing by itself.
  3. On each org's Organizations, Partners tab, an owner or admin picks the tools for that org: No tools (the default), All allowed tools, or Selected tools. An org that enables the authority gets nothing until its admin picks, and each org can pick differently.
  4. Picked tools land as approved and allowed when they declare readOnlyHint: true or destructiveHint: false. Every other tool lands as approved and requiring approval. An existing setting in an org is never overwritten.
  5. Owners and admins change permissions per org as for any other tool, or remove the server for the whole team.

Changes from the publisher

  • oakallow reads the tool list every hour.
  • A changed description, input schema or safety annotations: when the team allows all tools, the tool follows the annotation rule again in the orgs that picked it; when it allows selected tools, it goes back to needs decision.
  • A tool missing from two complete reads in a row is retired: it is disabled in every org and pending approvals for it are cancelled. A failed read never retires anything. If more than 20% of the tools (and at least 5) disappear at once, nothing is retired until the publisher confirms.
  • A retired tool that returns is allowed again and follows the annotation rule in the orgs that pick it, or waits in the team's pending list when the team allows selected tools.
  • While a server is disabled for maintenance, its tools are disabled in your orgs and restored when it is back on. When it is turned off, its tools are disabled and hidden and pending approvals are cancelled. If it is turned back on, the team allows tools and attests again, and each org picks again, before any tool is enabled.

Calling published tools

Connect your agent to the published server directly and call check_permission (or the SDK) before each call. Or register the same server in oakGuard and oakallow forwards each allowed call. A published tool and an oakGuard tool with the same name are the same catalog entry, with one set of settings.

Multi-level approvals

Tools flagged requires_second_approval escalate from level 1 to level 2 after the first human approval lands, when the owning org has a non-empty Approval 2 group configured.

From the MCP surface, this is a single REF-… that stays in pending while current_level advances internally from 1 to 2. Claude does not see the level. it simply polls check_approval_status until the reference reaches a terminal state (approved, denied, expired, or cancelled).

Error responses

Failures inside a tool call are returned as MCP result envelopes with isError: true and a text payload. HTTP-level errors (malformed JSON-RPC, missing token) are standard JSON-RPC errors.

401. Missing or invalid Bearer
HTTP/2 401
WWW-Authenticate: Bearer realm="OAuth", resource_metadata="…"

{ "error": "Missing Bearer token" }
Tool-level error (pending approval)
{
  "content": [
    {
      "type": "text",
      "text": "Request is still awaiting approval. Reference number: REF-76A7F7ED-8659. The approver needs to open oakallow and approve this reference before the call can execute. Use check_approval_status with reference=REF-76A7F7ED-8659 to poll the status."
    }
  ],
  "isError": true
}

The isError: true convention for "pending approval" is deliberate: it prevents Claude from treating the call as success and retrying the same tool, while still giving the user a human-readable message carrying the REF-… so they can check back later.

Privacy and data handling

Tool-call parameters pass through an automatic PII redaction filter before any storage (SSN, card, email, phone, address, ZIP patterns). Access tokens are verified on every request and not persisted. Approval records are retained per oakallow's standard retention policy. See the privacy policy for the MCP data-flow section.