feat: 支持临时禁用单个 MCP 工具
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
**提交人**: fujiachao
**客户端版本**: 0.1.28
---
## 使用场景 / Use case
在使用 CINDY 的 MCP 工具列表时,用户可能希望在当前会话或一段时间内避免某个特定 MCP 工具被模型调用,例如:该工具暂时不可用、可能产生不希望的副作用、与其他工具结果冲突,或用户只想聚焦在一组工具上。
## 当前问题 / Current limitation
当前 MCP 工具列表缺少针对单个工具的启用/禁用控制。用户只能保留全部工具可用,或通过移除/修改 MCP 配置来避免调用;后者操作成本高,也不适合临时切换。
## 期望方案 / Proposed solution
在 MCP 工具列表中为每个工具增加独立的启用/禁用开关。被禁用的工具应在当前作用域内不再暴露给模型调用,界面保留该工具及禁用状态以便快速恢复。
默认保持现有行为(全部启用)。建议明确开关的作用域和持久化策略,例如仅当前会话、按对话持久化或全局持久化。
## 已考虑的替代方案 / Alternatives considered
- 直接删除或修改 MCP 配置:适合永久变更,不适合临时开关,恢复成本较高。
- 通过提示词要求模型不调用某工具:不能可靠保证工具不会被调用。
---
**版本区域**: CN
**OS**: win32 x64 (10.0.19045)
**界面语言**: zh-CN
Contributor guide
Research direction
Start by locating the MCP tool list and the path that exposes its tools to model calls. Confirm how the current list is rendered and where session or conversation state is held; define the scope and persistence behavior before implementing. Done means each tool shows a reversible state, disabled tools are not exposed within that scope, and existing all-enabled behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100