BlogSecurity

Controlling MCP servers through the gateway

Put MCP servers behind the same gateway as your models, and close two defaults on the first day. In LiteLLM every authenticated caller can use every registered MCP tool until you define who may use what, and each server is visible to external clients unless you say otherwise. With lists per team and per tool, and one person who approves new servers, MCP becomes something IT security can approve. As of 27 November 2026.

By Updated

Why MCP belongs behind a gateway

An MCP server gives a model tools: read a ticket, query a database, open a pull request. Left to themselves, developers add servers to their own clients, each with its own token, and nobody can say which servers are in use or what they are allowed to do. The model also reads every tool description as trusted text, so a server you did not check can steer an agent.

A gateway turns that into one endpoint. Clients connect to the gateway, the gateway connects to the approved servers, and the same keys and teams that govern models govern tools. LiteLLM includes this MCP gateway in its open-source version.

What is open by default

LiteLLM's deployment guide for MCP is plain about the defaults. Three of them need a decision before the first server goes in.

  • Access. If no key, team or organisation carries a list of servers, every caller can reach every server.
  • Visibility. Each server is marked as available on the public internet unless you set that to false.
  • Capabilities. The gateway passes on prompts and resources as well as tools. If your servers only offer tools, switch the other two off.

How permissions combine

Permissions sit on several levels and the strictest one wins. Once you know the four rules in the table, the rest of the documentation reads easily.

How MCP permissions combine in LiteLLM, from the LiteLLM documentation on MCP permission management, checked on 27 November 2026
RuleWhat it means in practice
Key and team are intersectedIf both carry a list, the key reaches only servers that are on both
A key without a list inherits from its teamConvenient at the start, and the reason a new key can do more than you expected
Access groups add serversA group attached to a key reaches its servers even when the team does not list them
The organisation is a ceilingWhatever key and team allow is cut down to the organisation's list, if it has one

One setting changes the second rule. With require_key_mcp_access_defined set to true, a key without its own list gets no servers at all, and the team's list becomes a cap instead of a default. LiteLLM recommends switching it on once keys carry their own grants. We would plan for it from the start, because turning it on later cuts off every key that relied on inheritance.

Grants per tool

A server often offers more than a team should use. A GitHub server can list repositories and can also merge pull requests. Permissions go down to the single tool, and a client that lists tools only sees the ones it may call.

A key that reaches one MCP server and only two of its tools, as shown in the LiteLLM documentation
curl -X POST "$GATEWAY/key/generate" \
  -H "Authorization: Bearer $ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "object_permission": {
      "mcp_servers": ["github_mcp"],
      "mcp_tool_permissions": {
        "github_mcp": ["list_repositories", "search_code"]
      }
    }
  }'

Start every server read-only. Tools that write, send or delete are granted one by one, to the team that asked for them, after someone has looked at what the tool does with whose rights.

Who approves a new server

The technical controls only help if adding a server is a decision and not a habit. In May 2026 a flaw in LiteLLM's MCP test endpoints let any holder of a valid key start commands on the gateway host through a server configuration. It was fixed in 1.83.7 by requiring the admin role. The lesson reaches beyond that one bug: registering a server is an admin task.

  1. 1

    Name an owner

    Every server has a person who answers for it and hears first when it changes.

  2. 2

    Write down what it reaches

    Which system, which data, and whether the tool acts as the user or as a service account.

  3. 3

    Pin the version

    A server that updates itself can change its tool descriptions without anyone noticing.

  4. 4

    Tell the works council what the log shows

    A log of tool calls says who used which tool and when. That is the same question as with model logs, and it belongs in the same agreement.

One gateway or two

LiteLLM recommends one gateway for models and MCP. It also describes a split: a model gateway with no public port, and a separate MCP gateway for clients that connect from outside. The split keeps provider credentials behind the firewall if the MCP side is ever compromised. For internal use only, one gateway is enough. As soon as an external client such as a desktop assistant must reach your tools, we would split.

We build MCP servers and put them behind gateways, with the permissions tested before users connect.

Questions

Does LiteLLM have an MCP gateway?

Yes, in the open-source version. It offers one endpoint for all registered MCP servers and permissions by key, team and organisation. Some comparison pages still say otherwise, so check the date of what you read.

Can a team be limited to single tools of an MCP server?

Yes. Tool permissions are set per server on a key, a team or an organisation, and a client that lists tools only sees the permitted ones.

Should developers still add MCP servers to their own clients?

For company systems, no. Offer the approved servers through the gateway and make that the easier path. A ban without an approved alternative only moves the servers out of sight.

Talk to an engineer

Bring one piece of work you would like to improve. The call takes 30 minutes and needs no access to your systems or your data.

Booking runs on Google Calendar.

Mickey Graf

Mickey Graf

Founder and CEO of Cloudsail

Rated 4.9 out of 5 on Clutch

Prefer to write first? Leave your email and a few lines. Mickey reads every message himself and replies by email with times for a call.

The button prepares an email in your own email program, for you to send. Privacy policy (draft)