I'm running into this issue again:
Dart-Code/Dart-Code#5847 microsoft/vscode#284024
Can you please check any relevant logs or state concerning VS Code and try to figure out what happened?
Write a Markdown report with your findings.
Date: January 23, 2026
Issue: Tools from contributed MCP server appear many times in the tools list
Related Issues:
Your screenshot shows 1704 tools enabled with a warning that "You may experience degraded tool calling above 128 tools." This is the known issue where the Dart SDK MCP Server tools are being registered multiple times (82× based on the numbered tools like mcp_dart_sdk_mcp_81_*).
| Metric | Value |
|---|---|
| VS Code Version | 1.108.1 |
| Dart Extension | dart-code.dart-code-3.126.0 |
| Flutter Extension | dart-code.flutter-3.126.0 |
| Running MCP Servers | 0 (currently no mcp-server processes) |
| Workspace Storage Directories | 109 |
Global Cache (~/Library/Application Support/Code/User/globalStorage/state.vscdb):
mcpToolCache: 3,686 bytes - looks normal- Contains only 1 server entry (Context7 with 2 tools)
- No Dart MCP entries in global cache (expected - they're per-workspace)
Workspace Caches examined:
- ~50 workspace storage directories have Dart MCP entries
- Sample workspace cache: 27,356 bytes with 17 Dart tools + 12 Pylance tools = 29 total tools (normal)
At the time of investigation, all MCP caches appear normal:
- Each workspace has 1 Dart MCP Server entry with 17 tools
- Each workspace has 1 Pylance MCP Server entry with 12 tools
- No duplicated entries found in any cache
The Pylance MCP server logs show repeated connection errors:
Error reading from async stream, we will reconnect: TypeError: terminated
These errors occur every ~5 minutes during idle periods but appear to reconnect successfully.
The Dart MCP Server log files are empty (0 bytes) in recent sessions.
Based on the GitHub issue discussion:
- This is a VS Code bug, not a Dart extension bug
- The issue occurs when MCP server tools are cached multiple times despite the server only being registered once
- The Dart extension uses
McpServerDefinitionProviderwhich is properly disposed - The bug is intermittent and difficult to reproduce
- VS Code team has assigned this to the January 2026 milestone for fixing
Based on the discussion and your setup:
- Multi-window VS Code sessions - you have
frontend_flutternested insidebackend_fastapi - Extension restarts or crashes - historical analysis server issues
- Long-running VS Code sessions without restarts
- Sleep/wake cycles on macOS
- Run VS Code command: "MCP: Clear Tool Cache"
- Restart VS Code completely
- If needed, disable and re-enable the Dart MCP Server in settings
- Periodically restart VS Code (especially after sleep/wake cycles)
- Keep VS Code and extensions updated - a fix is in progress
- Monitor the tool count in the Configure Tools dialog
Add to your VS Code settings.json to limit tools:
{
"chat.mcp.discovery.enabled": false // Disable auto-discovery if you don't need it
}Or selectively disable MCP servers you don't actively use in the Configure Tools UI.
| Type | Path |
|---|---|
| Global Config | ~/Library/Application Support/Code/User/mcp.json |
| Global State | ~/Library/Application Support/Code/User/globalStorage/state.vscdb |
| Workspace State | ~/Library/Application Support/Code/User/workspaceStorage/*/state.vscdb |
| MCP Logs | ~/Library/Application Support/Code/logs/*/window*/mcpServer.*.log |
-- List MCP-related keys
SELECT key FROM ItemTable WHERE key LIKE '%mcp%';
-- Results: mcpInputs, mcpToolCache, mcp.extCachedServers- Report back to the GitHub issue with updated findings if the problem recurs
- Capture the
code --status | grep mcpoutput when the issue is active - Run "MCP: List servers" command when seeing duplicates to capture the server state
- Consider using separate VS Code windows for backend_fastapi and frontend_flutter instead of nesting
- Issue is acknowledged by VS Code team
- Milestone: January 2026 (current month)
- Assignee: @connor4312 at Microsoft
- No action required from you until fix is released
The issue is intermittent and self-resolves after VS Code restart. Continue monitoring and report any additional patterns you observe to the GitHub issue.