Skip to content

Data scoping

Policy answers whether a call may run; scope answers what it may see when it does. In Lunen, scope is decided by two mechanisms: whose credential the call runs on, and which server the organization pointed the agent at in the first place.

Updated 20 October 2026 · 5 min read

Credential scope: organization or user

Every MCP server connection is either organization-scoped — one credential shared by the whole workspace — or user-scoped, where each member connects their own account under Connected Services and tools authenticate as that member.

User scope is the default posture for most catalog servers, and it is the stronger boundary: an agent acting for a member can only reach what that member’s own account can reach. A Slack search tool run by two different members returns two different result sets, because the credential — not Lunen — is what the upstream service authorizes.

Organization scope fits genuinely shared credentials — service accounts, org-wide installs like a GitHub App, or public data sources. What a catalog server offers is fixed by its catalog entry; for a server you add yourself, it follows the authentication you chose — OAuth offers both, custom credentials are organization-only, and a server with no authentication needs no credential at all.

Where a server offers both, the two live in different places: the organization credential is set up in the server’s Authentication section in the MCP Registry, and the personal connection is made under Connected Services. A session picks a member’s own connection by default; in an agent’s Services list, the Org / User switch chooses which one a server uses. A session can use an existing organization credential, but never creates one.

Administrators can also narrow the OAuth scopes each connection asks for, per server, under Requested scopes in the registry panel.

Separate environments are separate servers

An organization has exactly one enablement per catalog server — there is no “sandbox flag” on a connection. When you need production and staging kept apart, add them as two servers of your own with distinct URLs and names. Two servers means two tool sets, two entries in the policy editor, and two credential sets — nothing is shared by accident, and each call’s audit event names the server it hit.

Note

Two narrower forms of multi-connection do exist: a GitHub server can hold several organization-level App installations side by side, and an AWS connection records the specific account and role each member selected — with an optional admin-set list of allowed roles.

What the agent inherits

An agent never holds a credential of its own. At each tool call, the runtime resolves the credential for that server at the appropriate scope — the connection of the member the agent runs for (a Task Agent’s owner), or the organization’s — and the call is authorized, logged, and attributed to the person it acted for. Remove the credential and the access is gone; there is no copy inside the agent to revoke separately.

Warning

Provider-native web search runs inside the model provider, not through an MCP server, so none of these mechanisms narrow it and it writes no audit event. See Models & secrets.