Skip to content

MCP scopes and permissions

6 min read · Updated 4 Nov 2026

Every tool declares its required scopes. OAuth-connected clients receive the scopes approved in their grant. A verified PAT receives all capabilities available to external MCP clients, including data:query, because PATs have no OAuth scope selection. Your Astrato permissions and the features enabled for your tenant still determine which resources and operations you can use. A PAT does not expose capabilities reserved for in-product Nash.

Every tool is also listed with MCP behaviour annotations. readOnlyHint is true for a tool that changes nothing. Otherwise destructiveHint says whether it can change, replace, remove, disable or revoke something that already exists, or only creates something new or a restorable version. Clients use them to decide when to ask you first; they grant nothing, and scopes, roles and permissions still decide what a call may do.

  • workspace:read — list the current user’s visible collections and workbooks.
  • workspace:write — edit or delete collections and workbooks, change workbook collection membership, update Starred, and create data connections.
  • sl:read — inspect semantic layers, business questions, datasets, stored filters and data actions.
  • sl:write — edit and publish semantic layers.
  • sl:version — create versions. Importing a Snowflake semantic view also needs sl:write.
  • data:query — prepare and execute queries against published semantic-layer data.
  • data:action — run a published data action, which writes to the data source, with astrato_semantic_layer_run_data_action. It is not a baseline scope: an OAuth client must request it, and it is available only where data actions are enabled. Until the next contract version, a grant holding data:query and sl:write instead is still accepted and the result carries a deprecation note; reconnect with data:action to stop it.
  • admin:read — read the users and licence teams in the caller’s own tenant.
  • admin:write — change a user’s role, sign-in status and licence team.
  • publication:read — list and inspect accessible app publications.
  • publication:write — create unpublished app publications and update their metadata; hosting changes additionally require publication:publish.
  • publication:publish — unpublish app content or change hosting through MCP; building and uploading replacement content uses the CLI.
  • publication:manage-access — inspect and change direct Data App grants through the Management access tools, and open a public Data App’s data with grantPublicDataAccess.
  • integrations:read — discover the workspace’s notification integrations.
  • messages:send — send a message through one; sending needs both this and integrations:read. See Recurring Nash tasks.

An OAuth client must ask for nine of these scopes by name: the two administration scopes, the four publication scopes, integrations:read, messages:send and data:action. None of the nine is a baseline grant. Verified PAT sessions receive them with the other grantable external capabilities. Whichever authentication method is used, the administration tools refuse a caller who is not the workspace owner or an administrator of their own tenant — the scope says what the client may attempt, the role says whether the person behind it may.

See Manage Data App publications for publication management and the CLI publishing workflow. These tools are preview capabilities and are omitted from discovery when app publishing is disabled.

tools/list shows every tool registered by the environment regardless of the client’s scopes. Calling a tool without a required scope is refused with an insufficient_scope challenge, as below.

The baseline scopes are workspace:read, workspace:write, sl:read, sl:write, sl:version and data:query. An OAuth grant keeps the scopes it was approved with, so a connection authorized before a scope joined the baseline, or by a client configured with a shorter scope list, can lack some of them. astrato_get_context then lists them in auth.missingBaselineScopes, the tools that need them in auth.toolsRequiringMissingScopes, and the remedy in auth.remedy. Reconnect (re-authorize) the connector to obtain them; if your client configuration lists scopes, add the missing ones first. The report grants nothing, and those tools keep returning insufficient_scope until you reconnect.

Request a scope your connection does not have

Section titled “Request a scope your connection does not have”

Fifteen scopes are grantable. The six baseline scopes above are what a newly connected client receives without asking. The other nine — the four publication and two administration scopes, plus integrations:read, messages:send and data:action — are step-up: an OAuth grant receives one only when the client asked for it by name.

A verified PAT session is different: it receives all fifteen at authentication, so it is never challenged. A cookie session, or a bearer token Astrato does not recognise as a PAT, gets the six baseline scopes and nothing more. An OAuth authorization carrying an empty scope list wins over the PAT default, and is challenged too.

Calling a tool whose scopes the session does not hold gives HTTP 403 with a WWW-Authenticate challenge:

WWW-Authenticate: Bearer error="insufficient_scope",
scope="sl:write sl:version",
resource_metadata="https://app.astrato.io/.well-known/oauth-protected-resource/mcp",
error_description="The MCP tool requires the following scope(s): sl:write sl:version"

The header is one line, wrapped here to fit, and its parameters are separated by a comma and a space in the order shown. resource_metadata appears only when the session’s OAuth authorization carried a resource indicator.

scope= lists everything the tool needs, not what you are missing. A client holding sl:write and calling astrato_semantic_layer_import_snowflake_view is still challenged with scope="sl:write sl:version", so the value is a target to request rather than a diff to apply.

The challenge is not a tool refusal, and a client that only parses tool refusals will miss it. The 403 body is a plain object with two keys:

{
"error": "insufficient_scope",
"error_description": "The MCP tool requires the following scope(s): sl:write sl:version"
}

It is not a JSON-RPC response. There is no jsonrpc, no id, no ok, no code and no status, and error here carries a code rather than the sentence a tool refusal puts there — so a client branching on code sees a transport failure instead of an authorization problem.

Re-authorize on 403, not only on 401. 401 means not authenticated, and carries at most a bare WWW-Authenticate: Bearer; 403 means authenticated but under-scoped. A client that re-authorizes on 401 alone never reacts to a scope challenge.

No challenge does not prove your scopes are sufficient. The feature gates are checked first, and none of them sets WWW-Authenticate even when the scopes were missing too. A tool a feature flag disables is never registered: it is absent from tools/list and a call to it fails as an unknown tool. A gate inside a registered tool — the access settings of astrato_dashboard_freeform_update, the exit-node argument of a connection tool — instead drops that argument from the advertised input schema, and a client that sends it from a schema discovered before the gate changed is answered with HTTP 200 and an ordinary isError result.

Nothing runs before a scope refusal: no warehouse query, no draft read, no write. And tools/list still advertises the tool, with its input schema, so discovery is not a guide to what this connection may call.

Add it to the client’s configured scope list, then re-authorize the connector. That is the only supported route; nothing grants a scope at call time. integrations:read and messages:send need more than the grant: the workspace’s own integration access must carry them as well, as Recurring Nash tasks describes.

The scope lists in the client examples are the six baseline scopes. Codex’s scopes array and Cortex Code’s oauth.scope string are the only two examples that carry one, and a reader who copies either and then needs a publication or administration tool must add the scope and connect again. A client whose MCP configuration has no scope list never requests a step-up scope, so reconnecting it will not obtain one and the publication and administration tools keep returning insufficient_scope. The routes that do work are a client that supports a configured scope list, or a Personal Access Token session, which receives all fifteen scopes — with the administration tools still refusing a caller who is not the workspace owner or an administrator.