[BUG] MCP OAuth: DCR client_name "Claude Code (<server>)" is rejected by servers that validate RFC 7591 metadata strictly (Calendly MCP → 400 invalid_client_metadata); recurrence of #59445 / #73293, still present in 2.1.271
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Summary
Adding a remote HTTP MCP server that requires Dynamic Client Registration fails at the registration step because Claude Code sends client_name as Claude Code (<serverName>). Servers that restrict client_name to alphanumerics, hyphens and spaces reject the parentheses. Calendly's MCP server is one such server, and it is DCR-only (its docs state that console-issued client credentials are not supported), so there is no supported path to connect it from Claude Code today.
This is the same defect as #59445 (May) and #73293 (July, "recurrence"). Both were closed by the inactivity bot without a maintainer response, the latter on 2026-09-04. It is still reproducible on 2.1.271. #74768 shows the same shape from Claude Desktop ("Claude Desktop (...)" rejected by Figma's registration endpoint), so it is not Calendly-specific.
---
Environment
Windows 11 Pro 26200; Claude Code CLI 2.1.271 (standalone, outside the Desktop app); server added with --scope user.
What Should Happen?
Expected
Registration succeeds. Per the earlier reports, the identical request with "client_name":"Claude Code calendly" (no parentheses) registers successfully, so the value is the only blocker.
Error Messages/Logs
HTTP 400 with body: `{"error":"invalid_client_metadata","errors":{"name":["may only contain alphanumeric characters, hyphens, and spaces."]}}`
Steps to Reproduce
Steps to reproduce
claude mcp add --transport http --scope user calendly https://mcp.calendly.comclaude mcp login calendly(or/mcp→ authenticate)- Registration request to Calendly's DCR endpoint is rejected before the browser opens.
Claude Model
Not sure / Multiple models
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.271
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
Suggested fix (any one of these would unblock)
- Change the default
client_nameto a value that satisfies the common strict validators, e.g.Claude Code - <serverName>orClaude Code <serverName>. RFC 7591 leaves the charset to the server, and "alphanumerics, hyphen, space" is a common conservative rule. - On
400 invalid_client_metadata, retry once with a sanitizedclient_name(strip everything outside[A-Za-z0-9 -]). - Add a
--client-nameoption (orclientNamein the server entry) so users can set it explicitly.
---
Why the documented alternatives do not help--client-id / --client-secret pre-registration: Calendly's MCP docs say DCR is required and portal-issued client IDs are not supported for the MCP endpoint; the MCP scopes are attached server-side to DCR-created clients only. A portal app with the https://localhost/ redirect was tried here and fails downstream with an invalid-scope error, consistent with the docs.
There is no --client-name flag or client-metadata override in claude mcp add, and none in settings, so the value cannot be changed by the user.
The claude.ai custom-connector path works for Calendly, but for Desktop Code-tab users it is exposed to the schema-stripping-on-resume bug in #91589, which is why we moved every other connector to local user-scope HTTP servers. Calendly is the one server that cannot follow.
---
Notes
2.1.271's changelog entry about MCP OAuth client-registration handling (consent denial, redirect-URI reuse, concurrent writes) is about registration caching and does not change the client_name value; confirmed still failing on that build. Happy to test a build; the reproduction takes under a minute.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗