litellm/tests/test_litellm/proxy/management_endpoints
Ishaan Jaff 373e5e316b
feat(mcp): BYOM — non-admin MCP server submission + admin review workflow (#23205)
* feat(mcp): add BYOM (Bring Your Own MCPs) submission + admin review workflow

Non-admins can now submit MCP servers for review via POST /v1/mcp/server/register.
Admins get a Submissions tab in the UI to approve or reject pending servers.
Approved servers enter the active runtime; rejected ones stay out with notes.

- DB: add approval_status, submitted_by, submitted_at, reviewed_at, review_notes
  to LiteLLM_MCPServerTable with migration
- Backend: new endpoints register, submissions, approve, reject
- reload_servers_from_database now only loads approval_status=active servers
- UI: Submissions tab with stat cards, card list, confirm dialogs; non-admin
  "Submit MCP Server" button wired to /register endpoint
- Fix get_mcp_submissions to filter by submitted_at IS NOT NULL (not submitted_by,
  which can be null for team-scoped keys without an associated user)

* feat(mcp): rename nav item to Team MCPs + add New badge

* fix(mcp): revert nav label, rename Submissions tab to Team MCPs + New badge

* feat(mcp): add MCP Standards — required fields config + CI-style checks on submissions

Adds a "Standards" tab (admin-only) to MCP Servers where admins define which
server fields are required for a submission to pass. Each submission card in
Team MCPs then shows a green ✓ or red ✗ for each required field, with a
summary "N/M checks" badge in the header — like GitHub CI status rows.

Also adds a `source_url` field (GitHub / Source URL) to the MCP server schema
so non-admins can link to the source repo when submitting a server.

- schema.prisma: add `source_url String?` to LiteLLM_MCPServerTable
- migration: 20260309000001_add_mcp_source_url
- _types.py: source_url on NewMCPServerRequest, UpdateMCPServerRequest, LiteLLM_MCPServerTable
- types.tsx: source_url on MCPServer interface
- create_mcp_server.tsx: GitHub/Source URL form field
- MCPStandardsSettings.tsx: new — toggle which fields are required (stored in general settings as mcp_required_fields)
- mcp_servers.tsx: Standards tab (admin-only)
- MCPSubmissionsTab.tsx: load required fields + CI-style check pills on each card

* refactor(mcp): move submission rules into Team MCPs tab, grouped free-form UI

Folds the Standards tab into Team MCPs. Submission Rules panel now lives at the
top of the Team MCPs tab — collapsible, shows active rules as chips when closed,
expands to a grouped checkbox editor (Documentation / Source / Connection /
Security). Removes the separate Standards tab from the nav.

MCPStandardsSettings.tsx is now constants-only (FIELD_GROUPS, MCP_REQUIRED_FIELD_DEFS,
SETTINGS_KEY) — the UI lives in MCPSubmissionsTab.

* feat(mcp): add mcp_required_fields to ConfigGeneralSettings + config/list endpoint

Registers mcp_required_fields as a proper general_settings field so the UI
can read/write it via /config/list and /config/field/update without the
"Invalid field" error. Also fixes a pre-existing pyright None-check issue
in _sync_ui_settings_to_general_settings.

* ui(mcp): GitHub-style PR checks panel on submission cards

* ui: rename Team MCPs -> Submitted Tools, Team Guardrails -> Submitted Guardrails

* address greptile review feedback (greploop iteration 1)

* fix: inline import, add approval workflow tests, rename Submitted MCPs

* fix(mcp): allow re-approval of rejected MCP server submissions

* fix(mcp): evict rejected servers from runtime; enforce mcp_required_fields on /register

* fix(mcp): sort submissions newest-first; force active status on admin-created servers

* fix(mcp): add missing mock in test, show Approve for rejected, clear submission metadata, drop spurious Content-Type

* fix(mcp/ui): show Reject for active servers; show submit form to non-admins with team-key note

* fix(mcp): conditional reload on reject; view-only admin for submissions; block admin from /register

* fix(mcp): match auth_type required-field validation to UI compliance check (reject 'none')

* fix(mcp): block view-only admin from /register; log settings failure; warn on active server reject

* fix(mcp): allow view-only admin to use /register; add _validate_mcp_required_fields tests

* fix(mcp): validate field names in mcp_required_fields; surface backend error in submit UI

* fix(mcp): fix falsy field check; add field-name validation; add take limit; document server-managed fields; close dialog on error
2026-03-10 13:58:59 -07:00
..
policy_endpoints feat(policy): test playground for AI policy suggestions (#21608) 2026-02-19 14:09:20 -08:00
scim fix: handle deprovisioning operations without path field (#21571) 2026-02-19 11:09:04 -08:00
search_endpoints masking sensitive values 2026-02-03 16:09:37 -08:00
usage_endpoints [Feat] UI - Allow using AI to understand Usage patterns (#22042) 2026-02-24 16:40:04 -08:00
test_access_group_endpoints.py fix: normalize null list fields to [] in update_data before DB write 2026-02-26 20:53:30 -08:00
test_access_group_management.py fix(proxy): add model_ids param to access group endpoints for precise deployment tagging (#21655) 2026-02-21 00:39:57 -08:00
test_budget_endpoints.py [Release - 02/10/2026] v1.81.10-nightly 2026-02-10 16:26:30 -08:00
test_cache_settings_endpoints.py [Feat] UI - Allow setting cache settings on UI (#16143) 2025-10-31 17:43:59 -07:00
test_callback_management_endpoints.py [Feat] AI Gateway Auth - Allow using JWTs for signing in with Proxy CLI (#16756) 2025-11-17 19:47:29 -08:00
test_common_daily_activity.py added comments 2026-03-10 13:56:15 -04:00
test_common_utils.py allow team and org admins to call invitation/new 2026-02-11 11:23:27 -08:00
test_compliance_endpoints.py Add compliance checker endpoints + UI panel (#21432) 2026-02-17 18:22:26 -08:00
test_config_override_endpoints.py feat: Hashicorp Vault config override backend endpoints 2026-03-05 16:57:08 -08:00
test_cost_tracking_settings.py fix: resolve base_model in /cost/estimate for Azure custom deployments (#22724) 2026-03-03 15:43:02 -08:00
test_customer_budget.py test(customer): add unit tests for customer budget update functionality 2025-07-30 17:01:18 +00:00
test_customer_endpoints.py Adding tests 2025-12-04 12:36:15 -08:00
test_delete_callbacks_endpoint.py test_delete_callbacks_in_db 2025-11-08 14:05:44 -08:00
test_delete_verification_tokens_failed.py fix(key management): populate failed_tokens for admin partial-delete path 2026-02-19 19:28:03 -03:00
test_entraid_app_roles.py fix: app_roles missing from jwt payload (#16448) 2025-11-12 12:07:04 -08:00
test_internal_user_endpoints.py fix fkey violation on deleting user (#23115) 2026-03-09 08:53:11 -07:00
test_key_management_endpoints.py fix: regression test 2026-03-07 16:40:29 -08:00
test_mcp_management_endpoints.py feat(mcp): BYOM — non-admin MCP server submission + admin review workflow (#23205) 2026-03-10 13:58:59 -07:00
test_model_management_endpoints.py Fix: Make PATCH /model/{model_id}/update handle team_id consistently with POST /model/new (#15297) 2025-10-07 14:04:08 -07:00
test_org_admin_team_access.py feat: org admin access to team management — backend auth, UI visibility, tests 2026-03-07 22:43:09 -08:00
test_organization_endpoints.py feat: expose user_email in organization members response 2026-02-20 21:41:53 -08:00
test_policy_endpoints.py feat: AI policy template suggestions (#21589) 2026-02-19 12:00:26 -08:00
test_router_settings_endpoints.py New endpoint for router fields + react query 2026-01-09 16:49:22 -08:00
test_tag_management_endpoints.py Fix tag management to preserve encrypted fields in litellm_params (#17484) 2025-12-18 02:28:39 +05:30
test_team_endpoints.py fix: repair test regressions from org admin auth changes 2026-03-07 23:10:53 -08:00
test_tool_management_endpoints.py Fix tool management tests using wrong field name call_policy 2026-03-04 11:20:17 -03:00
test_ui_sso.py chore: resolve merge conflict with main 2026-02-19 01:46:13 -03:00