Skip to content

Removed URI restriction from roots.mdx#507

Closed
noctonic wants to merge 3 commits into
modelcontextprotocol:mainfrom
noctonic:Remove-URI-restriction-from-roots
Closed

Removed URI restriction from roots.mdx#507
noctonic wants to merge 3 commits into
modelcontextprotocol:mainfrom
noctonic:Remove-URI-restriction-from-roots

Conversation

@noctonic

Copy link
Copy Markdown

This change removes the restriction that root URIs MUST be file://

Motivation and Context

Forcing the use of file:// arbitrarily limits the utility of roots and ultimately reduces the likelihood that hosts will adopt and support all MCP client and server capabilities. Additionally concepts/roots shows https:// as an example root. This is misleading and disappointing for developers. See Issue 505

How Has This Been Tested?

Some server and client implementations currently reject any URI other than file:// to align with March 2025 specification.

Breaking Changes

If a server is blindly assuming that a URI is file:// then they should add a validation step. If a server or client is rejecting all URIs other than file:// they should instead verify that the URI is RFC3986 compliant.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@evalstate

Copy link
Copy Markdown
Member

Hi @noctonic -- might be worth updating the text within the schema here is as well:

export interface Root {
/**
* The URI identifying the root. This *must* start with file:// for now.
* This restriction may be relaxed in future versions of the protocol to allow
* other URI schemes.
*
* @format uri
.

I can see @olaservo has already linked the issue to the CWG, I'm wondering if it is worth considering this proposal alongside some of the other discussions we've been having on resources too:

Github Discussion

@noctonic

Copy link
Copy Markdown
Author

Agreed. Updated.

@noctonic noctonic force-pushed the Remove-URI-restriction-from-roots branch from f667927 to 6acdb47 Compare May 13, 2025 01:04
@olaservo

Copy link
Copy Markdown
Member

Hi @noctonic , are you still interested in making this update? I agree it doesn't make sense to restrict Roots to local files, since things like cloud storage buckets or REST API namespaces could also be scoped using Roots, among many other things.

Plus the longer the spec exists in its current limited form, as more servers/clients start to use Roots they will just assume Roots represent local filesystems only (like you originally called out in this PR).

There is now a new (hopefully clearer and more consistent) process for proposing changes, so if you'd still like to pursue this please take a look at the new guidelines: https://modelcontextprotocol.io/community/sep-guidelines and I would be happy to help sponsor this. Thanks!

@noctonic

Copy link
Copy Markdown
Author

@olaservo I don't have time right now to be involved so if anyone else want to take the lead, please do. I still believe this is an important change.

@noctonic noctonic closed this Jul 27, 2025
@noctonic noctonic deleted the Remove-URI-restriction-from-roots branch February 13, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants