fix(mcp): default available_on_public_internet to true#22331
fix(mcp): default available_on_public_internet to true#22331ishaan-jaff merged 4 commits intomainfrom
Conversation
MCPs were defaulting to private (available_on_public_internet=false) which was a breaking change. This reverts the default to public (true) across: - Pydantic models (AddMCPServerRequest, UpdateMCPServerRequest, LiteLLM_MCPServerTable) - Prisma schema @default - mcp_server_manager.py YAML config + DB loading fallbacks - UI form initialValue and setFieldValue defaults
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR changes the default value of
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| litellm/proxy/_types.py | Changed default of available_on_public_internet from False to True in NewMCPServerRequest, UpdateMCPServerRequest, and LiteLLM_MCPServerTable — aligns all Pydantic models with the new default-public behavior. |
| litellm/types/mcp_server/mcp_server_manager.py | Changed MCPServer model default for available_on_public_internet from False to True, consistent with the other type definitions. |
| litellm/proxy/_experimental/mcp_server/mcp_server_manager.py | Updated fallback defaults for available_on_public_internet in YAML config loading and DB loading paths from False to True. |
| litellm/proxy/schema.prisma | Changed Prisma @default(false) to @default(true) for available_on_public_internet column in LiteLLM_MCPServerTable. |
| schema.prisma | Root schema copy updated to @default(true) for available_on_public_internet, now in sync with the other copies. |
| litellm-proxy-extras/litellm_proxy_extras/schema.prisma | Proxy-extras schema copy updated to @default(true) for available_on_public_internet, now in sync with the other copies. |
| ui/litellm-dashboard/src/components/mcp_tools/MCPPermissionManagement.tsx | Updated UI defaults to true for available_on_public_internet and added forceRender to Collapse.Panel so toggle defaults render correctly even before panel expansion. |
| litellm/model_prices_and_context_window_backup.json | Added new model entries (gpt-audio-1.5, gpt-realtime-1.5, openrouter/anthropic/claude-opus-4.6, openrouter/openrouter/auto |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[MCP Server Created] --> B{Source?}
B -->|UI Form| C[MCPPermissionManagement.tsx\ninitialValue: true]
B -->|API Request| D[NewMCPServerRequest\ndefault: True]
B -->|YAML Config| E[mcp_server_manager.py\nfallback: True]
B -->|DB Row| F[schema.prisma\ndefault true]
C --> G[MCPServer Model\navailable_on_public_internet: True]
D --> G
E --> G
F --> G
G --> H{External Client IP?}
H -->|Internal IP| I[Access Allowed]
H -->|Public IP| J{available_on_public_internet?}
J -->|true - default| K[Access Allowed]
J -->|false - explicit| L[Access Blocked]
Last reviewed commit: afe86bd
Additional Comments (1)
The |
…correctly Ant Design's Collapse.Panel lazy-renders children by default. Without forceRender, the Form.Item for 'Available on Public Internet' isn't mounted when the useEffect fires form.setFieldValue, causing the Switch to visually show OFF even though the intended default is true. Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
|
|
…o true Missed in previous commit per Greptile review: - schema.prisma (root) - litellm-proxy-extras/litellm_proxy_extras/schema.prisma - litellm/types/mcp_server/mcp_server_manager.py MCPServer class
Migration script for existing deploymentsIf you upgraded to a version where -- Set all MCP servers to public that were created after the breaking change
-- (i.e. they have available_on_public_internet=false but were not intentionally set that way)
-- Safe to run — only flips servers that are currently false back to true.
-- If you have servers you INTENTIONALLY set to private, exclude them by server_id first.
UPDATE "LiteLLM_MCPServerTable"
SET available_on_public_internet = true
WHERE available_on_public_internet = false;Or via Python/Prisma if you prefer: import asyncio
from litellm.proxy.db.prisma_client import prisma_client
async def migrate():
await prisma_client.connect()
updated = await prisma_client.db.litellm_mcpservertable.update_many(
where={"available_on_public_internet": False},
data={"available_on_public_internet": True},
)
print(f"Updated {updated.count} MCP servers to public")
await prisma_client.disconnect()
asyncio.run(migrate())Run this once after upgrading to this fix. Servers you explicitly want private can be flipped back via the UI or API afterward. |
Fixes breaking change where new MCP servers were private by default, causing k8s/cross-cluster deployments to have their servers silently stripped by IP filtering. Changes all defaults to true across: - litellm/proxy/_types.py (3 Pydantic models) - litellm/types/mcp_server/mcp_server_manager.py (MCPServer class) - litellm/proxy/schema.prisma + schema.prisma + litellm-proxy-extras schema - mcp_server_manager.py YAML + DB loading fallbacks - UI MCPPermissionManagement.tsx form defaults See migration script in #22331 for existing deployments that need to flip existing servers back to public.
|
@greptileai review |
Replace scary 'Available on Public Internet' toggle with 'Internal network only' opt-in restriction. Toggle OFF (default) = all networks allowed. Toggle ON = restricted to internal network only. Auth is always required either way. - MCPPermissionManagement: new label/tooltip/description, invert display via getValueProps/getValueFromEvent so underlying available_on_public_internet value is unchanged - mcp_server_view: 'Public' → 'All networks', 'Internal' → 'Internal only' (orange) - mcp_server_columns: same badge updates
Relevant issues
Default Toggle
Pre-Submission checklist
tests/litellm/directory, Adding at least 1 test is a hard requirement - see detailsmake test-unit@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewCI (LiteLLM team)
Branch creation CI run
Link:
CI run for the last commit
Link:
Merge / cherry-pick CI run
Links:
Type
🐛 Bug Fix
Changes
available_on_public_internetwas defaulting tofalse, making all new MCP servers private by default. This was a breaking change — servers created via the UI or YAML config would silently be invisible to external callers.Changed the default to
truein:_types.py—AddMCPServerRequest,UpdateMCPServerRequest,LiteLLM_MCPServerTableschema.prisma—@default(false)→@default(true)for new DB rowsmcp_server_manager.py— YAML config fallback and DB loading fallbackMCPPermissionManagement.tsx— forminitialValueandsetFieldValuedefaults