Skip to content

Conversation

@Granine
Copy link
Contributor

@Granine Granine commented Nov 6, 2025

Title

Update MCP version from 1.10.1 to 1.20.0 and uvicorn to 0.31.1 [II]

Changelog

  • Added patch to circleci, which was overlooked in the last commit

Relevant issues

Fixes the MCP version compatibility issue where litellm was stuck on MCP 1.12.4 due to uvicorn version constraint (^0.29.0), preventing access to newer MCP features and connectors introduced in versions 1.13-1.20.0.

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
image
  • [ ??] My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🐛 Bug Fix
🆕 New Feature

Changes

Summary

Updated MCP (Model Context Protocol) package from 1.10.1 to 1.20.0 to enable support for newer MCP features and connectors. This required updating uvicorn from 0.29.0 to 0.31.1, which is a dependency requirement of MCP 1.13+.

Problem

  • LiteLLM was constrained to uvicorn ^0.29.0 (meaning <0.30.0)
  • MCP versions 1.13+ require uvicorn >=0.31.1
  • This prevented LiteLLM from using MCP versions beyond 1.12.4
  • Newer MCP features and connectors (OS management capability, etc.) were unavailable, causing silent failures

Solution

Updated the following dependencies:

  • MCP: 1.10.11.20.0
  • uvicorn: 0.29.00.31.1 (required by MCP 1.20.0)
  • PyJWT: Updated constraint to >=2.8.0,<3.0.0 (for compatibility with MCP's PyJWT >=2.10.1 requirement)

Files Modified

  1. requirements.txt - Updated mcp and uvicorn versions
  2. pyproject.toml - Updated dependency constraints
  3. requirements.txt - Updated mcp version for CI
  4. config.yml - Updated all 4 references to MCP version in CI jobs
  5. tests/test_litellm/test_mcp_version.py - New test file with 2 tests:
    • test_mcp_version(): Verifies MCP package version is >=1.20.0
    • test_mcp_imports(): Validates backward compatibility of all MCP imports

Backward Compatibility

✅ Fully backward compatible:

  • All existing MCP imports remain available and functional
  • MCP package remains optional (only installed with proxy extra)
  • Python version constraint remains >=3.10 for MCP (no change)
  • Existing code using MCP will continue to work without modifications

Testing

  • Added comprehensive version and import compatibility tests
  • All MCP imports verified: ClientSession, StdioServerParameters, sse_client, stdio_client, streamablehttp_client, MCPCallToolRequestParams, MCPCallToolResult, TextContent, Tool

Notes

  • MCP 1.20.0 includes security fixes and feature improvements from versions 1.13-1.20
  • This change enables access to newer MCP connectors (Zapier, Jira, Linear, etc.) and OS management capabilities

Tickets addressing

  • [https://github.com/BerriAI/litellm/issues/16280](Uvicorn version must be updated to beyond 1.31.0)
  • [https://github.com/BerriAI/litellm/issues/15511](MCP == 1.20.0)

- Update mcp dependency: 1.10.1 -> 1.20.0 in requirements.txt, pyproject.toml, and CI config
- Update uvicorn dependency: 0.29.0 -> 0.31.1 (required by MCP 1.20.0)
- Update PyJWT constraint to support newer versions required by MCP
- Update all CI pipeline references to MCP 1.20.0
- Add test to verify MCP version and import compatibility

MCP 1.20.0 requires uvicorn >=0.31.1 and PyJWT >=2.10.1.
MCP package remains Python >=3.10 only (no change to version constraint).
… poetry.lock

- Updated pydantic constraint to support both Python 3.8 (<2.11) and Python 3.9+ (>=2.11)
- Relaxed pydantic pin from ==2.10.2 to >=2.11,<3.0.0 in requirements.txt and CI files
- Updated .circleci/config.yml to install pydantic >=2.11 instead of exact pin
- Updated .github/workflows/test-mcp.yml to install MCP 1.20.0
- Regenerated poetry.lock with pydantic 2.12.4 compatible with MCP 1.20.0
- This resolves the CI ResolutionImpossible error where MCP required pydantic>=2.11
@vercel
Copy link

vercel bot commented Nov 6, 2025

@Granine is attempting to deploy a commit to the CLERKIEAI Team on Vercel.

A member of the Team first needs to authorize it.

@Granine
Copy link
Contributor Author

Granine commented Nov 6, 2025

@krrishdholakia hopefully this will address the issue

@Granine
Copy link
Contributor Author

Granine commented Nov 9, 2025

@krrishdholakia I want to ping you again on this PR to update MCP version, hopefully I addressed circleci issue, lmk if you have more concerns.

@krrishdholakia krrishdholakia changed the base branch from main to litellm_contributor_prs_11_10_2025 November 11, 2025 03:39
@krrishdholakia krrishdholakia merged commit db7a308 into BerriAI:litellm_contributor_prs_11_10_2025 Nov 11, 2025
3 of 5 checks passed
@krrishdholakia
Copy link
Contributor

Merged into #16475 - let's monitor it there @Granine

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.

2 participants