[FEATURE] A configuration is required to block access to specific mcp on the subagent.

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened Nov 20, 2025 · closed Nov 25, 2025

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When mcp is loaded, token usage increases by default, currently you can load all mcps by default or select only specific mcps, but it would be nice to add a setting to block access.

  1. Allow all MCP tools (default)

---
name: github-expert
description: GitHub Task Expert

Omit the tools field → All MCP tools + default tools are available

---

  1. Allow only specific MCP tools

---
name: github-expert
description: GitHub Task Expert
tools: Read, Write, mcp__github__search_repositories, mcp__github__get_repo
---

Proposed Solution

Disallow use of specific MCP tools

---
name: github-expert
description: GitHub expert
tools: Read
tools-deny: Write
---

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

Configuration and settings

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

3 Comments

github-actions[bot] · 10 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/6005
  2. https://github.com/anthropics/claude-code/issues/6587
  3. https://github.com/anthropics/claude-code/issues/6915

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

roddutra · 10 months ago

+1

@angrycoder if it is of interest until this gets added to Claude Code, I built a gateway that allows you to do exactly this and define which agent or subagent can use which MCP and individual tools, plus it preserves context by making them load the definitions on-demand only when needed. Here's the repo in case you want to give it a try: https://github.com/roddutra/agent-mcp-gateway

github-actions[bot] · 10 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.