anthropics / anthropics/claude-ai-mcp
Deleting and re-adding a custom connector resurrects the old record with its original URL, ignoring the newly entered URL
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 471
- Fork
- 76
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### What happened?
## Summary
When a custom connector (remote MCP server) is deleted and then re-added, the backend resurrects the previously deleted record — same UUID, same original URL, same `created_at` — instead of creating a new record with the URL the user entered. If the original record had a broken URL (e.g. saved with uppercase from a mobile keyboard's auto-capitalization), the connector is permanently broken: no amount of deleting and carefully re-typing the URL fixes it.
## Steps to reproduce
1. Add a custom connector with URL `HTTPS://MCP.EXAMPLE.COM/MCP` (or any URL that later needs correcting).
2. Delete the connector (`DELETE /api/organizations/{org}/mcp/remote_servers/{uuid}` returns 204).
3. Re-add a custom connector with the corrected, lowercase URL `https://mcp.example.com/mcp` — typed manually, verified lowercase in the input field before submit.
4. Observe the created connector.
## Expected behavior
A new connector record is created with exactly the URL submitted.
## Actual behavior
The API returns **201 Created** but with the **old record**: identical UUID, the original (wrong) URL, and the original `created_at` timestamp. Reproduced three ways:
- typing the URL into the Add custom connector modal
- setting the input value programmatically (ruling out keyboard auto-capitalization)
- calling `POST /api/organizations/{org}/mcp/remote_servers` directly with a JSON body containing the lowercase URL — the response body still contained the uppercase URL and the UUID of the record deleted moments earlier, with `created_at` weeks in the past
Because many MCP servers route case-sensitively, the resurrected uppercase path returns 404 after OAuth completes, producing: "Your account was authorized, but no MCP server was found at the provided URL, or your account doesn't have access to it."
## Workaround
`PUT /api/organizations/{org}/mcp/remote_servers/{uuid}` with the corrected URL updates the record in place and fixes the connector immediately. There is no UI for editing a connector URL, so this is only reachable via the API.
## Impact
Users who ever saved a bad URL cannot self-recover through the UI. In this case it caused a ~3-week support escalation with the MCP server vendor (Higgsfield), who correctly diagnosed the case-sensitivity 404 but could not explain why the corrected URL never took effect.
## Suggestions
- On re-add, honor the submitted URL (update the resurrected record's URL, or create a truly new record).
- Add an Edit option for custom connector URLs in the UI (currently only Remove exists).
## Environment
- Claude.ai web (Chrome/Windows) and Claude Desktop, personal Pro/Plus account
- Endpoint observed: `POST /api/organizations/{org}/mcp/remote_servers`
- Error references from earlier attempts: ofid_f38dce7b05145c9a, ofid_e01a6cdb38bb6c65 (and others available on request)
### What did you expect to happen?
Re-adding a custom connector after deleting it should create (or update to) a record with exactly the URL the user submitted. Instead, the old deleted record is silently restored with its original broken URL, so the user's correction never takes effect and the connector keeps failing with "no MCP server was found at the provided URL" after successful OAuth.
### Steps to reproduce
1. Add a custom connector whose URL contains a mistake (e.g. uppercase path: HTTPS://MCP.HIGGSFIELD.AI/MCP).
2. Remove the connector via Customize -> Connectors -> ... -> Remove (DELETE returns 204).
3. Add a new custom connector and carefully type the corrected lowercase URL (https://mcp.higgsfield.ai/mcp). Verify the input field contains the lowercase URL before submitting.
4. Save and inspect the connector (UI display, or GET /api/organizations/{org}/mcp/v2/bootstrap).
5. The stored URL is the ORIGINAL uppercase one, the UUID matches the record deleted in step 2, and created_at predates step 3. Connecting fails post-OAuth with "no MCP server was found at the provided URL". Also reproducible by calling POST /api/organizations/{org}/mcp/remote_servers directly with a lowercase URL in the JSON body — the 201 response echoes back the old uppercase URL and old UUID.
### Area
MCP Connector (adding/managing servers)
### MCP Server (if applicable)
Higgsfield (custom remote server, https://mcp.higgsfield.ai/mcp)
### Error messages or logs
```shell
```
### Additional context
_No response_
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.