[FEATURE] Allow hiding MCP tools from slash command preview without disabling them
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 configuring MCP servers with many tools (e.g., next-devtools, context7), the / slash command preview becomes cluttered with MCP tool entries. These entries often have long descriptions that push skills and built-in commands out of view.
The problem scales with the number of MCP servers configured. With as little as 1 server, the preview can fill up so much precious space.
<img width="1180" height="486" alt="Image" src="https://github.com/user-attachments/assets/97e62f4f-d114-43dc-9ecd-5b96658663df" />
MCP tools remain fully usable via MCPSearch -- the preview clutter is purely a UI discoverability issue. I want certain MCP tools hidden from the autocomplete while keeping them available for Claude to use through the normal MCPSearch flow.
Currently there is no way to control this. The isHidden property on MCP tool command objects is hardcoded to false during registration, with no settings-based override. Every other command type (skills, plugins) has at least some mechanism to control preview visibility.
Proposed Solution
Add a new hiddenMcpTools setting (in settings.json at any scope) that accepts glob patterns for MCP tool names:
{
"hiddenMcpTools": [
"mcp__next-devtools__*",
"mcp__context7__resolve-library-id"
]
}
When an MCP tool name matches a pattern in this list, set isHidden: true on its command object during registration. The tool:
- Disappears from the
/preview autocomplete - Remains fully functional via MCPSearch (Claude can still discover and use it)
- Remains invocable if the user types the full tool name
This mirrors how user-invocable: false works for skills -- hidden from the menu, still available to Claude.
Alternative: Extend the existing disallowedTools setting with a hidden: prefix (e.g., "hidden:mcp__next-devtools__*") that sets isHidden instead of blocking the tool entirely. This avoids adding a new top-level setting.
Alternative Solutions
| Workaround | What it does | Why it falls short |
|:-----------|:-------------|:-------------------|
| /mcp disable <server> | Removes server from commands entirely | Tools become completely unavailable, not just hidden from preview. Added in response to #1774 -- great for toggling servers, but too coarse for per-tool preview control. |
| disallowedTools setting | Blocks tool execution | Tool becomes unusable by Claude. Also, disallowedTools only filters the tool execution pipeline -- it does not affect the / preview at all (these are separate code paths). |
| MCPSearch auto-mode | Defers tool descriptions from context when >10% of context window | Reduces context usage but has zero effect on the / preview population. The preview is populated from the command array, not from context. |
| ENABLE_TOOL_SEARCH=true env var | Enables tool search mode (tst), deferring MCP tool descriptions from context. Tools discovered via MCPSearch instead of being loaded upfront. | Reduces context/token usage (good for cost), but has zero effect on the / preview. The command array still contains all MCP tools with isHidden: false. This is already the default for internal MCP mode. |
| ENABLE_EXPERIMENTAL_MCP_CLI=false env var | Forces "standard" mode for external MCP servers (disables experimental mcp-cli bash interface). | Does not affect the / preview at all. When ENABLE_TOOL_SEARCH=true is also set, this var is redundant since tool search takes precedence. Setting it to false without ENABLE_TOOL_SEARCH actually loads all tools into context (worse for token usage). |
None of these provide "hide from preview but keep functional" behavior.
Note on environment variables: The runtime has three MCP modes controlled by ENABLE_TOOL_SEARCH and ENABLE_EXPERIMENTAL_MCP_CLI:
| Mode | Internal env var | External env var | Effect |
|:-----|:-----------------|:-----------------|:-------|
| tst (Tool Search) | ENABLE_TOOL_SEARCH=true | ENABLE_TOOL_SEARCH=true | Tools deferred, discovered via MCPSearch. Default for internal MCP. |
| mcp-cli | ENABLE_MCP_CLI=true | ENABLE_EXPERIMENTAL_MCP_CLI=true | Experimental: MCP tools invoked via mcp-cli call server/tool bash commands instead of tool-use API. |
| standard | ENABLE_MCP_CLI=false or ENABLE_TOOL_SEARCH=false | ENABLE_EXPERIMENTAL_MCP_CLI=false or ENABLE_TOOL_SEARCH=false | All tools loaded into context directly. |
All three modes populate the same command array with isHidden: false for MCP tools. None affects the / preview.
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
- I have
next-devtools(7 tools),context7(3 tools), and a custom MCP server (4 tools) configured - I type
/to find my project skill/generate-natspec-comments - The preview shows 14 MCP tool entries with long descriptions, pushing
/generate-natspec-commentsbelow the visible area - I have to scroll past MCP entries I rarely invoke directly (they are used by Claude, rarely by myself)
- With
hiddenMcpTools, I would add"mcp__next-devtools__*"or"mcp__context7__*"to the setting - The
/preview would show only my skills and the few MCP tools I prefer to invoke manually - Claude can still discover and use all hidden tools via MCPSearch -- no functionality lost
Additional Context
Technical context from binary analysis:
MCP tools are registered as command objects with isHidden: false hardcoded:
// MCP tool registration
{
type: "prompt",
name: "mcp__" + serverName + "__" + toolName,
description: toolDescription,
isEnabled: () => true,
isHidden: false, // hardcoded, no override
isMcp: true,
}
The slash command preview filters on !cmd.isHidden:
function hLB(userInput, allCommands) {
return allCommands.filter(cmd => !cmd.isHidden)
.sort(/* by source type */)
.map(cmd => ILB(cmd));
}
Skills already support this via user-invocable: false frontmatter, which sets isHidden: !userInvocable. MCP tools are the only command type with no visibility override.
isHidden coverage across command types:
| Command type | isHidden | Configurable? |
|:-------------|:-----------|:--------------|
| Built-in commands | false (hardcoded) | No |
| MCP tools | false (hardcoded) | No -- this is the gap |
| Skills (SKILL.md) | !userInvocable (frontmatter) | Yes |
| Plugin commands | Variable (plugin config) | Yes |
Related issues:
- #14256 -- Similar goal (hide MCP tools) but targets the model's tool access, not the
/preview UI - #1774 -- Added
/mcp enable/disable(server-level toggle). This request is for per-tool preview visibility without disabling - #20619 -- Requests minimizing MCP tool output display, different surface area
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗