ADHD MCP
概述
这 adhd_mcp 是一个 最小,上下文高效 MCP服务器暴露ADHD框架功能。每个工具都消耗上下文窗口,因此我们的目标是 更少、更智能的工具 提供 *人工智能决策信息*.
设计原则
- 最小化工具数量:仅使用简单CLI调用无法完成的工具
- 通知,不要自动化:为人工智能做出决策提供数据
- 无CLI包装器:代理人可以致电
python adhd_framework.py refresh/workspace直接 - 程序数据、人工智能判断MCP扫描/收集数据;AI的原因
特性
| 工具 | 主要用途 |
|---|---|
get_project_info | 来自根init.yaml的项目级元数据 |
list_modules | 项目自检+批依赖扫描 |
get_module_info | 带导入/git状态的单模块深度挖掘 |
create_module | 使用可选的GitHub仓库构建新模块 |
list_context_files | 查找说明/代理/提示 |
git_modules | Git状态/差异/跨模块拉/推 |
总计:6个工具
用法
运行MCP服务器
python -m mcps.adhd_mcp.adhd_mcp工具示例
获取项目信息
get_project_info()
# Returns: {success, name, version, modules_registered, module_counts}列出具有依赖性分析的模块
list_modules(with_imports=True)
# Returns modules with imports categorized as adhd/third_party
# Compare imports.adhd vs init_yaml_requirements for missing deps获取单个模块详细信息
get_module_info("config_manager")
# Returns detailed info: imports, requirements, git status, issues创建新模块
create_module(
name="my_new_manager",
module_type="manager",
create_repo=True,
owner="AI-Driven-Highspeed-Development"
)Git操作
# Check status of all modules
git_modules(action="status")
# Get detailed diffs for commit message crafting
git_modules(action="diff")
# Push a specific module
git_modules(action="push", module_name="kanbn_mcp", commit_message="feat: add batch tasks")
# Pull all modules
git_modules(action="pull")依赖性分析工作流
list_modules(with_imports=True)-扫描所有导入- 比较
imports.adhd对比init_yaml_requirements→ 寻找缺失的ADHD deps - 比较
imports.third_party对比requirements_txt→ 查找丢失的PyPI包 - AI决定添加什么,并直接编辑文件
模块结构
mcps/adhd_mcp/
├── __init__.py # Package exports
├── adhd_mcp.py # FastMCP server with tool decorators
├── adhd_controller.py # Business logic implementation
├── helpers.py # Import scanning and git utilities
├── init.yaml # Module metadata
├── README.md # This file
├── refresh.py # Module refresh script
└── requirements.txt # MCP-specific dependencies这取代了什么
| 旧提示/工具 | 新MCP工具 |
|---|---|
pull_modules.prompt.md | git_modules(action="pull") |
push_modules.prompt.md | git_modules(action="diff") → 代理人制作信息→ git_modules(action="push") |
update_requirements.prompt.md | list_modules(with_imports=True) → 代理编辑文件 |
手动CLI: python adhd_framework.py refresh | *(仍使用CLI-未包装)* |
CLI命令(未包装)
这些命令仍然是CLI命令,代理应直接调用它们:
python adhd_framework.py refresh # Refresh all modules
python adhd_framework.py refresh -m module # Refresh specific module
python adhd_framework.py workspace # Generate workspace file
python adhd_framework.py workspace --all # Include all modules