Yuta Saito
5359a0d6a6
fix: test
2025-09-30 07:25:32 +09:00
Yuta Saito
be5010a675
test: fix tests
2025-09-29 07:21:32 +09:00
Krrish Dholakia
9403efa511
test: fix tests
2025-09-28 08:54:15 -07:00
Krrish Dholakia
1256dd53d9
test: update tests
2025-09-28 08:53:11 -07:00
Krrish Dholakia
340262c85f
feat(server.py): only show allowed mcp tools
2025-09-27 20:57:12 -07:00
Krrish Dholakia
5d6889dc92
test: update tests
2025-09-27 10:40:06 -07:00
Ishaan Jaffer
a6795a6560
test fix
2025-09-19 18:05:36 -07:00
Ishaan Jaffer
dec15a80a2
test: mcp test fix
2025-09-19 17:52:32 -07:00
Ishaan Jaffer
c3f150b13d
mcp test fix
2025-09-19 17:41:15 -07:00
Yuta Saito
654f1d3290
fix: stop including spec_version in MCP server registration inserts
2025-09-19 07:06:15 +09:00
Yuta Saito
6c291093e9
fix: remove adding Mcp-Protocol-Version header ( #14069 )
...
The Mcp-Protocol-Version header is already handled in the MCP Python SDK, so the explicit addition on LiteLLM Proxy was redundant.
2025-09-19 07:05:20 +09:00
Ishaan Jaff and GitHub
a13aa4740a
[Fixes] Bug fixes to using LiteLLM MCP Gateway ( #14392 )
...
* fix: use _get_mcp_servers_in_path
* fix checks for using litellm_proxy as MCP tool provider
* fix: fix mcp_tools_with_litellm_proxy
* fix: fix aresponses_api_with_mcp
* aresponses_api_with_mcp
* test_mcp_allowed_tools_filtering
* fix: _filter_mcp_tools_by_allowed_tools
* fix: _filter_mcp_tools_by_allowed_tools
* test_streaming_responses_api_with_mcp_tools
* fixes: test tools transfrom MCP->OpenaI spec
* test_streaming_responses_api_with_mcp_tools
* fix: chat ui allow multi select with allowed tools
* fix: use correct MCP events with litellm proxy response API
* fix get_event_model_class
* fix litellm proxy MCP handler
* fix MCPEnhancedStreamingIterator
* chat ui show list tools result
* UI: show MCP events
* fix stream iterator
* fixes: litellm proxy mcp handler
* test responses + mcp
* fix: update responses api with mcp handling
* ruff check fix
* central: _process_mcp_tools_to_openai_format
* fix: refactor code
* test_mcp_allowed_tools_filtering
* test mcp with litellm proxy
* fix mcp call
* demo: video using MCP ui
* fixes for using stream iterator
* test_no_duplicate_mcp_tools_in_streaming_e2e
* docs fix
* fix code snippet
2025-09-10 19:12:11 -07:00
Ishaan Jaff and GitHub
1f42e41c8d
[Bug]: Fix Authorization header not being sent to configured MCP servers ( #14422 )
...
* test: test_mcp_server_config_auth_value_header_used
* fix: authentication_token
* docs: fix instructions on using responses api with MCPs
* mcp fixes
2025-09-10 16:41:08 -07:00
Ishaan Jaff and GitHub
68d250973c
[Feature]: Support "Token" MCPAuth ( #14359 )
...
* add MCPAuth.authorization type
* test: Token Auth MCP
* fix: _get_auth_headers to handle auth_type == MCPAuth.authorization
* docs auth types with MCP on config.yaml
* test_mcp_server_works_without_config_auth_value
2025-09-08 18:25:41 -07:00
Ishaan Jaff and GitHub
b9132968b2
[Perf] Improvements for Async Success Handler (Logging Callbacks) - Approx +130 RPS ( #13905 )
...
* [Performance] Reduce Significant CPU overhead from litellm_logging.py (#13895 )
* fix: litellm.configured_cold_storage_logger
* fix Session Management - Non-OpenAI Models docs
* ruff fix
* test fix
* create LoggingWorker
* add GLOBAL_LOGGING_WORKER for async task handling
* fix logging tests
* add conftest
* fix conftest
* test fix location of encode bedrock runtime modelid arn
* fix conftest.py
* tuning LoggingWorker
* conftest.py
* fix conftest batches/
* test_async_chat_azure
* event_loop
* test_bedrock_streaming_passthrough_test2
* fix GLOBAL_LOGGING_WORKER
* logging worker
* add flush for global logging worker
* Revert "fix GLOBAL_LOGGING_WORKER"
This reverts commit d254f508f48935652f054777652938ad71976cce.
* fix conftest clear_queue
* fix conftest clear_queue
* setup_and_teardown for llm translation
* docs AWS_REGION
* test_async_chat_azure
* change test DIR
* run ci/cd again
* use 1 job for litellm_router_unit_testing
* fix space
* fix litellm_router_unit_testing
* test_aaarouter_dynamic_cooldown_message_retry_time
* litellm_router_unit_testing
* conftest.py clearing qu
* fixes litellm_router_unit_testing
* fixes clear_queue
* fix router_unit_tests
* remove conftest
* add back conftest for router
* fix event loop test
* test fix
* fixes for LoggingWorker
* ruff fix
2025-08-23 13:13:23 -07:00
Jugal D. Bhatt and GitHub
b8fe5f7b17
[MCP Gateway] LiteLLM Fix MCP gateway key auth ( #13630 )
...
* Fix - add safe divide by 0 for most places to prevent crash
* Enhance MCPRequestHandler to support permission inheritance and intersection logic for access groups. Added integration tests to verify behavior when keys have no permissions and when both keys and teams have overlapping permissions.
* Remove redundant assertions for permission checks in test_user_api_key_auth_mcp.py to streamline test logic.
* Refactor integration tests for MCPRequestHandler to simplify mocking. Replace complex database mocks with direct function mocks for permission inheritance and intersection scenarios, improving test clarity and maintainability.
* Revert "Fix - add safe divide by 0 for most places to prevent crash"
This reverts commit 265d40e39051e148996b9fb7f354730c57ff23ac.
2025-08-14 16:32:18 -07:00
Jugal Bhatt
f487816b9f
[fix] Enhance MCPServerManager with access groups and description support
...
* Added access_groups and description fields to MCPServerManager for better server configuration.
* Implemented tests to verify integration of config-based servers with database servers, ensuring correct handling of access_groups and description.
* Updated add_update_server method to accommodate new fields and validate server addition in the registry.
2025-08-12 14:22:40 -07:00
Thiago Salvatore and GitHub
c2ad858c83
fix(access group): allow access group on mcp tool retrieval ( #13425 )
...
* fix(access group): allow access group on mcp tool retrieval
* fix(test): fix broken tests and add test case for access group
* fix(mypy): fix typing issues
2025-08-08 08:55:46 -07:00
Jugal D. Bhatt and GitHub
b1a8968895
[MCP Gateway] fix auth on ui for bearer servers ( #13312 )
...
* fix auth on ui for bearer servers
* add tests and fixes
* fix tests
2025-08-06 09:46:10 -07:00
Jugal D. Bhatt and GitHub
900c7f45c0
[MCP Gateway] Litellm mcp pre and during guardrails ( #13188 )
...
* add guardrail support
* add guardrail support
* guardrails for MCP
* added changes
* add mcp guardrails
* added test
* add ui
* fix guardrail form
* working with cursor
* remvoe print
* fix mcp servertests
* fix mypy and remove console logs
* fix mypy and remove console logs
* fix mypy tests
2025-08-01 20:02:25 -07:00
Jugal D. Bhatt and GitHub
5db4862cbf
[MCP Gateway] Litellm mcp client list fail ( #13114 )
...
* fix headers
* fix test
* fix ruff
* added try except for catching errors which lead to client failures
* fix mypy
* fix ruff
* fix tests
* fix python error
* fix test
* fix test
* fixed the MCP Call Tool result
2025-07-30 15:23:19 -07:00
Jugal D. Bhatt and GitHub
eb8a338d9b
[MCP Guardrails] move pre and during hooks to ProxyLoggin ( #13109 )
...
* move pre and during hooks t o ProxyLoggin
* fix lint
* fix ruff
* fix tests
2025-07-30 13:58:41 -07:00
Ishaan Jaff
1af0743e58
Revert "Revert "[MCP Gateway] Add protocol headers ( #13062 )""
...
This reverts commit acd915f2db .
2025-07-29 18:14:31 -07:00
Ishaan Jaff
acd915f2db
Revert "[MCP Gateway] Add protocol headers ( #13062 )"
...
This reverts commit 8de24bab7c .
2025-07-29 17:26:00 -07:00
Jugal D. Bhatt and GitHub
8de24bab7c
[MCP Gateway] Add protocol headers ( #13062 )
...
* Add protocol headers
* fix mypy
* fix tests
* fix tests
2025-07-29 16:03:23 -07:00
Jugal D. Bhatt and GitHub
ae9a02d7d5
[MCP gateway] add pre and during call hooks init ( #13067 )
...
* add hook init
* add during hook
* added logging
2025-07-29 11:06:58 -07:00
Jugal D. Bhatt and GitHub
b921e22594
[MCP Gateway] Litellm mcp multi header propagation ( #13003 )
...
* change alias-> server_name
* add server alias uses
* add tests
* schema
* ruff fix
* fix alias for config
* fix tests
* add alias
* fix tests
* add multi server header support
* add and fix tests
* fix tests
* fix tests
* add a common util
* ruff fix
* fix ruff
* fix tests
* fix migration
* mypy fix
* change server py
2025-07-26 11:45:14 -07:00
Jugal D. Bhatt and GitHub
10595ea077
[MCP Gateway] add Litellm mcp alias for prefixing ( #12994 )
...
* change alias-> server_name
* add server alias uses
* add tests
* schema
* ruff fix
* fix alias for config
* fix tests
* add alias
* fix tests
* fix tests
* add a common util
* ruff fix
* fix migration
2025-07-25 17:57:52 -07:00
Jugal D. Bhatt and GitHub
a7d0b122b9
[MCP Gateway] List tools from access list for keys ( #12657 )
...
* fix tools fetch for keys
* add unit test
2025-07-16 14:28:53 -07:00
Jugal D. Bhatt and GitHub
b3a214bce7
[MCP Gateway] Allow MCP access groups to be added via the config LIT-312 ( #12654 )
...
* allow mcp access groups to be added via the config
* fix code and doc quality
* fix mypy
* create helpers:
2025-07-16 13:57:43 -07:00
Ishaan Jaff and GitHub
2d6751a396
[Feat] MCP Gateway - allow using MCPs with all LLM APIs when using /responses with LiteLLM ( #12546 )
...
* add MCPResponsesAPIHelper
* rename LiteLLM_Proxy_MCP_Handler
* aresponses_api_with_mcp
* mock_responses_api_response
* test response with litellm proxy MCP
* add _should_use_litellm_mcp_gateway
* fix transform_mcp_tool_to_openai_responses_api_tool
* use correct _transform_mcp_tools_to_openai
* fix config.yaml
* fixes for native MCP handling
* docs MCP with litellm proxy
* aresponses_api_with_mcp
* fix linting
* fix mypy
* fix linting
* test_aresponses_api_with_mcp_mock_integration
* docs How it works when server_url="litellm_proxy"
2025-07-15 14:06:31 -07:00
Ishaan Jaff and GitHub
50b106be11
[MCP Gateway] Ensure we use the same param for specifying groups ( #12561 )
...
* just use 1 param for mcp groups
* fix just use 1 param for access groups
* test_get_tools_from_mcp_servers
* docs access groups
* group MCPs
* test fix
* fix screenshots on docs
* TestMCPAccessGroupsE2E
* update img
* fix MCP connect
2025-07-12 16:41:58 -07:00
Jugal D. Bhatt and GitHub
9fe9e1cd6e
[MCP Gateway] Allow mcp access groups on test key and tool calls ( #12529 )
...
* added mcp tools on internal user and divide it by teams
* add support for server api call
* Added frontend for test key
* added tools used output
* fix ui for servers
* All servers to personal
* change columns format
* revert ui logic
* Added vertical align
* fix mapped tests
* fix lint
* fix lint
* remove extra file
* fix ui test
* comments fixes
* change query type
* change query type
* mcp acces group init
* add ability to change server display on ui through access groups
* Mcp access group names UI (#12486 )
* Added ui changes to reflect mcp_access_groups
* fix edit mcp page
* change to string array (#12491 )
* change to string array
* Remove print
* add ability to change server display on ui through access groups
* Litellm mcp access groups accesses (#12498 )
* added mcp access groups for keys and teams
* added access groups above servers
* fixed ruff
* fixed mypy
* revert couple changes
* fix test
* fixed double asterisks
* Litellm mcp groups UI (#12522 )
* add ui for teams
* fix object permissions
* fix mcp servers test object permission
* remove print
* add helper method
* add tests + remove logs
* add mcp access group servers to test key
* add mcp access group support for headers
* lint fix
* add tests and helper function
* fixed test
* change list -> List
* tests
2025-07-12 10:36:42 -07:00
Ishaan Jaff and GitHub
35bfa7c9ee
[MCP Gateway] - Allow using custom post call MCP hook for cost tracking ( #12469 )
...
* add async_post_mcp_tool_call_hook to custom logger
* instrument call_mcp_tool
* add async_post_mcp_tool_call_hook
* fixes for MCP tests
* test fix MCP tests
* allow adding custom cost for MCP response
* fix LiteLLM_MCPTextContent
* add MCPPostCallResponseObject
* fix _handle_local_mcp_tool
* async_post_mcp_tool_call_hook
* fix typing loc
* fix call_mcp_tool
* fix server.py
* fix MCPPostCallResponseObject
* async_post_mcp_tool_call_hook
* docs mcp cost hook
* fix import path
2025-07-09 18:41:08 -07:00
Ishaan Jaff and GitHub
5cad0dd94b
[Feat] Add MCP Cost Tracking ( #12385 )
...
* fix MCP_TOOL_NAME_PREFIX
* test_mcp_cost_tracking
* init MCPCostCalculator
* add call_mcp_tool
* calculate_mcp_tool_call_cost
* add MCPServerCostInfo
* add mcp_server_cost_info
* add mcp_server_cost_info
* pass through litellm_logging_obj
* logged_standard_logging_payload
* fix logging MCP tool call
* test_mcp_cost_tracking_per_tool
* fix NewMCPServerRequest
* fix add_update_server
* add MCP info to schema.prisma
* fix create_mcp_server
* working custom cost per call
* fix mcp server cost
* fix MCPCostCalculator
* TestMCPCostCalculator
2025-07-07 21:08:10 -07:00
Jugal D. Bhatt and GitHub
62946e58d2
Segregate MCP tools on connections using headers ( #12296 )
...
* Add get tools segregation
* add ui changes (#12302 )
* resolve comments
* add mapped tests
* remove advanced settings (#12323 )
2025-07-04 11:45:51 -07:00
Jugal D. Bhatt and GitHub
df161f1e45
Litellm mcp tool prefix ( #12289 )
...
* prefix all server tools from the backend
* change var name
* fix tests
2025-07-03 11:39:37 -07:00
Jugal Bhatt
27e6ef5f39
added error handling for MCP tools not found
2025-07-01 17:12:01 -07:00
b90d3ca8d0
[Feat] MCP - Allow connecting to MCP with authentication headers + Allow clients to specify MCP headers ( #11890 ) ( #11891 )
...
* initial mcp auth with special header (#11890 )
Co-authored-by: wagnerjt <wagnerjt@github.com >
* add mcp auth header
* fixes MCP client for litellm proxy
* fixes loc of MCP types
* fixes use MCP client for auth to MCPs
* fix organization
* fix mcp auth header
* add MCP auth header to litellm auth
* fixes for MCP auth
* Add MCP auth to list tools
* fix MCP call tool
* fixes for MCP auth header
* tests for MCP transport
* TestMCPClientUnitTests
* docs MCP auth
* fix types
* docs fix
* fix MCP auth import
* fix code qa check
* test fix mcp auth token check
---------
Co-authored-by: wagnerjt <wagnerjt@github.com >
2025-06-19 20:07:08 -07:00
Ishaan Jaff and GitHub
a8196159b9
[Bug Fixes] MCP - using MCPs defined on config.yaml + fix for MCP error Team doesn't exist in cache ( #11824 )
...
* fix - dont allow missing team to block MCP list response
* use HTTP as default transport
* _generate_stable_server_id
* fix list MCP servers
* ui fix
* test_list_mcp_servers_empty_result
* test_generate_stable_server_id
* _generate_stable_server_id
* fix code QA
* fix code QA
2025-06-17 16:25:12 -07:00
19a8b23644
[Feat] Add Authentication + Permission Management for MCP List, Call Tool Ops ( #11682 )
...
* add basic auth checks for MCP
* working MCP auth
* fix MCP
* add get_allowed_mcp_servers for key, team
* add get_allowed_mcp_servers
* TOOLS FROM MCP SERVERS
* fix - working context vars for handling auth to MCPs
* fix imports
* working _get_allowed_mcp_servers_for_key
* TestUserAPIKeyAuthMCP
* test_user_api_key_auth_mcp
* fix code qa check
* fix imports
* test_mcp_server.py
* fix: fix - working permission mgmt
* Update litellm/proxy/_experimental/mcp_server/auth/user_api_key_auth_mcp.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-06-13 10:13:51 -07:00
7947139913
[Feat] MCP expose streamable https endpoint for LiteLLM Proxy ( #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 >
2025-06-12 16:32:04 -07:00
Ishaan Jaff and GitHub
02b02c739b
[Feat] MCP - Add support for streamablehttp_client MCP Servers ( #11628 )
...
* 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
2025-06-11 17:09:46 -07:00
9a6d5c119e
feat: Allow Adding MCP Servers Through LiteLLM UI ( #11208 )
...
* feat: MCP Servers with CRUD operations (#10699 )
* feat: mcp CRUD operations with authn/authz
* feat: mcp server UI
* mcp server page with overview, mcp tools, and settings page
* Adding MCP Server flow
* prisma generate before test
* UI callbacks add/remove with api server refetch
* test fix: poetry run prisma
* feat: mcp server db and config connection
* fix: MCPTool filter on description when not present
* feat: mcp on UI and integrated with list tools
* feat: Update mcp server endpoint
* tests: Unit and integration tests for mcp management endpoints
* fix: docs and ensuring global_mcp_manage up to date
* ui: remove the mcp tools view
* fix: ruff lint
* fix: unit -> integration test area
* fix(ui): remove left nav menu of previous tools
---------
Co-authored-by: wagnerjt <wagnerjt@github.com >
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com >
* fix: sync DB MCP tools with in memory
* fix: sync DB MCP tools with in memory
* fix: stop using prisma.models
* fix: code qa check
* fix: import MCP
* fix: code QA checks
* fix: code QA checks
* fixes - only list tools for the specific MCP server
* fix: only list MCP tools for selected server
* fix linting error
---------
Co-authored-by: Tyler Wagner <wagnerjt@users.noreply.github.com >
Co-authored-by: wagnerjt <wagnerjt@github.com >
2025-05-28 16:29:27 -07:00
Ishaan Jaff
194327bb7c
test fixes
2025-03-29 18:34:58 -07:00
Ishaan Jaff
4e106ce217
fix test
2025-03-29 17:11:46 -07:00
Ishaan Jaff
a1ec0dd0e2
add testing mcp server
2025-03-29 12:52:46 -07:00
Ishaan Jaff
8a71f129bf
ci_cd_server_path
2025-03-21 19:06:29 -07:00
Ishaan Jaff
19d6051dba
test mcp agent
2025-03-21 17:48:16 -07:00
Ishaan Jaff
6fb2ae8731
docs mcp docs update
2025-03-21 17:21:40 -07:00