LiteLLM MCP gateway

Running LiteLLM as a central gateway for Model Context Protocol servers and A2A agents: registration, authentication to upstream servers, permissions, guardrails and cost tracking.

Setting up the LiteLLM MCP gateway

Registering MCP servers in LiteLLM over Streamable HTTP, SSE or stdio, the fixed gateway endpoint clients connect to, tool name prefixing across servers, the REST endpoints for calling tools without an LLM, and protocol version negotiation.

Guardrails on MCP tool calls in LiteLLM

Checking MCP tool inputs before calls and tool results before the model sees them: pre_mcp_call, during_mcp_call and post_mcp_call modes for masking PII and blocking injected instructions coming back from tools.

Zero-trust MCP servers with LiteLLM signed JWTs

Making MCP servers reject calls that bypass the gateway: LiteLLM's MCPJWTSigner adds a short-lived RS256 JWT to each tool call and the MCP server verifies it against LiteLLM's JWKS endpoint.

LiteLLM MCP toolsets and tool search

Limiting what agents see when hundreds of tools are registered: named toolsets drawn from several MCP servers, and tool search that exposes four meta-tools so the model finds and calls tools by keyword.

Tracking MCP tool costs in LiteLLM

Charging MCP tool calls to teams and keys: default cost per query per server, per-tool costs, custom post-call hooks for dynamic pricing, and seeing tool spend next to model spend.

Public and internal-only MCP servers in LiteLLM

Exposing some MCP servers to external clients such as ChatGPT and Claude Desktop while keeping sensitive ones visible only from internal networks, using per-server public flags and internal IP ranges.

LiteLLM as an A2A agent gateway

Registering A2A agents, Vertex AI Agent Engine, LangGraph, Azure AI Foundry and Bedrock AgentCore agents in LiteLLM, controlling which teams and keys can invoke them, and logging and budgeting agent calls.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.