Skip to content

[BUG]: Denied MCP tools have their tool prompt in the context #6320

Closed as not planned

Description

@egalanos

I have the Sentry MCP server configured.

I have disabled a number of the tools:

    "deny": [
      "NotebookRead",
      "NotebookEdit",
      "mcp__ide__executeCode",
      "mcp__sentry__analyze_issue_with_seer",
      "mcp__sentry__create_team",
      "mcp__sentry__create_project",
      "mcp__sentry__update_project",
      "mcp__sentry__create_dsn"
    ]

The newly add /context command reveals that the denied MCP tools are still added to the context. The denied built-in tools are not added though.

Permanently denied MCP tools shouldn't be provided to Claude.

Activity

  1. github-actions commented on Aug 22, 2025

    @github-actions

    Found 1 possible duplicate issue:

    1. [BUG] Built-in tools + MCP descriptions load on first message causing 10-20k token overhead #3406

    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

  2. egalanos commented on Aug 22, 2025

    @egalanos
    Author

    The comment in the linked issue #3406 (comment) doesn't appear to be the case: tools in the deny list still have their tool prompt included in the context

  3. changed the title [-]Context request: Denied MCP tools should not be provided in the context[/-] [+][BUG]: Denied MCP tools have their tool prompt in the context[/+] on Aug 22, 2025
  4. ariccio commented on Nov 15, 2025

    @ariccio

    I am seeing signs of this too - claude code is reporting that it sees MCP server tools before I enable them?!

  5. github-actions commented on Dec 16, 2025

    @github-actions

    This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

  6. added
    autoclose
    on Dec 16, 2025
  7. github-actions commented on Jan 17, 2026

    @github-actions

    This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

  8. github-actions commented on Jan 24, 2026

    @github-actions

    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.

  9. locked as resolved and limited conversation to collaborators on Jan 24, 2026
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

    area:mcpautocloseenhancementperf:memory

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions