API & endpoints

Authenticating against the Actuant API

Two credentials reach the MCP endpoint: a manual act_ API key for scripts and CI, or an OAuth token your agent obtains itself. Both are bearer tokens on the same endpoint.

Last updated 2026-08-08

The MCP endpoint accepts two kinds of bearer token. They are interchangeable at the transport level — same header, same endpoint, same tools. They differ in how you get one and how they are revoked.

API keys (act_…) — for scripts and CI

Mint one in Settings → Agents & MCP → Create API key. The plaintext is shown once at creation; only a SHA-256 hash is stored, so a lost key is regenerated, never recovered.

bash
curl -X POST https://www.actuant.dev/api/mcp \
  -H "Authorization: Bearer act_your_key_here" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Keys are account-wide

An act_ key carries the full permissions of the account that minted it — it can spend credit and open pull requests. Treat it like a password: environment variables and CI secrets only, never a client bundle or a committed file.

OAuth (mca_…) — for agents

MCP-native clients do not need a key pasted in. They discover the authorization server, register themselves, and walk you through a browser sign-in. Actuant records which agent asked, which is what makes Settings → Agents & MCP able to list "Claude Code" rather than "a token".

The flow is standard and fully discoverable — RFC 8414 metadata, RFC 7591 dynamic client registration, authorization code with PKCE S256:

  1. 1

    Discover

    GET /.well-known/oauth-authorization-server returns the issuer, endpoints, and supported methods.

  2. 2

    Register

    POST /oauth/register with your client name and redirect URIs. No pre-shared secret; token_endpoint_auth_methods is "none".

  3. 3

    Authorize

    Send the user to /oauth/authorize with a PKCE S256 challenge. They sign in and approve a consent screen naming your client.

  4. 4

    Exchange

    POST /oauth/token with the code and verifier. Codes are single-use and expire in 10 minutes.

Issued tokens are mca_…, hashed at rest, and valid for 90 days. Revoking an agent in Settings kills its token immediately.

What a rejection looks like

An unauthenticated call returns 401 with a WWW-Authenticate header pointing at the resource metadata — this is what lets a compliant MCP client start the OAuth dance on its own:

http
HTTP/2 401
www-authenticate: Bearer error="invalid_token",
  error_description="No authorization provided",
  resource_metadata="https://www.actuant.dev/.well-known/oauth-protected-resource"

CORS is open by design

The endpoint sets access-control-allow-origin: * and exposes www-authenticate and mcp-session-id, so browser-based MCP clients work. Bearer auth means there are no cookies to protect.