Skip to content

Conversation

Rienkim
Copy link

@Rienkim Rienkim commented Oct 18, 2025

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.

@rekram1-node
Copy link
Collaborator

rekram1-node commented Oct 20, 2025

@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(),
Copy link
Collaborator

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

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(),
Copy link
Collaborator

@rekram1-node rekram1-node Oct 20, 2025

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(),

Copy link
Collaborator

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

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