Skip to content

Ability to restrict MCP tool use to subagent only #2277

Closed

Description

@garrett-hopper

Currently builtin tools (edit, bash, webfetch) can be disabled at the top-level using permissions. It would be useful to have the ability to do the same with MCP tools as well.
The primary use case is to disable large/complex MCP servers (Github MCP for example) from the top-level agent and restrict their use to a subagent.

Side note: permissions and tools seem to have some overlap, specifically for subagents? ("deny" in permissions would be the same as setting the "tools" entry to false, right?)

Activity

  1. github-actions commented on Aug 27, 2025

    @github-actions
    Contributor

    This issue might be related to existing issues. Please check:

    Feel free to ignore if none of these address your specific case of restricting MCP tools to subagent-only use.

  2. rekram1-node commented on Aug 27, 2025

    @rekram1-node
    Contributor

    @garrett-hopper
    You can do this already?

    At top level config set

    "tools": {
      "context7*": false
    }
    

    then for any agent definition set:

    "tools": {
      "context7*": true
    }
    
  3. rekram1-node commented on Aug 27, 2025

    @rekram1-node
    Contributor

    Side note: permissions and tools seem to have some overlap, specifically for subagents? ("deny" in permissions would be the same as setting the "tools" entry to false, right?)

    yes this is true and that's why they need to get merged soon

  4. garrett-hopper commented on Aug 27, 2025

    @garrett-hopper
    Author

    🤦 Not sure how I missed the ability to use tools at top level; thought it was subagent specific. Sorry for the noise.
    (Got it in my head that permissions was the only option and should somehow support MCP I think.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions