anthropics / anthropics/claude-code
[BUG] MCP tool schemas still consuming context tokens after all connectors disabled
- 主要言語
- Python
- スター
- 145k
- フォーク
- 23.1k
- PR マージ指標
- PR 指標を取得中
説明
### Preflight Checklist
- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
### What's Wrong?
After fully disabling/removing all connectors (Claude in Chrome, GitHub Integration, Higgsfield, Vercel) in Settings → Connectors, then fully quitting (Cmd+Q) and relaunching the desktop app and starting a brand-new conversation, `/context` still reports MCP tools consuming 12.7k tokens (12.7% of the 93k/100k window). Expected value is 0 tokens once every connector is disabled.
**Full context breakdown observed** (93k/100k window, 93% full):
| Category | Tokens | % of window |
|---|---|---|
| Autocompact buffer | 33k | 33.0% |
| System tools | 23.8k | 23.8% |
| MCP tools (loaded/active) | 12.7k | 12.7% |
| System prompt | 11.6k | 11.6% |
| Free space | 7k | 7.0% |
| Memory files | 6.4k | 6.4% |
| Skills | 5.5k | 5.5% |
| Messages | 8 | 0.0% |
Not part of the 100% above, shown separately as not-yet-loaded:
- MCP tools deferred: 26.9k tokens
- System tools deferred: 16.7k tokens
- 71 = total tool definitions across all connectors (loaded + deferred)
- 2 = memory files loaded
**Steps to reproduce**
1. Disable/remove every connector in Settings → Connectors.
2. Fully quit (Cmd+Q) and relaunch the app.
3. Start a brand-new conversation, run `/context`.
4. MCP tools (active) still shows 12.7k tokens instead of 0.
**Expected behavior**
With zero connectors enabled, MCP tools (active) should show 0 tokens.
**Environment**
- OS: macOS (Darwin 25.6.0)
- App: Claude desktop app
- Account: abeltransmu@hotmail.com
Submit at https://github.com/anthropics/claude-code/issues → New issue. Attach a screenshot of /context and the Connectors settings page if you can.
### What Should Happen?
According to Claude helping. With all connectors disabled, there shouldn't be little token usage. Similar to what is experienced in the CLI terminal. There are no plugins/connectors. And Claude's diagnostics identifies Github as the potential source.
### Error Messages/Logs
```shell
```
### Steps to Reproduce
1. Disable/remove every connector in Settings → Connectors (Claude in Chrome, GitHub Integration, Higgsfield, Vercel).
2. Fully quit the desktop app (Cmd+Q) and relaunch it.
3. Start a brand-new conversation.
4. Run /context.
5. Observe: MCP tools (active) still shows 12.7k tokens (12.7%) instead of 0.
### Claude Model
Sonnet (default)
### Is this a regression?
I don't know
### Last Working Version
_No response_
### Claude Code Version
2.1.261
### Platform
Anthropic API
### Operating System
macOS
### Terminal/Shell
Terminal.app (macOS)
### Additional Information
_No response_
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Reproduce the report by disabling every connector in Settings → Connectors, restarting the macOS desktop app, starting a new conversation, and running /context. Compare the active and deferred MCP tool counts with the expected zero active tokens; done means /context reports no active MCP tool tokens when no connectors are enabled.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- macos
- 領域
- desktop
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100