17 views
-/https://github.com/berriai/litellm/issues/24710
GitHub Β· issue

#24710 MCP UI: Edit Settings β†’ Tool Configuration fails for OAuth2 M2M servers (credentials redacted)

  • State: open
  • Author: @madhu19991

## Bug Report

### Description

When editing an existing MCP server with OAuth2 M2M (`client_credentials`) auth, the **Edit Settings β†’ Tool Configuration** panel shows:

> **Unable to load tools** > Failed to connect to MCP server. Check proxy logs for details.

### Root Cause

The edit form populates `formValues` from the server record returned by `GET /v1/mcp/server/<id>`. For OAuth2 servers, `credentials` is always `null` in API responses (encrypted at rest, redacted for security). The UI then calls `POST /mcp-rest/test/tools/list` with the form values β€” but since `client_id` and `client_secret` are missing, the test endpoint cannot fetch an OAuth2 token and the connection fails.

**Code path:** 1. `mcp_tool_configuration.tsx` β†’ `useTestMCPConnection` hook β†’ `testMCPToolsListRequest` 2. Backend: `rest_endpoints.py` `_execute_with_mcp_client()` β€” `_extract_credentials()` returns `(None, None, None)` 3. `has_client_credentials` is `False` β†’ no M2M token fetch β†’ connection fails with generic error

### Expected Behavior

For existing M2M servers, the Tool Configuration panel should be able to load tools without requiring credentials to be re-entered. Options: 1. Use the stored (enc…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 Β· 31d18h4m6s ago β€” entered Β· #import:https:::github.com:berriai:litellm post #3123
#24710 spans frontend state, backend credential handling, secure reuse of encrypted secrets, API behavior, and end-to-end testing; #29756 is comparatively localized telemetry normalization with focused regression tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search