chore(release): cherry-pick MCP fixes onto v1.89.0-rc.2 toward rc.3 - #30329
Conversation
…the Tools page (#29867) * fix(ui): let non-creator users OAuth into OBO-mode MCP servers from the Tools page * fix(ui): clear OBO Tools-tab one-shot on navigate-back and gate on credential-status errors
…ware GET path (#29960) * fix(ui): load MCP tool configuration tools via the OBO/passthrough-aware GET path * fix(mcp): admin-only include_disabled_tools so the settings UI shows toggled-off tools * fix(ui): repopulate MCP server edit form when server data loads after mount (OAuth return) * fix(ui): persist MCP OAuth token on save and return to the Settings tab after authorize * fix(ui): scope MCP OAuth callback to the initiating form so create and edit flows don't cross-talk * fix(ui): derive OAuth-return Settings tab via lazy state init instead of setState-in-effect * Fix MCP OAuth edit token handling --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
…r server's token no longer leaks into the next add-server session (#30000) * fix(ui/mcp): reset OAuth hook state on modal close so a prior server's token no longer leaks into the next add-server session * fix(ui/mcp): clear in-flight OAuth guard on reset and reset form/tools on modal close so nothing leaks on a parent-driven dismiss
…ess check (#30041) * fix(mcp): honor team access-group grants in OAuth authorize/token access check * test(mcp): mock build_effective_auth_contexts in non-admin authorize tests for isolation
Greptile SummarySix targeted MCP bug fixes cherry-picked from staging onto the v1.89.0-rc.2 branch: OAuth session isolation between create/edit forms,
Confidence Score: 5/5All six fixes are narrowly scoped, each carries dedicated unit tests, and no change touches the critical API request path or auth layer in a way that could break existing callers. Each cherry-pick addresses a concrete, isolated bug (token leakage, wrong expires_in, stale orphan rows, missing team grants, wrong GET path for tool config) and is accompanied by tests that directly exercise the fixed behaviour. The backend changes are additive or constrained to best-effort cleanup paths that cannot turn a success into a failure. The frontend OAuth state reset and flowSource discriminator are well-covered by the new hook and component tests. mcp_server_edit.tsx — the early return on OAuth credential-persistence failure (flagged in the prior review thread) means onSuccess is not called when the DB write fails after a successful server update; worth a follow-up once that thread is resolved.
|
| Filename | Overview |
|---|---|
| litellm/proxy/_experimental/mcp_server/db.py | Expands server-delete cleanup to also drop per-user credential rows (litellm_mcpusercredentials) independently of env-var cleanup, with the loop ensuring each table is tried even if the other fails. |
| litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py | Fixes expires_in handling: omits the field when upstream omits it (non-expiring tokens like Slack without rotation) instead of fabricating a 1-hour TTL. |
| litellm/proxy/_experimental/mcp_server/rest_endpoints.py | Adds admin-only include_disabled_tools query param that bypasses the allowlist filter so the config UI can see and toggle disabled tools; enforced server-side to PROXY_ADMIN only. |
| litellm/proxy/management_endpoints/mcp_management_endpoints.py | Fixes OAuth authorize/token access check to expand UI session into per-team contexts via build_effective_auth_contexts, making team access-group grants visible to the check. |
| ui/litellm-dashboard/src/hooks/useMcpOAuthFlow.tsx | Adds flowSource discriminator so only the form that initiated the redirect (create vs edit) processes the returned OAuth callback; adds reset() to clear token state on modal close. |
| ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsx | Resets OAuth flow, form fields, and tool list when the modal closes (including parent-controlled dismissals), preventing prior authorization state from leaking into the next add-server session. |
| ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsx | Major rework: adds OBO/passthrough-aware tool fetching via GET+include_disabled_tools, OAuth token persistence on save, and a syncedServerIdRef to repopulate the form when server data arrives after mount. An early return on credential-persistence failure does not call onSuccess (flagged in prior review thread). |
| ui/litellm-dashboard/src/components/mcp_tools/mcp_tools.tsx | Adds OBO auth gate: queries per-user credential status before listing tools, showing an Authorize button when no credential row exists and a refetch on success. Refactors passthrough header logic into the shared buildMcpPassthroughAuthHeader helper. |
Reviews (2): Last reviewed commit: "fix(mcp): drop orphaned per-user credent..." | Re-trigger Greptile
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Relevant issues
Cherry-picks of merged MCP fixes from
litellm_internal_stagingonto thepatch/v1.89.0-rc.2release branch, toward v1.89.0-rc.3.Linear ticket
Pre-Submission checklist
Changes
These six commits cherry-pick cleanly (no manual conflict resolution) onto rc.2, in the same order they were merged to staging:
Each original PR carried its own tests; those tests come along with the cherry-picks.
Type
🐛 Bug Fix