[Bug] ZCode spawning MCP in background
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
提交前确认 · Pre-submission checklist
- 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.
- 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category
性能 · Performance
涉及的 Agent 框架 · Agent framework
ZCode Agent(自研)
严重程度 · Severity
影响体验 · Major (功能可用但体验受损 / works but degraded)
复现频率 · Reproducibility
偶现 · Sometimes
问题描述 · Description
What Is Causing the High Usage?
1. Massive Multiplication of MCP (Model Context Protocol) Servers
ZCode (PID 46592, 43416, etc.) and the agent sessions have spawned duplicate suites of MCP servers for each open window or session. Each session runs its own copies of:
• chrome-devtools-mcp
• @playwright/mcp / playwright-mcp
• mcp-jenkins (via uv/python)
• mcp-search-console (via uv/python)
• analytics-mcp (via uv/python)
• @z_ai/mcp-server
• reddit-mcp-server
• ssh-mcp
• server-perplexity-ask
• mcp-server-sequential-thinking
Because multiple ZCode/agent sessions were opened, these servers accumulated to over 130 background tool instances, remaining resident in memory.
复现步骤 · Steps to reproduce
Open many zcode and some chat no longer use
期望表现 · Expected behavior
expect within 1 zcode should have 1 set mcp connections only. or at least for those opened but idle chat (during no quote), those mcp can be shutdown after certain period.
实际表现 · Actual behavior
wasting performance
ZCode 版本 · ZCode version
latest
设备 / 系统 / 浏览器 · Device / OS / Browser
Asus ProArt P16, Window
截图 / 录屏 / 日志 · Screenshots / Recordings / Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the ZCode MCP spawning and session-lifecycle entry points, then reproduce the problem by opening many ZCode sessions and leaving chats idle. Use process counts to verify whether duplicate MCP servers remain resident. Done means one MCP set per ZCode session, or idle chats shutting down their MCP servers after a defined period.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, python
- Domain
- ai, devtools, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100