How access is decided#
Every tool call an agent makes on https://mcp.bastn.ai/mcp is checked before it reaches the tool. Several layers apply, and each one can only narrow what the agent gets:
- The agent's status. A paused, killed or retired agent is refused before anything else. See Stop an agent.
- The server's policy. Which tools of a server are allowed, with which arguments, and how often. See Server policy.
- Pinned tools. On a server with new tools denied, only pinned tools exist for agents. See New tools and pinning.
- Policy bundles and categories. Narrower tool sets for a team or one agent. See Bundles and categories.
- Run budgets. Caps on how much one agent run may do. See Run budgets.
- Approvals. Calls that are allowed but wait for a person. See Approvals.
A tool an agent may not call is also hidden from its tool list, so the agent does not see it.
Policies are changed by team admins (servers, pins, agents, categories, bundles) and org admins (approval policies). Members and viewers can read them. See Concepts for roles.
Server policy#
Each server has a policy. Open Tools, select the server, and open Advanced policy in its drawer. The tool policy is at the end of that section.
| Setting | What it does |
|---|---|
allow_tools | Tool name globs. When it is not empty, only matching tools pass and deny_tools is ignored. |
deny_tools | Tool name globs that are blocked and hidden. Applied when allow_tools is empty. |
arg_rules | Rules on a call's arguments. See Argument rules. |
roles | A different policy for specific users. See Roles. |
rate_limits | How many calls of a tool glob may run in a time window. See Rate limits. |
Globs match the whole name, and only * is special: read_* matches read_file but not unread_file.
A denied call is refused with a JSON-RPC error and never reaches the tool. It is recorded in the audit log.
Argument rules#
A name rule answers "may this agent call write_file?". An argument rule answers "with what arguments?". Each rule names a tool glob, and can:
- Deny values with
deny_args: globs matched against every string value anywhere in the arguments. Any match denies the call. For example["*/etc/*", "*..*"]keeps a file tool away from/etcand parent paths. - Constrain arguments with
args, one entry per argument (a dotted path reaches into nested objects):required,enum,minandmax,pattern(a glob the value must match),deny(globs it must not match) anddomains(the value is a URL whose host must match one of these globs).
[
{ "tool": "fetch", "args": [{ "name": "url", "domains": ["*.example.com"] }] },
{ "tool": "write_file", "deny_args": ["*/etc/*", "*..*"] },
{ "tool": "*", "args": [{ "name": "timeout", "min": 1, "max": 30 }] }
]An absent argument passes unless it is required. Arguments that cannot be read are denied once a rule applies to the tool.
Roles#
Roles give specific users a different policy on one server. The first role whose users list contains the caller's user id applies; everyone else gets the server's base policy.
[
{ "name": "analyst", "users": [3, 7], "allow_tools": ["query_*"] },
{ "name": "admin", "users": [1], "allow_tools": ["*"] }
]A role can also set max_effect, for example read for a read-only role. See Tool effects.
Rate limits#
A rate limit caps how often an allowed call of a tool glob may run in a sliding window, for example 30 write_* calls per 60 seconds. It counts per caller by default (an agent, or a user across all their keys), or per server for one shared cap.
Denied calls do not use up the limit. A call over the limit is refused with an error that says when to retry.
Tool effects#
Every tool has an effect: read, write or destructive. Policy can use it without listing tool names, such as "read-only for this role" or "hold every destructive call".
- An MCP server's own tool annotations set it: a destructive hint makes the tool destructive, a read-only hint makes it read.
- Connector API tools follow the HTTP method:
GETandHEADare read,DELETEis destructive, the rest are write. - A tool nothing says anything about counts as
write.
Annotations come from servers bastn does not control. A pinned tool keeps the effect it had when you pinned it, so an upstream cannot lower it later.
By default, a call to a destructive tool waits for a human approval. See Approvals.
New tools and pinning#
Every server starts with New tools set to deny, whether you create it in the dashboard or in a policy file. A tool that is not pinned is hidden and blocked. To admit tools, choose Enable all N tools in the server's drawer, or pin them on the All tools tab of Tools.
A pin records the tool's definition. If the server later changes a pinned tool's description or schema, bastn flags it as drift. The server's When a tool changes setting decides what happens then; block denies every unpinned or drifted tool, so pin the catalog first.
Set either one to hold to have bastn queue each tool it keeps out for a person to decide in Approvals, Tool reviews (under More): approving pins the definition shown. See Review held tools.
With new tools allowed, every tool the server offers is available as soon as it appears. Prefer deny for servers you do not control.
Bundles and categories#
Two ways to give a team or an agent a narrower set of tools than the servers allow.
Policy bundles are on the Policies page, in the Advanced group of the navigation. A bundle narrows what a team or an agent may call, and is assigned to a team or to one agent.
Categories are under Agents, in the More menu of the tabs, where each category card also assigns it to agents. A category is a named set of tools, such as support-kit with jira__search and notes__read. An agent assigned a category sees only those tools. Any other call is refused with tool <x> is not in category <c>.
Both only narrow. A category intersects with the server's policy and any bundle, so it never grants a tool the policy denies. The agent's drawer shows, in its Access view, the tools it can see, counted through every layer.
Run budgets#
A run budget limits what one agent run may consume: tool calls, calls that write or destroy, bytes sent and received, duration, and calls per tool. It can also cap an agent's calls per rolling window, across all its runs.
Budgets are set in a policy file or through the API. The agent's drawer lists the budgets that apply to it under Governance, Run budgets. Each budget has a mode:
| Mode | A call over the budget |
|---|---|
| warn | goes ahead, and a finding is recorded |
| hold | waits for an approval, like any held call |
| block | is refused with an error that names the budget |
Only calls that reach the tool count. A run is identified by the client's run id, else its MCP session, else the key. Budgets see only tool calls through bastn, not the agent's own tokens or compute.
Stop an agent#
An agent's status is its kill switch. Open Agents, select the agent, and use Kill switch in its drawer. Pause, Resume and Kill are also in the menu at the end of each agent's row.
| Action | Calls | Keys | Undo |
|---|---|---|---|
| Pause | refused | kept | Resume |
| Kill | refused | revoked, with OAuth grants and delegated credentials bound to the agent | Revive, with a reason; old keys stay revoked, so mint new ones |
| Retire | refused | revoked | none; history is kept |
The change reaches every part of bastn within a second or two. Pause, kill and retire also end what the agent left running:
- its approval requests still pending are rejected, shown as decided by
kill switch, and the waiting call gets the rejection; - its running durable calls are cancelled.
Resuming the agent does not bring them back; the agent makes the calls again. A call that was already sent to the tool runs to its end. Each step is recorded in the audit log.
A kill does not reach OAuth sign-ins that are not bound to an agent. Pause or revoke those under Agents, Connected apps, or use one of the stops below.
Stop other credentials#
Not every credential belongs to an agent. These stops reach the others. Each can be undone, is recorded in the audit log, and reaches every part of bastn within a second or two.
| Stop | Who | Where | What stops |
|---|---|---|---|
| Disable a key | an org admin | Agents, Keys, the key's menu | the key, and the credentials delegated from it |
| Pause an OAuth login | its user, or a team admin of its team | Agents, Connected apps, Pause | its tokens, which also cannot refresh, and the credentials delegated from it |
| Block an app | an org admin | Settings, Organization, Advanced, Blocked apps | every login of that app for the org's teams, and new sign-ins to it for those teams |
| Suspend a member | an org admin | Settings, Organization, Org members | in that org: the member's keys, the agent keys they minted, their OAuth logins and the credentials delegated from these, and their own access to the org's teams. Their pending approval requests are rejected. |
- Resume or Unblock undoes each one. Approval requests rejected by a suspension stay rejected.
- A suspension covers one org. The member's other orgs are not touched.
- You cannot suspend yourself, or the org's last active org admin.
- A paused login does not stop its user from signing in to the app again, which makes a new login. To stop that, suspend the member or block the app.
- A suspended member's running durable calls run to their end.
- Revoking a key or a login still ends it for good.
To block an app, enter its Client ID as shown under Agents, Connected apps. For many apps it is a URL.