Updated ECC notes to match the current state of affaan-m/everything-claude-code docs/token-optimization.md and docs/SKILL-PLACEMENT-POLICY.md: - Drop CLAUDE_AUTOCOMPACT_PCT_OVERRIDE recommendations (now warned against upstream — variable can only lower threshold, opposite of intent) - Add CLAUDE_CODE_SUBAGENT_MODEL=haiku as the new core token-saving setting - Flag the default `memory` MCP for disablement (no skill/agent/hook references) - Add Skill Placement Policy section (curated/learned/imported/evolved + provenance) - Cover missing commands: /checkpoint, /sessions, /security-scan, /claw, /projects Add new resource: ECC 编排实战手册.md (721 lines). Six orchestration patterns (dmux+worktree, sequential claude -p, continuous-claude, Ralphinho RFC-DAG, santa-loop, Task in-process) with real commands, real plan.json structures, real CLI flags, and explicit "could not verify online" markers for /multi-* and /feature-dev. All sourced to specific commands/*.md or skills/*.md files. Cross-link the new manual from 完整指南 and 用法速查.
31 lines
1.1 KiB
Markdown
31 lines
1.1 KiB
Markdown
---
|
||
created: "2026-03-19 12:02"
|
||
type: zettel
|
||
tags: [zettel, claude-code, context-window, performance, mcp]
|
||
source: "https://github.com/affaan-m/everything-claude-code"
|
||
---
|
||
|
||
# MCP 数量与上下文窗口的反比关系
|
||
|
||
每个启用的 MCP Server 都会占用上下文窗口空间(工具定义、schema 描述等)。实测数据:
|
||
|
||
- 0-5 个 MCP: 有效上下文接近 200K tokens
|
||
- 10+ 个 MCP: 有效上下文降至 ~70K tokens(降幅 65%)
|
||
|
||
**最佳实践**:
|
||
- 活跃 MCP <= 10 个,活跃工具总数 <= 80 个
|
||
- 用 `disabledMcpServers` 动态禁用不用的
|
||
- **默认安装的 `memory` MCP 没有任何 skill/agent/hook 引用 → 优先关掉**(仓库 `docs/token-optimization.md` 明确建议)
|
||
- 重操作优先用 CLI(如 `gh`、`aws`)而不是 MCP wrapper
|
||
- 使用 `llms.txt` 模式获取文档,避免 MCP 常驻开销
|
||
|
||
这是 Claude Code 性能优化中**最重要的单一因素** — 比任何 Agent 或 Skill 都重要。
|
||
|
||
---
|
||
|
||
## Related
|
||
|
||
- [[Everything Claude Code 完整指南]]
|
||
- [[Everything Claude Code 方法论与最佳实践]]
|
||
- [[Hook驱动优于提示词驱动]]
|