-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[Feat] MCP expose streamable https endpoint for LiteLLM Proxy #11645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR exposes a streamable HTTPS endpoint for the LiteLLM Proxy MCP server. Key changes include replacing the MCP router with an app mount using a new BASE_MCP_ROUTE constant, implementing a health check endpoint, and refactoring MCP server initialization to use StreamableHTTPSessionManager for both HTTP and SSE requests.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
litellm/proxy/proxy_server.py | Updated to import BASE_MCP_ROUTE and mount the new MCP app instead of including a router. |
litellm/proxy/_experimental/mcp_server/server.py | Introduced session manager initialization/shutdown logic and new endpoints for streamable HTTP and SSE. |
litellm/constants.py | Added the BASE_MCP_ROUTE constant to support MCP app mounting. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…I#11645) * feat - add https mcp support * fixes for MCP http integration * fix code QA * bump mcp dep * test_mcp_server_manager_https_server * test mcp server https * fix linting error * bump mcp in poetry * fix import streamablehttp_client * fix streamablehttp_client * fix streamablehttp_client * add streamablehttp_client * add simple https server * working mounted app * working HTTPS mcp streamable * fix code QA check * feat: add MCP Server * fix - init just as fastapi app * add LITELLM_MCP_SERVER_DESCRIPTION * fix importing / init litellm app * Update litellm/proxy/_experimental/mcp_server/server.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update litellm/proxy/_experimental/mcp_server/server.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update server.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fixes based on review + code check * fix linting * test_streamable_http_mcp_handler_mock * fix python 3.13 install * fix deps test --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
[Feat] MCP expose streamable https endpoint for LiteLLM Proxy
Closes #11603
This PR exposes a streamable HTTPS endpoint for the LiteLLM Proxy MCP serve
h/t @wagnerjt for the initial scoping work and help on this
Relevant issues
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/litellm/
directory, Adding at least 1 test is a hard requirement - see detailsmake test-unit
Type
🆕 New Feature
🚄 Infrastructure
✅ Test
Changes