欢迎来到Aidderall MCP服务器!
Aidderal是一种用于分层任务管理的模型上下文协议(MCP)服务器实现,为AI助手提供了一种认知假肢,用于在复杂的问题解决会话中保持专注和上下文。
人工智能助手很难处理长时间运行的任务,部分原因是它们在任何一个时间点(上下文窗口)可以处理的信息量有限。
Aidderall通过为AI助手提供以下功能来解决这个问题:
- 聚焦
- 当前认知景观与背景图
把aidderall想象成许多帮助人工智能集中注意力和记忆的小上下文窗口!
概述
Aidderall实施了一个灵活的分层任务管理系统,其中:
- 任务可以以嵌套结构组织,以进行复杂的工作分解
- 为并行工作流创建独立任务
- 使用switch_focus在任何任务之间自由导航
- 按照对工作流程有意义的任何顺序完成任务
- 所有任务都作为您工作的动态文档可见
Aidderall长什么样?
Aidderall Visual Representation
================================
1. Basic Structure - Tasks grow vertically, subtasks grow horizontally:
┌─────────────────┐
│ MainTask C │ ← Latest main task
│ [PENDING] │
└─────────────────┘
↑
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ MainTask B │ ──→ │ SubTask B.1 │ ──→ │ SubTask B.2 │
│ [COMPLETED] │ │ [COMPLETED] │ │ [CURRENT] ← │ ← YOU ARE HERE
└─────────────────┘ └─────────────────┘ └─────────────────┘
↑
┌─────────────────┐ ┌─────────────────┐
│ MainTask A │ ─→ │ SubTask A.1 │
│ [COMPLETED] │ │ [COMPLETED] │
└─────────────────┘ └─────────────────┘
2. Living Document - Completed tasks remain visible:
Before (traditional todo): After (Aidderall):
┌─────────────────┐ ┌─────────────────┐
│ ☐ Task A │ │ ✓ Task A │ ← Still visible!
│ ☐ Task B │ │ ✓ Task B │ ← Context preserved
│ ☐ Task C │ │ ☐ Task C │
└─────────────────┘ └─────────────────┘
Traditional: Completed = Gone Aidderall: Completed = History
3. Flexible Navigation with switch_focus:
┌─────────────────┐
│ Task D │
│ [PENDING] │ ←────────────┐
└─────────────────┘ │
↑ │ Can jump to any task!
┌─────────────────┐ │
│ Task C │ │
│ [CURRENT] ← │ ←──────┐ │
└─────────────────┘ │ │
↑ │ │
┌─────────────────┐ │ │
│ Task B │ ←──────┘ │
│ [COMPLETED] │ │
└─────────────────┘ │
↑ │
┌─────────────────┐ │
│ Task A │ ←────────────┘
│ [COMPLETED] │
└─────────────────┘
4. Real-world Example - Implementing a Feature:
┌─────────────────────┐
│ Add User Auth │
│ [COMPLETED] │
└─────────────────────┘
↑
│ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
└───→ │ Design DB Schema │ ──→ │ Create API │ ──→ │ Add UI Forms │
│ [COMPLETED] │ │ [COMPLETED] │ │ [CURRENT] ← │
└──────────────────┘ └──────────────────┘ └──────────────────┘
↑
│ ┌──────────────────┐
└───→ │ Add JWT logic │
│ [COMPLETED] │
└──────────────────┘
5. Value Propositions Visualized:
Traditional Linear Todo: Aidderall Hierarchical:
======================== =========================
☐ Research auth libraries Research Phase
☐ Design database schema │
☐ Create user table ├─→ Auth libraries
☐ Create session table │ └─→ JWT vs Sessions
☐ Implement JWT │
☐ Create login endpoint Design Phase
☐ Create register endpoint │
☐ Add password hashing ├─→ Database Schema
☐ Create login form │ ├─→ User table
☐ Create register form │ └─→ Session table
☐ Add form validation │
Implementation Phase
Problems: │
- No hierarchy ├─→ Backend API
- No context │ ├─→ Login endpoint
- Hard to see relationships │ ├─→ Register endpoint
- Completed = disappeared │ └─→ Password hashing
│
└─→ Frontend UI
├─→ Login form
├─→ Register form
└─→ Validation
Benefits:
✓ Clear hierarchy
✓ Preserved context
✓ Visible relationships
✓ Complete history
6. Zen State - Two Paths:
Path 1: No tasks Path 2: All completed
┌─────────────────┐ ┌─────────────────┐
│ │ │ ✓ Task A │
│ Empty Stack │ │ ✓ Task B │
│ (Zen State) │ │ ✓ Task C │
│ │ │ (Zen State) │
└─────────────────┘ └─────────────────┘特性
- 分层任务管理:创建主要任务并用子任务扩展它们
- 重点执法:一次只能有一个任务处于活动状态
- 上下文保护:保持面包屑痕迹和兄弟姐妹意识
- 任务完成:使用时间戳存档已完成的任务
- 会话保持:每次发生突变时,任务状态都会自动持久化到SQLite中——在服务器重启、崩溃和上下文压缩中幸存下来
- 会话管理:每个服务器实例都有一个唯一的会话。列出、恢复或清理以前的会话
致谢
- 多亏了 **阿尔贝托 *“KewlPops”* 费尔南德斯** 因为想出了这个名字。..这个项目的名字以前并不那么令人兴奋! 😀
安装
- 克隆存储库:
git clone https://github.com/user/aidderall_mcp.git
cd aidderall_mcp- 创建并激活虚拟环境:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- 安装依赖项:
pip install -r requirements.txt- 对于开发,请使用dev依赖项进行安装:
pip install -e ".[dev]"用法
运行服务器
启动MCP服务器:
python -m src.server服务器直接通过Python模块运行。
与AI助手集成
克劳德代码
如果您安装了Claude Code,可以直接添加Aidderall:
claude mcp add aidderall-mcp /path/to/aidderall_mcp/run_mcp.sh手动配置
或者,将服务器添加到MCP配置中:
{
"mcpServers": {
"aidderall": {
"command": "python",
"args": ["-m", "src.server"]
}
}
}可用命令
任务创建
create_new_task(title, body)-为无关的工作或新主题创建新的独立任务extend_current_task(title, body)-添加子任务以组织和分解当前任务
导航与信息
get_current_task()-返回当前任务及其上下文get_big_picture(format='text')-显示整个任务层次结构(格式:“text”或“json”)get_stack_overview()-返回系统的JSON结构peek_context(include_body=False)-查看父级和兄弟级上下文list_siblings(include_body=False)-列出当前级别的任务
任务管理
complete_current_task()-将当前任务标记为已完成(保持可见)update_current_task(body)-更新当前任务正文switch_focus(task_id)-按ID将焦点切换到任何任务remove_task(task_id)-从结构中删除任务(保留在历史记录中)get_completed_tasks(order)-查看已完成的任务存档
会话管理
list_sessions()-列出所有具有元数据的持久会话(任务计数、当前任务、上次修改)resume_session(session_id)-恢复上一个会话的任务状态(恢复时自动清除空会话)delete_session(session_id)-删除过时会话(无法删除活动会话)
工作流示例
# Start with a root task
create_new_task("Design new feature", "Research and design specs")
# Break it down into subtasks for organization
extend_current_task("Research requirements", "User research needed")
extend_current_task("Interview users", "Conduct user interviews")
extend_current_task("Analyze competitors", "Research competitor solutions")
# Work on tasks in any order using switch_focus
get_big_picture() # See all tasks with their IDs
switch_focus("task-id-for-research") # Jump to research task
complete_current_task() # Complete it when done
# Jump to any other task
switch_focus("task-id-for-interviews") # Work on interviews
# ... do some work ...
switch_focus("task-id-for-competitors") # Switch to competitor analysis
# Create parallel work streams
create_new_task("Write documentation", "Document the new feature")
extend_current_task("API docs", "Write API documentation")
extend_current_task("User guide", "Write user guide")
# Jump between different work streams freely
switch_focus("task-id-for-design") # Back to design work
switch_focus("task-id-for-api-docs") # Jump to documentation
# Complete tasks as they're finished, in any order
complete_current_task() # Completes whatever you're currently focused on
# View all tasks - completed ones remain visible
get_big_picture()
# Output shows:
# Design new feature (pending)
# Research requirements (completed)
# Interview users (pending)
# Analyze competitors (completed)
# Write documentation (pending)
# API docs (completed)
# User guide (pending)
# Clean up workspace by removing completed tasks
remove_task("task-id-for-research") # Removes from view but keeps in history发展
运行测试
pytest -v代码覆盖率
pytest --cov=src tests/代码格式化
black src tests
isort src tests类型检查
mypy src坚持
任务状态在以下时间自动持久化到SQLite ~/.aidderall/sessions//state.db每个服务器实例都生成一个唯一的会话ID,因此并发会话永远不会相互干扰。
- 自动保存:每个突变(创建、扩展、完成、更新、切换、删除)都会立即写入磁盘
- 自动恢复:恢复会话会加载完整的任务层次结构、已完成的存档和焦点状态
- 自动清理:恢复其他会话时,空会话将被删除
建筑
models.py-具有序列化功能的核心数据结构(任务、主任务、子任务)task_manager.py-任务管理逻辑和状态处理handlers.py-MCP命令实现persistence.py-SQLite支持的会话持久性server.py-MCP服务器入口点
文档
贡献
- 分叉存储库
- 创建要素分支
- 添加新功能的测试
- 确保所有测试通过
- 提交拉取请求
许可证
此项目根据GNU通用公共许可证v3.0或更高版本获得许可-请参阅 许可证 文件以获取详细信息。
版权所有(C)2024 Briam R。
