Skip to content

Empty string for tos_uri and logo_uri causing validation errors during DCR as of 1.17.4Β #940

@skray

Description

@skray

Describe the bug
Previously, if a client did not send a tos_uri or logo_uri in their Dynamic Client Registration request, clients using the MCP SDK accepted empty strings in the response of the registration call.

With #877 released in https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/1.17.5, empty strings are treated as "unsafe" in these fields, and cause DCR to fail.

To Reproduce
This can be replicated with the newest MCP inspector and the ActiveCampaign MCP server.

Steps to reproduce the behavior:

  1. Create a free trial ActiveCampaign account: https://www.activecampaign.com/free
  2. Start the latest MCP inspector (or any version >= 0.16.6, when this upstream change was pulled in)
  3. Try to connect to the ActiveCampaign MCP server
  4. See an error instead of successful DCR
Image

Expected behavior
The client registers a dynamic client successfully

Logs
Example error response:

 [ { "validation": "url", "code": "invalid_string", "message": "Invalid url", "path": [ "logo_uri" ] }, { "code": "custom", "message": "URL must be parseable", "fatal": true, "path": [ "logo_uri" ] }, { "validation": "url", "code": "invalid_string", "message": "Invalid url", "path": [ "tos_uri" ] }, { "code": "custom", "message": "URL must be parseable", "fatal": true, "path": [ "tos_uri" ] } ]

Additional context
I don't see any indication of why empty strings are being treated as potentially harmful in these cases - the issue and PR that initiated these changes were to make sure that authentication URLs did not try to execute javascript - #841

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions