-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Feat: Add MCP permission config #3258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
@Rienkim we are going to merge tools + permissions together so all of this will change soon. I will add a note here tho, don't feel pressured to update pr tho |
edit: Config.Permission, | ||
bash: z.record(z.string(), Config.Permission), | ||
webfetch: Config.Permission.optional(), | ||
mcp: z.record(z.string(), Config.Permission).optional(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of "mcp" i think permissions need to handle wildcards exactly like tools, so instead of introducing an mcp object it would just be handle the "" or "context7" wildcards and enforce the permissions accordingly much like tools
1ba4c14
to
aad3d11
Compare
edit: Permission.optional(), | ||
bash: z.union([Permission, z.record(z.string(), Permission)]).optional(), | ||
webfetch: Permission.optional(), | ||
mcp: z.union([Permission, z.record(z.string(), Permission)]).optional(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry if i wasnt being clear :)
What i was saying was that instead of adding "mcp" here, you could add a catchall(...) in here:
permission: z
.object({
edit: Permission.optional(),
bash: z.union([Permission, z.record(z.string(), Permission)]).optional(),
webfetch: Permission.optional(),
})
.optional(),
That way permissions function similar to tools:
tools: z.record(z.string(), z.boolean()).optional(),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because mcp things are same as any other tool, there are also custom tools, etc
Below issues mention MCP permission config.
#2748
#2899
If you are working on a fundamental design change that includes this feature, please close this issue.