建筑师MCP
具有上下文弹性的人工智能开发 -Claude代码压缩后永远不要失去上下文。
问题
当Claude Code压缩对话(以管理上下文长度)时,它会丢失:
- 你在做什么
- API密钥和凭据
- 项目状态和进度
- 最近的决定和背景
这意味着你必须重新解释一切。再一次。再一次。
解决方案
Architect MCP提供以下工具:
- 检测压实度 通过心跳监测
- 还原完整上下文 只需一个命令
- 跟踪项目进度 在任何会议中都能幸存下来
- 验证功能完成情况 具有结构化跟踪功能
安装
macOS/Linux(5分钟)
# 1. Clone this framework
git clone https://github.com/GreatLakeJosh/architect-mcp.git ~/Architect
cd ~/Architect
# 2. Install dependencies
npm install
# 3. Set up your configuration files
cp CLAUDE.md.template CLAUDE.md
cp CAPABILITIES.md.template CAPABILITIES.md
cp CREDENTIALS.md.template CREDENTIALS.md
cp projects.json.template projects.json
# 4. Add your API keys to CREDENTIALS.md
# Edit CREDENTIALS.md with your actual keys
# 5. Add the MCP to Claude Code
claude mcp add architect -- node ~/Architect/dist/index.js -e ARCHITECT_ROOT=~/Architect
# 6. Restart Claude Code or start a new session视窗(5分钟)
# 1. Clone this framework (in PowerShell or Command Prompt)
git clone https://github.com/GreatLakeJosh/architect-mcp.git %USERPROFILE%\Architect
cd %USERPROFILE%\Architect
# 2. Install dependencies
npm install
# 3. Set up your configuration files
copy CLAUDE.md.template CLAUDE.md
copy CAPABILITIES.md.template CAPABILITIES.md
copy CREDENTIALS.md.template CREDENTIALS.md
copy projects.json.template projects.json
# 4. Add your API keys to CREDENTIALS.md
notepad CREDENTIALS.md
# 5. Add the MCP to Claude Code
claude mcp add architect -- node %USERPROFILE%\Architect\dist\index.js -e ARCHITECT_ROOT=%USERPROFILE%\Architect
# 6. Restart Claude Code or start a new sessionWindows注意事项:
- 使用
%USERPROFILE%\Architect而不是~/Architect - 使用
copy而不是cp - 使用
notepad或VS代码来编辑文件 - MCP使用Node.js路径处理,可在Windows和macOS上运行
验证安装
在Claude Code中,说:“检查我的架构师健康状况”
你应该看到所有系统都通过了。
用法
创建项目
说:“创建一个名为MyApp的新项目,用于构建客户门户”
或者直接使用该工具:
Tool: init_project
Arguments: { "name": "MyApp", "description": "Customer portal application" }压实后
当克劳德失去上下文时(你会注意到它忘记了事情),只需说:
- “恢复我的上下文”
- “恢复myapp上下文”
- “我想你被压缩了,请恢复”
跟踪进度
"what's the status of myapp?"
"mark the auth feature as complete"
"what should I work on next?"工具参考
| 工具 | 说明 | 示例 |
|---|---|---|
restore_context | 压缩后恢复所有上下文 | { "project": "myapp" } |
check_heartbeat | 检测是否发生压实 | {} |
init_project | 创建新项目 | { "name": "App", "description": "..." } |
get_project_status | 查看项目完成百分比 | { "project": "myapp" } |
get_next_feature | 获取下一个要处理的任务 | { "project": "myapp" } |
track_feature | 将功能标记为已验证 | { "project": "myapp", "feature_id": "auth", "verified": true } |
health_check | 验证所有系统是否正常工作 | {} |
list_projects | 查看您的所有项目 | {} |
文件结构
设置后,您的Architect文件夹看起来像:
~/Architect/
├── CLAUDE.md # Instructions for Claude (auto-read)
├── CAPABILITIES.md # What systems you can access
├── CREDENTIALS.md # Your API keys (GITIGNORED!)
├── SYSTEM.md # Architecture documentation
├── projects.json # Project registry (auto-managed)
├── .claude_heartbeat.json # Compaction detection (auto-managed)
│
├── src/ # MCP server source
├── dist/ # MCP server compiled
│
├── _template/ # Template for new projects
│
└── MyProject/ # Your projects (created via init_project)
├── CLAUDE.md
├── features.json
└── progress.md运作原理
心跳检测
MCP会跟踪您上次交互的时间。如果超过30分钟没有心跳更新,则知道可能发生了压缩。
上下文恢复
restore_context 荷载:
- 总是:容量.md、信用.md、系统.md
- 如果指定了项目:{project}/CLAUDE.md,features.json,progress.md
这为克劳德提供了无缝继续所需的一切。
特征跟踪
每个项目都有 features.json 跟踪工作:
- 存在哪些特征
- 已完成(已验证)
- 特征之间的依赖关系
- 验证证明
get_next_feature 返回满足所有依赖关系的第一个未经验证的特性。
对于团队
每个团队成员:
- 将此仓库克隆到自己的文件夹中
- 设置他们自己的CREDENTIALS.md(使用他们自己的API密钥)
- 创建自己的项目
框架是共享的。证书和项目是单独的。
没有人看到其他人的API密钥或项目数据。
故障排除
“MCP未连接”
claude mcp list # Check if architect shows as connected
claude mcp remove architect # Remove and re-add if needed“未找到CREDENTIALS.md”
cp CREDENTIALS.md.template CREDENTIALS.md
# Then edit with your actual API keys“未找到项目”
# Check projects.json has your project listed
cat projects.json许可证
麻省理工学院
贡献
问题和PR欢迎!
