#24710 MCP UI: Edit Settings β Tool Configuration fails for OAuth2 M2M servers (credentials redacted)
## 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β¦