Security advisory — Malicious litellm versions 1.82.7 and 1.82.8 were removed from PyPI (potential API key exfiltration). Uninstall them, rotate exposed credentials, and upgrade to a safe release (e.g. 1.82.9+). Run pip show litellm to verify. PyPI · README

MCP server hosting architecture

Location: enterprise/apps/gateway/internal/mcphost/ — protocol, registry, backend, transport.

MCP server hosting architecture

Location: enterprise/apps/gateway/internal/mcphost/ — protocol, registry, backend, transport.

It shares the LLM process and middleware chain (auth → policy stage mcp_tool → quota → audit) with a separate handler branch. Off by default. See gateway/mcp-hosting-overview.md.

Diagram: /mcp/{server}/* enters Host, then splits into Registry, Backend, and Transport.

Components

PartJobCode
RouterMounts GET /mcp/registry and three transportsinternal/server/mcp_handlers.go
HostResolve server, EffectiveScopes, call backendmcphost/host.go
RegistryRead mcp_servers + mcp_tools; builtin demomcphost/registry.go
EntitlementA capability pack can revoke accessmcphost/entitlement.go
Backendecho / openapi; custom-go is a stubmcphost backends
TransportStreamable HTTP or SSE + messagesEndpoint map from Host

Data model

  • mcp_servers — metadata + backend_config (openapi_json / gzip openapi_blob)
  • mcp_tools — enabled tools + JSON Schema
  • gateway_audit_events.mcp_* — tool-call audit (nullable, Blake2b-compatible)

OpenAPI → MCP

Each allowlisted operationId becomes one MCP tool. Parameters + requestBody merge into inputSchema. oneOf / anyOf degrade to object + description.

Not shipped

  • custom-go backend
  • apps/edge-agent as an MCP host (that binary is still a skeleton)

Operations: runbooks/mcp-hosting.md.

Made-with: Damon Li