Is your feature request related to a problem? Please describe.
The protocol allows support for roots, which generally are permission boundaries.
Roots allow servers to ask for specific directories or files to operate on.
The implication to me is that if a root is directory, all sub-directories and files are implicitly included. But the client may prefer to expose some sub-directories and not others. This is not supported by the current schema, as far as I can tell. I propose introducing the notion of a RootsTemplate (a la ResourceTemplate), which would allow more flexibility in declaring what parts of the filesystem to expose to the server.
Describe the solution you'd like
My first thought is that this ought to be something glob-like, or an array of globs, which would include support for the "exclude"/"negation" "operator" (!) such as used in .gitignore, etc.
Example responses to "roots/list":
/Users/me/my-mcp-project (Unrestricted access to my-mcp-project and any descendants)
/Users/me/my-* (/Users/me/my-mcp-project is a root; /Users/me/your-mcp-project is not a root)
- [
/Users/me, !/Users/me/your-stuff] (/Users/me/my-stuff is a root; /Users/me/your-stuff is not a root.)
Describe alternatives you've considered
- Don't provide support for this - a root sort of implies "full access" to what's under it, I guess...
- Regular expressions(?) but this seems worse than glob syntax.
- Use a template resolution callback, which I think is what ResourceTemplates do.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
The protocol allows support for roots, which generally are permission boundaries.
The implication to me is that if a root is directory, all sub-directories and files are implicitly included. But the client may prefer to expose some sub-directories and not others. This is not supported by the current schema, as far as I can tell. I propose introducing the notion of a RootsTemplate (a la ResourceTemplate), which would allow more flexibility in declaring what parts of the filesystem to expose to the server.
Describe the solution you'd like
My first thought is that this ought to be something glob-like, or an array of globs, which would include support for the "exclude"/"negation" "operator" (
!) such as used in.gitignore, etc.Example responses to "roots/list":
/Users/me/my-mcp-project(Unrestricted access tomy-mcp-projectand any descendants)/Users/me/my-*(/Users/me/my-mcp-projectis a root;/Users/me/your-mcp-projectis not a root)/Users/me,!/Users/me/your-stuff] (/Users/me/my-stuffis a root;/Users/me/your-stuffis not a root.)Describe alternatives you've considered
Additional context
Add any other context or screenshots about the feature request here.