Skip to content

Run an autonomous Application

Use autonomous authority for a backend worker, cron job, or agent that calls its own Application gateway. OAuth Client Credentials creates an Application-principal bearer. It creates no Authorization Transaction, User GrantBundle, Grant, or Connection.

The requesting OAuth client and target gateway must belong to the same active Application. The bearer audience must be that gateway’s exact Resource and normally carries mcp:invoke. Only the Application’s active vaulted or none Connector attachments are eligible; a workload cannot borrow a User-owned Connection.

  • A static confidential Application with an active client_secret credential.
  • A workload identity configured for the Application.
  • The Application’s own active gateway Resource.
  • At least one active vaulted or no-auth Connector attachment.

Keep the client secret in server-side secret storage.

import { ApplicationClient } from "@axec/sdk/application";
const application = new ApplicationClient({
baseUrl: "https://axec.example.com",
clientId: process.env.AXEC_CLIENT_ID!,
clientSecret: process.env.AXEC_CLIENT_SECRET!,
resource: "https://axec.example.com/g/release-bot/mcp",
scope: "mcp:invoke",
});
const mcp = application.mcp();
const tools = await mcp.request({
jsonrpc: "2.0",
id: 1,
method: "tools/list",
params: {},
});

Call only a tool returned by tools/list. ApplicationClient authenticates at /oauth2/token with client_secret_basic, obtains a fresh gateway bearer, and sends each stateless MCP request to the configured Resource.

In Application tool-call evidence, confirm the principal kind is Application, the workload actor is the configured workload, and the Connector is an eligible administrator-owned attachment. There should be no User, Connection, or Grant attribution.

Credential revocation, Application or gateway disablement, or attachment removal invalidates subsequent requests through live evaluation. A Service Account is not an alternative gateway principal; it is limited to tenant management automation.