-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -323,6 +323,7 @@ export namespace Config { | |
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(), | ||
}) | ||
.optional(), | ||
}) | ||
|
@@ -554,6 +555,7 @@ export namespace Config { | |
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 commentThe 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: That way permissions function similar to tools: There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
}) | ||
.optional(), | ||
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.
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