Skip to content

chore(release): backport #44066 to rc/1.105.0 - #44215

Merged
yuneng-berri merged 2 commits into
rc/1.105.0from
litellm_chore_c4d0fc
Oct 2, 2026
Merged

yuneng-berri merged 2 commits into
rc/1.105.0from
litellm_chore_c4d0fc

Conversation

@yuneng-berri

@yuneng-berri yuneng-berri commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Backport of #44066 to rc/1.105.0: git cherry-pick -x 2b85808011 (the merged main commit), applied cleanly and patch-identical to the source. No version bump, since 1.105.0 has not been released (only v1.105.0-dev.1 and -dev.2 tags exist)

Problem this solves:

How it solves it:

Intentional product change: proxies that already run stdio MCP servers stop starting them after upgrading to 1.105.0 until the admin sets LITELLM_ENABLE_MCP_STDIO=true and restarts. Same behavior #44066 ships on main

What is included

The rc's committed UI bundle was last rebuilt on 2026-09-19, so the artifacts commit also picks up every dashboard source change already on the rc since then (582 files under litellm/proxy/_experimental/out/, nothing else). That bundle refresh would happen at release time anyway

The .circleci/scripts/run_integration.sh line from #44066 is kept, since the integration suite's stdio cases need the flag on

Known noise on this line

tests/unit/proxy/proxy_server/test_proxy_config.py::test_ProxyStartupEvent_jwt_auth_resolves_agent_claims_against_live_registry[db] and test_ProxyConfig__init_agents_in_db_keeps_config_defined_agents fail on the rc tip before the pick, in isolation too, and fail the same way after it

All 30 tests in tests/mcp_tests/test_proxy_mcp_e2e.py error at setup on the rc tip and on main, because the fixture server imports mcp.server.fastmcp, which mcp 2.x removed. #44066 only adds one setenv line to that file

Screenshots / Proof of Fix

Setup: three local proxies on the same config, each launched under env -i with no database. Before runs the rc tip (fe9b6fd); After runs this branch (bde22d8) once with LITELLM_ENABLE_MCP_STDIO unset and once with it set to true. echo_stdio is a stdio server in config.yaml (a one-tool MCP server that echoes its input) with id ebabfe6d53267166b95d507599c04f10. No LLM provider is involved, since the change is in MCP server handling

general_settings:
  master_key: sk-bp-1234
mcp_servers:
  echo_stdio:
    transport: stdio
    command: <venv>/bin/python
    args: ["echo_server.py"]

Before (fe9b6fd)

stdio server works

  1. curl -s 'localhost:4181/mcp-rest/tools/list?server_id=ebabfe6d53267166b95d507599c04f10' -H "Authorization: Bearer sk-bp-1234" | jq -c '[.tools[].name]'
    ["echo"]
    
  2. curl -s -w ' HTTP %{http_code}' localhost:4181/mcp-rest/tools/call -H "Authorization: Bearer sk-bp-1234" -H 'Content-Type: application/json' -d '{"server_id":"ebabfe6d53267166b95d507599c04f10","name":"echo_stdio-echo","arguments":{"text":"hi"}}'
    {"_meta":null,"content":[{"type":"text","text":"echo: hi","annotations":null,"_meta":null}],"structuredContent":{"result":"echo: hi"},"isError":false,"resultType":"complete"} HTTP 200
    

UI config

  1. curl -s localhost:4181/.well-known/litellm-ui-config | jq -c '{mcp_stdio_enabled}'
    {"mcp_stdio_enabled":null}
    

After (bde22d8)

stdio server works

Flag off (env var unset):

  1. Proxy boot log
    LiteLLM:WARNING: stdio_gate.py:28 - MCP server 'echo_stdio' will not start: stdio MCP servers are disabled on this proxy. Set LITELLM_ENABLE_MCP_STDIO=true on the proxy and restart to enable them
    
  2. Same tools/list call
    []
    
  3. Same tools/call
    {"detail":"stdio MCP servers are disabled on this proxy. Set LITELLM_ENABLE_MCP_STDIO=true on the proxy and restart to enable them"} HTTP 403
    
  4. curl -s -w ' HTTP %{http_code}' localhost:4182/v1/mcp/server -H "Authorization: Bearer sk-bp-1234" -H 'Content-Type: application/json' -d '{"server_name":"new_stdio","transport":"stdio","command":"python","args":["echo_server.py"]}'
    {"detail":[{"type":"value_error","loc":["body"],"msg":"Value error, stdio MCP servers are disabled on this proxy. Set LITELLM_ENABLE_MCP_STDIO=true on the proxy and restart to enable them"}]} HTTP 422
    

Flag on (LITELLM_ENABLE_MCP_STDIO=true), no "will not start" line in the boot log:

  1. Same tools/list call
    ["echo"]
    
  2. Same tools/call
    {"_meta":null,"content":[{"type":"text","text":"echo: hi","annotations":null,"_meta":null}],"structuredContent":{"result":"echo: hi"},"isError":false,"resultType":"complete"} HTTP 200
    

UI config

  1. Flag off: same call
    {"mcp_stdio_enabled":false}
    
  2. Flag on: same call
    {"mcp_stdio_enabled":true}
    

Tests and review

  1. The 7 Python test files feat(mcp)!: disable stdio MCP servers by default #44066 touches: 2 failed, 2216 passed on the rc tip, 2 failed, 2267 passed after the pick, same 2 known-noise failures
  2. MCP servers vitest folder: 782 passed. ruff format and ruff check are clean on the 6 changed litellm/ files
  3. Wider delta over tests/unit/proxy and tests/unit/types (about 36,500 tests): no new failure. Five tests were red only in the post-pick run; four pass on rerun, and test_pgbouncer.py::TestPgBouncerProcess::test_a_pooler_that_never_listens_times_out fails the same way on the rc tip in isolation
  4. Adversarial review (5 lenses at deep depth, including its own live proxies with Postgres for the config.yaml and database cases): every claim held, with no verified findings

Type

🆕 New Feature

Caveats (if any)

Severe

  • Breaking: existing stdio MCP servers stop starting after upgrade
    • Fix: set LITELLM_ENABLE_MCP_STDIO=true on the proxy and restart

Low

* feat(mcp)!: disable stdio MCP servers by default

stdio MCP servers now only run when the proxy is started with
LITELLM_ENABLE_MCP_STDIO=true. While it is off, existing stdio servers stay
registered but never start: tool listings skip them quietly, direct tool
calls and health checks return a 403 naming the env var, and creating or
updating a stdio server is rejected. The flag is read from the process
environment only, so DB-stored environment_variables cannot turn it on.

The UI reads mcp_stdio_enabled from /.well-known/litellm-ui-config to grey
out the stdio transport, show a banner on stdio forms, and badge stdio
server cards.

BREAKING CHANGE: stdio MCP servers are off by default. Set
LITELLM_ENABLE_MCP_STDIO=true in the proxy environment and restart to keep
using them.

* fix(mcp): ignore stdio flag from config file and read UI flag from the selected worker

LITELLM_ENABLE_MCP_STDIO set under environment_variables in config.yaml is now skipped like the DB-stored value, so only the process environment can enable stdio. The dashboard reads mcp_stdio_enabled from the proxy it is managing, so a control plane shows each worker's own setting.

* test(mcp): cover non-mapping payloads in the shared transport validator

* fix(mcp): skip blocked stdio servers quietly in every listing and keep the UI unchanged until the flag loads

Prompt, resource and resource-template listings now skip a blocked stdio server at debug level like tool listing does, instead of logging a warning per server on every call. The dashboard only treats stdio as disabled once the proxy explicitly reports mcp_stdio_enabled false, so a proxy with the flag on, or an older one without the field, renders exactly as before with no flicker while loading.

* fix(mcp): route blocked stdio tool calls to the flag error and warn once per server

A gateway tools/call naming a blocked stdio server's tool now returns the
LITELLM_ENABLE_MCP_STDIO message instead of "Tool not found".

The "will not start" warning moves out of build_mcp_server_from_table, which
DB reload re-runs on every cycle for rows with a NULL updated_at and which
drafts and test-connection also call. It now fires when a row first enters
the registry or changes transport.

* fix(ui): explain on the server detail page why a stdio server is inert

The Overview and MCP Tools tabs showed "No tools available" with no reason
while stdio is disabled. The detail page now shows the same warning banner
as the edit form, and hands off to the form's banner once editing starts.

* refactor(ui): name the stdio banner conditions on the server detail page

Keeps local/no-long-condition-chain within its budget

* fix(proxy): log the ignored DB-stored LITELLM_ENABLE_MCP_STDIO warning once

The DB config sync re-reads environment_variables on every cycle, so a stored
flag logged the warning on each sync per worker

(cherry picked from commit 2b85808)
@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[High risk] Backport merges 600+ generated build artifacts and feature code.

The PR appears safe to merge, with a non-blocking dashboard availability issue when the UI-config request fails.

Findings

  1. P2 Missing status enables stdio ▶

Summary

The PR backports a default-off gate for proxy-hosted stdio MCP servers, exposes its state to the dashboard, and refreshes the committed UI export.

  • Adds server validation, client-creation and tool-call checks, plus warnings for blocked servers.
  • Prevents config-file and database settings from enabling the operator-controlled flag.
  • Updates dashboard availability indicators and tests. The dashboard still presents stdio as available if its availability request fails.

Reviews (1) · Last reviewed commit: "chore: update Next.js build artifacts (2..."

"stdio MCP servers are disabled on this proxy. Set LITELLM_ENABLE_MCP_STDIO=true on the proxy and restart to enable them";

export const useMcpStdioEnabled = (): boolean =>
$api.useQuery("get", "/.well-known/litellm-ui-config").data?.mcp_stdio_enabled !== false;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing status enables stdio When the UI-config request has not returned or fails, data is undefined, so this check treats stdio as enabled. On a proxy using the default-off setting, the dashboard offers stdio without the disabled warning, but the backend rejects the save. Treat an unavailable status as disabled rather than enabled.

Suggested change
$api.useQuery("get", "/.well-known/litellm-ui-config").data?.mcp_stdio_enabled !== false;
$api.useQuery("get", "/.well-known/litellm-ui-config").data?.mcp_stdio_enabled === true;

@yuneng-berri
yuneng-berri merged commit 3ee3b23 into rc/1.105.0 Oct 2, 2026
8 of 9 checks passed
@yuneng-berri
yuneng-berri deleted the litellm_chore_c4d0fc branch October 2, 2026 18:22

This branch had an error being deployed

1 failed deployment
e2e-changed — bde22d8d Deployed Oct 2, 2026 by yuneng-berri via oauth #2619
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant