How LiteLLM MCP access control by key, team and organization works
LiteLLM restricts MCP servers by key, team or organization, and it filters the tools a client can list by those same permissions. Teams that share one LiteLLM gateway usually need different MCP servers and tools: a finance team may need a reporting server that engineering should never see, while a documentation search server may be useful to everyone. Without these controls, every caller who reaches the gateway can discover every registered server and its tools, which makes the tool list itself a data exposure. The behavior described here follows the LiteLLM MCP permission management docs, and you should confirm each setting against the version you deploy.
Start by writing down, for each MCP server, which keys, teams and organizations should discover it and which should be able to call its tools. LiteLLM can also mark specific servers as available to every API key, which suits low-risk, read-only or internal reference servers. Review that list before you use the public flag, because a server marked this way is visible to every key issued by the gateway. Confirm how your version handles a tool that is allowed at the server level but blocked for a particular key, and test both directions with a non-admin key before you rely on the filter.
Access control at the gateway does not replace the other controls around an MCP server. The gateway does not manage the upstream credentials that a server uses to reach its own systems, so a shared service account behind a server can still expose data to every permitted caller. Guardrails that screen tool inputs and outputs, network restrictions that keep sensitive servers off public paths, and the controls inside the MCP server itself must be designed separately. Your security team should record which control owns each risk, so a permission change at the gateway is not mistaken for proof that the data behind the server is protected.
Which permission scopes LiteLLM applies to MCP servers
LiteLLM restricts MCP servers at three levels: the key, the team and the organization. Each caller's identity resolves to a set of these scopes, and the tools a caller can list are filtered by what those scopes allow, so the scope model needs to be settled before the first server is registered.
Key scope
A grant to a single virtual key applies only to calls made with that key. Use it for service accounts, CI jobs and individual automation where one identity needs one server. Before registration, list every key that will call each server and confirm that no key depends on access it was never meant to hold. Confirm in your version how key-level grants are stored and listed in the admin interface.
MCP permission docsTeam scope
A grant to a team applies to every key that belongs to that team. This is usually the most practical level for shared engineering or support groups, because access follows team membership rather than individual keys. The risk is over-broad membership: a key added to the wrong team inherits every server granted to it. Review team membership on the same schedule as access reviews for the servers themselves.
Organization scope
A grant to an organization covers every team and key inside it. Reserve it for servers that every part of the organization may use, such as an internal documentation search. Because it reaches the widest population, it is the scope most likely to expose a sensitive tool by accident. Map which business units share an organization in LiteLLM before granting anything at this level.
Identity resolution to scopes
A caller's key, team membership and organization membership together determine which MCP servers and tools are visible and callable. Test the resolution with one key from each group before rollout, and check that a key which is not in any granted team cannot discover the server at all. Confirm how your version handles a key that belongs to more than one team.
Public servers for every key
Marking a server as available to every API key removes the per-key check for that server. Limit this to low-risk servers whose tools read public or non-sensitive data, and record the owner and justification for each one. A public flag on a server with write access or access to customer data is the most common way a gateway ends up wider than intended.
Design scopes before registration
Write the scope map on paper before registering any server. For each server, record which keys, teams and organizations need it, which tools they need, and who approves changes. Confirm how overlapping grants combine in your version, for example whether a key-level denial can be overridden by a team-level grant. Those answers determine whether the map is safe to apply.
How a tool-list request is filtered before a model sees tools
The request starts at the client, which sends its LiteLLM key to the gateway. The gateway resolves that key to its team and organization, then checks each registered MCP server against those permissions and against any server marked public to every key. Only the permitted tools are returned in the list, and a call to any tool outside that set is rejected at the gateway. Upstream MCP servers sit behind the gateway as separate trust boundaries, so teams should confirm which servers each key can reach and that the filter applies to both listing and calling.
Keys resolve to teams and organizations, which filter the tools a client can see and call.
Choosing a grant pattern for each kind of MCP server
Low-risk shared utilities, such as a time or unit-conversion server or a read-only documentation lookup, are the good candidates for a public grant. A public grant makes the server available to every API key on the gateway, so no one has to maintain a list of grants for it. The cost of that convenience is that every key, including keys issued to experimental projects, can see and call the server's tools. Before you mark a server public, confirm that its tools have no write access, hold no secrets with reach beyond the server itself, and return nothing sensitive.
- Read-only tools: Confirm that every tool is read-only and cannot change upstream data.
- No stored credentials: Check that the server does not hold upstream tokens that a caller could reuse.
- Output review: Review what the tools return, since a public server's output reaches every caller's model context.
- Owner sign-off: Name an owner who will re-review the grant when the server gains a new tool.
- Easy reversal: Note which keys depend on public access so you can plan a change before removing the grant.
Before you publish, ask the vendor or your own platform team to list every tool the server exposes, not only the ones in its documentation.
Most internal MCP servers belong to one team, such as a ticketing team's server or a data team's catalog server. For these, grant access to the specific teams that own or need the server, and let membership in those teams decide who can discover and call its tools. This keeps administration proportional: when someone joins or leaves a team, their access changes with the team roster rather than with a long list of individual grants. The blast radius is limited to one team's scope, so a mistake affects that group rather than the whole organization.
- Team as the unit: Grant by team so that roster changes carry access changes with them.
- Shared-owner servers: Where two teams use one server, grant both teams and document who approves changes.
- Tool filtering: Use permission-filtered tool lists so members see only the tools their role needs.
- Membership hygiene: Schedule reviews of team membership, since stale members keep access.
- Team-scoped limits: Pair team grants with budgets or rate limits so one team's heavy use does not affect others.
Ask your platform team how team membership is synchronized from your identity provider, since manual team edits drift over time.
Servers that reach production data, financial records, personal data or privileged administrative actions should be granted to named keys or service accounts only. A per-key grant means that each approved caller is an explicit decision, so the blast radius of a leaked key is limited to the tools that key was approved for. The administration effort is higher because each grant is tracked individually, and that effort is the price of tighter control. Keep the list short and tie each key to an owner and a documented purpose.
- Named callers: Grant to specific keys or service accounts, each with a recorded owner.
- Least-privilege tools: Filter tool lists so a caller sees only the tools its purpose requires.
- Service account separation: Use separate service accounts for automation so that people's keys are not shared with jobs.
- Rotation plan: Define how keys are rotated and revoked when a caller's purpose ends.
- Audit linkage: Make sure grant changes and tool calls appear in your audit logs so reviewers can trace them.
Confirm with your security team which grant changes require approval and how quickly a revoked key stops working on every gateway replica.
The core trade-off is between broad grants and per-key grants. Broad grants, such as a public flag or a grant to a large team, cost little to administer and fail quietly: one overly broad decision reaches many callers at once. Per-key grants cost more to maintain, but each decision is narrow, so a compromised or misused key exposes only what it was approved to reach. Most organizations find that a mix works best, with broad grants reserved for low-risk servers and narrow grants for anything that touches sensitive data.
- Administration effort: Broad grants need few changes, while per-key grants grow with the number of callers.
- Blast radius: A public or large-team grant widens the impact of any single misuse.
- Drift risk: Per-key lists drift when people change roles, so schedule reviews against your identity records.
- Change speed: Team-based grants inherit identity changes automatically, while key grants need explicit updates.
- Mixed model: Apply broad grants only where the server's risk review allows it.
Ask the vendor or your own team to test a revoked key against a live gateway so you know how fast the change takes effect in your environment.
Configuration options and when each fits
This table compares the five ways LiteLLM can scope MCP server and tool access, from a single key up to every key on the gateway. Read each row against the caller population you need to serve, then confirm the exact setting names and behavior in your LiteLLM version before you write the policy.
| Option | What it restricts | When it fits | What to confirm in your version |
|---|---|---|---|
| Key-level grant | Lets one virtual key discover and call a specific MCP server | Service accounts, CI jobs or a single tool integration that needs a narrow set of servers | Where the grant is set, and whether it applies to the key's discovery as well as its calls |
| Team-level grant | Lets every key belonging to a team reach a chosen MCP server | Groups such as a support or data team where membership changes less often than individual keys | How keys inherit team grants and what happens when a key moves between teams |
| Organization-level grant | Lets all teams and keys in an organization reach a server | Shared internal servers that a whole business unit uses under one policy | Whether organization grants override or combine with team and key grants in your release |
| Public-to-all-keys flag | Makes a server visible and callable by every API key on the gateway | Low-risk, read-only or non-sensitive servers where a per-key grant would add upkeep without reducing risk | Which servers you have marked public, and whether any public server exposes write actions or internal data |
| Tool-level filtering | Limits which tools inside an allowed server appear in a client's tool list and can be called | Servers that mix read and write tools, or where a team should see only part of a large tool catalog | Whether filtering hides tools from listing as well as blocking calls, and how it interacts with tool name prefixes |
Setting up MCP permissions in LiteLLM step by step
This sequence takes a self-hosted LiteLLM gateway from a confirmed version and database baseline to a state where each key sees only the MCP servers and tools its team is entitled to. Each step ends with a check you can run before moving on.
Confirm version and PostgreSQL backing
Check the LiteLLM version your gateway runs against the releases page and confirm it is on a release line the project still supports. Confirm the proxy stores keys, teams and permissions in PostgreSQL, since virtual keys depend on it, and that the admin UI or API responds for an administrator account. The step is done when you can record the version, the database connection and a successful admin login. Confirm the exact MCP permission fields for your version in the MCP permission management docs before you rely on them.
Register the MCP servers
An administrator registers each MCP server in the gateway with its name, transport and upstream address, using the registration method your version supports. Keep a written list of server names, owners and sensitivity, because the permission decisions in later steps depend on it. The step is done when every server appears in the admin view and a test client sees the expected tool list when using an unrestricted administrator key. Confirm the registration fields against the docs for your release.
Define teams and organizations
Create the organizations and teams that will own access, mapping them to your existing identity groups so that membership is not maintained by hand in two places. Decide which teams are separate organizations and which are sub-teams, since permissions can be set at key, team or organization level. The step is done when each team and organization exists with a named owner and its membership matches your directory. Record the mapping in a change log so auditors can trace who decided what.
Assign keys to teams
Issue virtual keys for each service account and user, attaching each key to the team it belongs to and avoiding keys that are not tied to any team. Mark any key that is used by a shared tool or CI job as a service key with a named owner. The step is done when a listing of keys shows every key with exactly one team and an owner, and no unassigned keys remain. Check the key-to-team binding behavior in the virtual keys docs for your version.
Set grants and public flags
For each MCP server, grant access to the specific keys, teams or organizations that need it, and decide whether a low-risk server should be marked public so every key can see it. Limit tool exposure where the server carries sensitive actions, and document the reason for each public flag. The step is done when the grant table matches your written decisions and each public flag has a recorded owner and justification. Confirm how tool-level filtering is configured in the MCP permission docs before publishing the policy.
Verify tool lists by test key
Create or reuse one test key per team, plus one key with no grants, and connect each to the gateway's MCP endpoint to list tools. Compare the results with your grant table: each key should see the servers and tools it was granted, public servers should appear for every key, and nothing else should appear. The step is done when the lists differ as designed and you have saved the outputs as evidence. If a list is wider than intended, correct the grant before continuing.
Confirm blocked calls fail
Using the same test keys, attempt to call a tool on a server the key is not granted, and attempt a call to a restricted tool on an allowed server. Each attempt should fail with an authorization or not-found response, and the gateway log should record the denial with the key and server. The step is done when every blocked call is refused and logged and every permitted call succeeds. Keep the test script in version control so you can rerun it after each upgrade or policy change.
Security risks in MCP permission design
Most MCP access problems come from permission settings that were reasonable on day one and drifted later. The cards below cover the design mistakes we see most often when teams put LiteLLM in front of several MCP servers, and the checks that catch them before a tool reaches the wrong caller.
Over-broad public flags
Marking a server as available to every key is a convenience setting, and it is easy to apply to a server that exposes customer records, ticket history or write-capable tools. Treat the public flag as a classification decision. Before setting it, list every tool the server exposes, including tools added in later upgrades, and confirm that each one is safe for any key holder in your organization.
MCP permission docsStale team membership
Team-based grants keep working after people change roles or leave, unless someone removes them. A contractor who moved teams may still reach a server that holds finance or HR data. Review team membership on a schedule that matches your access review cycle, and confirm who in your organization is allowed to change team membership in LiteLLM.
Keys shared across people
A virtual key that several people or scripts share carries one identity for every call. Permissions, spend and logs can no longer be tied to a person, and revoking access for one person means rotating the key for everyone. Issue keys per user or per service, and ask who holds each key before granting it access to a sensitive server.
Tool name collisions across servers
Two registered servers can expose tools with the same name, and a client may call the one it did not intend. Check how the gateway prefixes tool names for each server before you write permission rules, and test each rule with a key that should be denied, not only with a key that should be allowed.
Filtering is not upstream data control
Hiding a tool from a key's list stops the call at the gateway, but it does not limit what the upstream server can read or write once it is reached through another path, such as a direct connection or a second gateway. Pair gateway permissions with credentials scoped to least privilege on the upstream system itself, and confirm that the MCP server cannot be reached without the gateway.
Admin access and audit trails
Permission rules are only as trustworthy as the people who can edit them and the record of who changed them. Restricting admin access and keeping audit logs of permission changes are Enterprise features in LiteLLM, so confirm with the enterprise documentation whether your edition covers them before you rely on them for a compliance review.
Enterprise docsQuestions buyers ask about MCP access control in LiteLLM
What does MCP access control in LiteLLM cost, and what drives the effort?
The cost is the labor to design and configure the permission model, because LiteLLM's licensing and product settings do not change with the number of servers you govern. Effort rises with the number of MCP servers, the number of teams and organizations that need different access, how many tools each server exposes, and whether you need to test that filtered tool lists match your policy. Ask any partner for a quote that separates the design workshop, the configuration work, the testing and the handover, and states which parts are one-time and which recur when you add a server or team. Any cost you see should follow from a written scope, not from a rate card.
How long does a first MCP permission design take to implement?
It depends on the number of MCP servers, how many teams and organizations need different access, and how clearly your owners have defined which tools are sensitive. A small set of servers with a simple team structure takes far less time than a shared gateway serving many business units with overlapping ownership. The fastest path is to inventory servers and tools, agree on a classification for each, and only then write keys, team and organization rules. Ask for a timeline that lists the decisions that must be made before configuration starts, since those decisions usually set the schedule.
What must our team provide before access control work starts?
You need to provide an inventory of registered MCP servers, the owner of each server, and the tools each one exposes. You also need your team and organization structure, the list of keys or service accounts that call the gateway, and a decision on which servers may be public to every key. Your security or risk team should approve the classification of sensitive tools, and someone must be able to test as a user from each team. Confirm access to a non-production LiteLLM instance and to the identity provider you use for admin sign-in before the work begins.
Can a small internal team set up MCP access control alone?
A small team with LiteLLM experience can often configure the basic model of keys, teams and server restrictions, provided it has clear decisions from owners and a test plan. The harder parts are classifying tools by risk, handling exceptions for teams that need broader access, and proving that filtered tool lists match policy for each identity. Teams without a second reviewer tend to miss gaps in public server flags. Decide early whether you will staff the design and testing internally, bring in an outside reviewer, or hire a partner for the full scope.
Do we need LiteLLM Enterprise for organization RBAC and audit logs?
Yes, according to the LiteLLM Enterprise documentation, organization and team RBAC and audit logs are listed as Enterprise features. The same documentation lists SSO and SCIM beyond the free user limit, JWT authentication with identity provider tokens, and team-level guardrails and logging. Restricting MCP servers by key, team or organization is documented in the MCP permission management guide, but confirm with LiteLLM which of those controls your version and license include before you design around them. Your decision should be based on the license terms that apply to your deployment.
How do we validate that MCP access control works as intended?
Validate it with a test matrix that covers each key, team and organization against each MCP server and tool, recording what each identity can list and call. Check that tool lists are filtered for restricted identities, that servers marked public are visible to every key, and that calls from unauthorized keys are rejected with a clear error. Repeat the tests after each configuration change and after you add a server or team. Keep the test results and configuration as evidence for your security review, and ask any partner to deliver the matrix, the results and a retest after fixes.
What happens when a new MCP server or team is added later?
Each new server needs an owner, a risk classification, and an explicit decision on whether it is public or restricted to particular teams. Each new team needs its keys, budgets and server permissions defined, and the permission matrix must be re-tested for the affected identities. Without a written change process, unrestricted defaults can expose tools unintentionally. Ask for a runbook that describes the steps, who approves them, and how the test matrix is updated.
Limits to confirm in your environment
The topic facts confirm that LiteLLM can restrict MCP servers by key, team or organization, filter tool lists by permission, and mark servers public to every key. The details that decide whether a design holds up depend on your LiteLLM version and deployment, so confirm each item below in a test environment before you write the policy.
Tool-level grants by version
Confirm whether your LiteLLM release can grant access to individual tools, or only to whole MCP servers. A server-level grant may expose write-capable tools to a key that should only read. Check the permission management documentation for your version, then test a key that should see one tool and not its siblings. If tool-level grants are missing, decide whether to split the server or restrict the consuming client.
MCP permission docsPublic flags and network rules
A server marked public to every key may still sit behind internal-network restrictions, or the two settings may interact in ways the documentation does not spell out. Test calls from an external network and from an internal one with the same key. Record which result wins, because a mistake here can expose a sensitive server to callers who were never meant to reach it.
Keys that belong to several teams
Confirm how LiteLLM combines permissions when one key is a member of more than one team. The effective result could be the union of grants, the most restrictive set, or the grants of a primary team. Build a key with overlapping team memberships and check the visible tool list and callable servers. Document the rule your security team accepts before onboarding teams.
Propagation after permission changes
Measure how long a revoked grant keeps working after you change it, including any cached tool lists or router state in a multi-instance deployment. A revoked key that still lists or calls a server for a period is a finding in an access review. Run a timed test after a removal and agree the acceptable window with the team that owns the server.
Admin UI and API parity
Confirm that every control set in the admin UI can also be set through the API, and the reverse. If the two surfaces differ, configuration managed as code may drift from what administrators see on screen. Compare a sample configuration made in each surface, and decide which one is the source of truth for audits.
How DeployOpen scopes and delivers MCP access control
DeployOpen plans and implements LiteLLM MCP access control inside your own infrastructure, starting from a written map of which keys, teams and organizations may discover and call each MCP server and tool. We build the permissions, test that filtered tool lists and denied calls behave as the map says, and document the result so your security and platform teams can review it.
How we scope
- Inventory every MCP server registered in your gateway and the teams that depend on each one
- Agree which servers are marked public to every key and which stay restricted to named teams or organizations
- Record the access matrix for each server and tool in the written scope before any configuration changes
- Confirm which LiteLLM edition your organization runs, since organization and team RBAC depend on it
How we build
- Configure server-level restrictions by key, team and organization in a controlled, version-tracked change set
- Set tool filtering so each client sees only the tools its permissions allow in listings
- Test allowed and denied calls for each role, including keys that belong to more than one team
- Verify that low-risk servers marked public stay reachable from every key without exposing restricted tools
How we hand over
- Deliver the access matrix, configuration records and test results as documentation your reviewers can read
- Walk your platform and security teams through how to add a server, change a permission and retest it
- Provide a runbook for revoking a team's access and confirming the change took effect
- Agree on who owns access decisions after handover and how requests for changes are logged
How we support
- Fixed-scope engagements have deliverables and timelines agreed in writing before work starts
- Ongoing support, upgrades and continuous testing are available as a retainer
- Quotes follow from the written scope, so ask for the scope items that drive effort, such as server count and number of teams
- Ask your gateway contacts to confirm how permission changes behave in the release line you run

