# API token permissions for AI agents: scope, ownership, review and revocation

How to issue API tokens to AI agents: one token per agent and purpose, least privilege as NIST SP 800-53 defines it, no delete rights, a named person behind each token, expiry and revocation, what the MCP authorisation rules add, and a token register to keep.

- Source: https://finray.tech/notes/ai-agent-api-token-permissions/
- Author: Finray
- Published: 2026-11-22
- Reading time: 7 min
- Publisher: Finray Technologies Ltd, Cyprus Companies Registry HE 445903

---

## How should API tokens for AI agents be permissioned?

Give each agent a token of its own, minted by a named person for one purpose, with only the permissions the task needs, no delete rights, an expiry and a place in a register that someone reviews. When the token is used, the system should be able to say which agent acted, on whose behalf, and whether a person accepted the result.

This note explains why agent tokens need rules of their own, what the access-control controls in NIST SP 800-53 ask for, what the Model Context Protocol adds, and how to keep a token register. The examples are invented.

## Why do agent tokens need their own rules?

A token is the agent's identity in the system it calls. Three things make agents different from people holding the same token:

- **Speed.** An agent can make hundreds of calls in the time a person makes one, so a wrong permission does more harm before anyone notices.
- **Instructions from content.** An agent reads issue text, documents and web pages, and any of them can contain a sentence that asks it to call a tool. Whatever the token allows, a planted instruction can try.
- **Distance from the person.** The person who asked for the work is in a chat. The system that receives the call sees only the token, so unless the token is tied to a person, nobody is accountable for the change.

A token shared between a person and an agent fails all three: the person's broad rights pass to the agent, and the log cannot tell who did what.

## What do NIST controls ask for?

NIST SP 800-53 Revision 5 is the US federal catalogue of security and privacy controls, widely used as a reference outside government. Several of its controls apply directly to agent tokens:

| Control | What it asks for, in our paraphrase | For agent tokens |
| --- | --- | --- |
| AC-6 Least Privilege | Give users, and processes acting for them, only the access their assigned tasks need | Grant the agent only what its task needs |
| AC-2 Account Management | Run each account's life, from creation to removal, under a defined policy | Tokens are issued and withdrawn under a written rule, not ad hoc |
| AC-2(3) Disable Accounts | Disable accounts that have expired, lost their owner, broken policy or gone unused, within a set time | Expire tokens, and withdraw those whose holder has left or whose agent is no longer used |
| IA-5 Authenticator Management | Manage authenticators through their life, including how they are revoked and kept from disclosure or change | Store tokens as secrets, never in prompts or repositories, and know how to revoke each one |
| AU-10 Non-repudiation | Keep evidence that ties an action to the person, or the process acting for them, that performed it | Tie each token to the person who minted it |

The "for agent tokens" column is our reading. The phrase "processes acting on behalf of users" in AC-6 fits an agent closely: the control does not need rewriting for AI, only applying.

## What should an agent token allow?

Start from the actions, not from the roles the system happens to offer. A typical split for an agent that works in an issue tracker:

| Action | Default for an agent token | Why |
| --- | --- | --- |
| Read its projects | Allow | The agent needs context |
| Read other projects | Deny | Context from one client should not reach another |
| Create issues, subtasks, comments | Allow, with review | Drafts are useful; a person decides whether they stand |
| Update fields, move between states | Allow, with review | Changes to status and estimates affect plans and reports |
| Log or edit time | Allow, labelled | Time entries feed invoices and must show who made them |
| Delete or archive | Deny | Deletes remove the trace of what happened |
| Manage users, roles or tokens | Deny | An agent should never widen its own access |

The deny rows matter most. An agent that cannot delete cannot hide a mistake, and an agent that cannot manage tokens cannot give itself more rights.

## Who should mint and hold the token?

A named person, for a stated purpose, in a way the system records. Many tools let a person create a token in their own profile, which ties the token to that person. GitHub's fine-grained personal access tokens show the kind of limits worth looking for: each token reaches the resources of only one user or organisation, can be narrowed to chosen repositories, and carries individual permissions rather than broad ones. GitHub asks for an expiration when the token is created; a token with no expiry is allowed, but an organisation or enterprise owner can block it with a maximum lifetime policy.

Where the agent runs on a developer's machine, the token usually sits in an environment variable or a local configuration file the agent reads. Treat that file as a secret store. Anthropic's guidance for agent skills applies here too: use skills only from trusted sources, because a harmful skill can steer the agent into tool calls or code that do not match what the skill claims to do, including sending data out.

## What does the Model Context Protocol add?

When an agent reaches a system through an MCP server, the protocol's authorisation rules apply. Authorisation is optional in MCP and, where used, applies to HTTP transports and builds on OAuth 2.1. An MCP server has to check that each access token was issued for that server, and must refuse any other token rather than pass it on. The security guidance names "token passthrough", a server accepting a client's token and passing it to the downstream API, as an anti-pattern that the specification's Authorization section explicitly forbids. Servers on the local STDIO transport should retrieve credentials from the environment instead.

The [note on MCP servers for project management](/notes/mcp-server-project-management/) covers the protocol and the controls around it. Where an agent's token can move money, the same rules sit in the bank's core, with caps and instant revoke on the token: see [agentic payments for banks, EMIs and fintechs](/solutions/agentic-payments/).

## What belongs in a token register?

| Field | Example (invented) |
| --- | --- |
| Token name | issues-drafting |
| Minted by | B. Lead |
| Agent and purpose | Coding assistant; drafts issues and subtasks for the payments project |
| Permissions | Read and create on one project; update with review; no delete |
| Created and expires | 1 November 2026; 31 January 2027 |
| Where it is stored | The developer's local secret store |
| Last reviewed | 15 November 2026 |
| Revocation | One action in the minting person's profile |

Review the register on a fixed cycle, and remove tokens nobody can explain. The [agent mandate](/intelligence/glossary/agent-mandate/) is the general name for what the register's purpose column records: what an agent may do, within which limits, and who granted it.

## A worked example

The team is invented. A developer mints a token for an assistant that splits features into subtasks. The token can read and create in one project and cannot delete. A week later, an issue description contains a line asking the assistant to remove stale issues. The assistant tries; the tracker refuses with a permission error and logs the refusal. The team lead sees the refusal in the weekly review, finds the line and removes it, and the token stays as it was.

What the trail of that refusal should show is set out in [AI agent audit trail](/notes/ai-agent-audit-trail/).

## Where does Pync fit?

[Pync](/platforms/pync/) is Finray's delivery and ISMS workspace. AI agents work in the same records as the team, with their own agent tokens. An agent's change to an issue, a subtask or an asset applies at once and stays marked as not yet valid until a person accepts it in the Review queue, and a rejection reverts it. Roles and fine-grained permissions decide what each person can see and change, and sign-in is delegated to Finray's identity service or Google, so Pync never sees a password.

## Pync from your own Claude session

Manage your AI agents and your team in Pync from your own Claude session. A Claude session works with Pync through agent skills, which call Pync's REST API with an agent API token. A person mints that token in their own Pync profile, under API tokens → New token. The session drafts each change, the person says yes in the chat, and only then is it sent.

- **What waits for review and what applies at once.** Changes to issues, subtasks, assets and scheduled maintenance from an agent token apply at once, marked as not yet valid, and wait in the Review queue; timesheet edits, comments and attachment uploads apply at once, labelled AI. The server decides this, whatever the client sends. A person accepts or rejects each change in the queue, and a reject reverts it.
- **Moves are reviewed too.** A move of an issue between states files its own review item.
- **What an agent token cannot do.** An agent token cannot delete issues, attachments, timesheets or maintenance schedules, or change projects and labels; the server refuses with 403. A subtask an agent deletes waits in the Review queue, and a rejection restores it.

OpenAI Codex supports the same open agent skills format: a folder with a SKILL.md file. The steps, the scope and the US governance context are on [AI coding agents and your team in one tracker](https://finray.tech/platforms/pync/ai-agents/).

## Frequently asked questions

### Should an AI agent use a developer's own API token?

No. Give the agent a token of its own, minted by a named person for a stated purpose. Then the system can tell the agent's actions from the person's, and the token can be revoked without locking the person out.

### What permissions should an AI agent's token have?

Only those the task needs, which is what least privilege means in NIST SP 800-53 control AC-6. For an agent that drafts issues, that is read and create on its projects, with no delete and no administration rights.

### Should agent tokens expire?

Yes. Set an expiry that matches the work and review the register regularly. NIST control AC-2(3) asks organisations to disable accounts that have expired, lost their owner, broken policy or gone unused for a set time; the same reasoning applies to tokens.

### Can a token's permissions replace human review?

No. Permissions decide what an agent can attempt; review decides whether what it did stands. Use both: a narrow token, and a person who accepts or rejects each change the agent makes to shared records.

### What does the MCP specification say about tokens?

For HTTP transports, an MCP server has to check that each token was issued for it and must refuse any other token rather than pass it on; token passthrough is explicitly forbidden. Servers on the STDIO transport should retrieve credentials from the environment instead.

## Sources

- [NIST: SP 800-53 Rev. 5, Security and Privacy Controls for Information Systems and Organizations, AC-2, AC-6, IA-5 and AU-10 (accessed 22 November 2026)](https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final)
- [Model Context Protocol: Authorization (accessed 22 November 2026)](https://modelcontextprotocol.io/specification/latest/basic/authorization)
- [Model Context Protocol: Security best practices (accessed 22 November 2026)](https://modelcontextprotocol.io/specification/latest/basic/security_best_practices)
- [GitHub Docs: Managing your personal access tokens (accessed 22 November 2026)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)
- [Anthropic, Claude documentation: Agent Skills, security considerations (accessed 22 November 2026)](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview)
- [Finray: Pync, delivery and ISMS workspace (accessed 22 November 2026)](https://finray.tech/platforms/pync/)
