mcp黑曜石规划师
采用GTD+PARA方法的黑曜石保险库规划MCP服务器。
17个工具,用于每日笔记、收件箱、任务、项目、每周评论和全文搜索。
______________________________________________________________________
它的作用
将Claude Code(或任何MCP客户端)直接连接到您的黑曜石保险库进行结构化规划:
- 每日笔记 --从模板创建,设置前3个焦点,跟踪任务
- 收件箱 --捕捉想法,确定优先级,将项目处理到项目/领域中
- 任务 --列出、添加、切换任何笔记或文件夹
- 项目 --创建PARA区域,跟踪状态和截止日期
- 每周评论 --自动生成完成率摘要
- 搜索 --使用上下文在vault中进行全文搜索
与合作 LifeOS vault结构使用Templater模板和Dataview兼容的frontmatter。
______________________________________________________________________
入门指南
先决条件
- Node.js>=18
- 具有文件夹结构的黑曜石保险库(请参见 拱顶结构)
安装
git clone https://github.com/jarero321/mcp-obsidian-planner.git
cd mcp-obsidian-planner
npm install
npm run build配置Claude代码
增添 ~/.claude/settings.json:
{
"mcpServers": {
"obsidian-planner": {
"command": "node",
"args": ["/path/to/mcp-obsidian-planner/dist/main.js"],
"env": {
"VAULT_PATH": "/path/to/your/obsidian/vault"
}
}
}
}配置Claude桌面
增添 claude_desktop_config.json:
{
"mcpServers": {
"obsidian-planner": {
"command": "node",
"args": ["/path/to/mcp-obsidian-planner/dist/main.js"],
"env": {
"VAULT_PATH": "/path/to/your/obsidian/vault"
}
}
}
}验证
# Test with MCP Inspector
npm run inspect
# Or run directly
npm run start:stdio______________________________________________________________________
工具
每日笔记(3)
| 工具 | 说明 |
|---|---|
daily_create | 从模板创建每日笔记。如果已创建,则返回现有注释。 |
daily_get | 获取一份包含解析部分(焦点、任务、日志、感激、反思)的每日笔记。 |
daily_set_focus | 为每日笔记设置前三个重点优先事项。 |
收件箱(4)
| 工具 | 说明 |
|---|---|
inbox_list | 列出按优先级分组的所有收件箱项目(紧急,您可以等待,有一天,快速捕获,快速笔记)。 |
inbox_add | 在收件箱中添加一个带有时间戳的新项目。 |
inbox_process | 将收件箱项目移动到项目、每日笔记、区域、存档或删除 |
inbox_prioritize | 更改收件箱项目在不同部分之间的优先级。 |
任务(3)
| 工具 | 说明 |
|---|---|
tasks_list | 列出特定笔记、文件夹或整个vault中的任务。按状态筛选。 |
task_toggle | 在待处理任务之间切换 [ ] 并已完成 [x]. |
task_add | 在特定部分的注释中添加新任务。 |
每周评论(2)
| 工具 | 说明 |
|---|---|
weekly_summary | 生成每周摘要:已完成/待完成的任务、已完成的每日任务、项目进度。 |
weekly_create | 从模板创建每周复习笔记。 |
搜索和注释(3)
| 工具 | 说明 |
|---|---|
vault_search | 使用上下文线在vault中进行全文搜索。 |
note_read | 按相对路径读取vault中的注释。 |
notes_list | 使用可选模式过滤器列出文件夹中的所有笔记。 |
项目(2)
| 工具 | 说明 |
|---|---|
projects_list | 列出项目的状态、区域和截止日期。按状态或区域过滤。 |
project_create | 使用区域分配从模板创建新项目。 |
______________________________________________________________________
建筑
使用NestJS依赖注入的干净架构:
src/
├── domain/ # Entities, enums, value objects
│ ├── entities/ # Task, Note, DailyNote, Project, InboxItem, WeeklyReview
│ ├── enums/ # TaskStatus, ProjectStatus, InboxPriority, Area
│ └── value-objects/ # VaultPath (path traversal protection), DateRange
│
├── application/ # Business logic
│ ├── ports/ # Abstractions (VaultRepository, NoteParser, TemplateEngine, Logger)
│ └── use-cases/ # 17 use cases organized by domain
│ ├── daily/ # CreateDaily, GetDaily, SetDailyFocus
│ ├── inbox/ # ListInbox, AddInbox, ProcessInbox, PrioritizeInbox
│ ├── tasks/ # ListTasks, ToggleTask, AddTask
│ ├── weekly/ # WeeklySummary, CreateWeekly
│ ├── search/ # VaultSearch, ReadNote, ListNotes
│ └── projects/ # ListProjects, CreateProject
│
├── infrastructure/ # Concrete implementations
│ ├── vault/ # File system operations (fs/promises)
│ ├── parser/ # Markdown + frontmatter parsing (gray-matter)
│ ├── template/ # Templater syntax replacement (dayjs)
│ ├── logging/ # stderr JSON logger (stdout reserved for MCP)
│ └── mcp/ # MCP server, handlers, presenter, tool definitions
│
└── config/ # Vault configuration module端口和适配器
| 端口 | 符号 | 实现 |
|---|---|---|
VaultRepository | VAULT_REPOSITORY | FsVaultRepository --具有路径遍历保护的文件系统操作 |
NoteParser | NOTE_PARSER | MarkdownNoteParserService --灰质+正则表达式解析 |
TemplateEngine | TEMPLATE_ENGINE | SimpleTemplateEngineService --使用dayjs的模板语法 |
LoggerPort | LOGGER_PORT | StderrLoggerService --JSON日志到stderr |
______________________________________________________________________
配置
环境变量
| 变量 | 描述 | 默认值 |
|---|---|---|
VAULT_PATH | 黑曜石拱顶的绝对路径 | (必填) |
DAILY_FOLDER | 每日笔记文件夹 | 07-Daily |
INBOX_FILE | 收件箱标记文件 | 01-Inbox/Inbox.md |
PROJECTS_FOLDER | 项目文件夹 | 02-Proyectos |
AREAS_FOLDER | 区域(PARA)文件夹 | 04-Areas |
TEMPLATES_FOLDER | Templates文件夹 | Templates |
ARCHIVE_FOLDER | 存档文件夹 | 06-Archive |
复制 .env.example 到 .env 并调整路径:
cp .env.example .env运输方式
# stdio (default) — for Claude Code / Claude Desktop
node dist/main.js
# SSE — for web clients
node dist/main.js --sse
# Runs on PORT (default: 3000)______________________________________________________________________
拱顶结构
预期黑曜石拱顶布局:
Vault/
├── 00-Dashboard/ # Central hub with Dataview queries
├── 01-Inbox/
│ └── Inbox.md # GTD inbox with priority sections
├── 02-Proyectos/ # Active projects with frontmatter
├── 04-Areas/ # PARA areas (Salud, Carrera, Finanzas, etc.)
├── 06-Archive/ # Archived items
├── 07-Daily/ # Daily notes (YYYY-MM-DD.md)
└── Templates/ # Templater templates
├── Daily Template.md
├── Weekly Review.md
└── Proyecto Template.md收件箱格式
## Captura Rápida
- [ ] Some task _2025-01-15 10:30_
- Some note _2025-01-15 11:00_
## Urgente (hacer esta semana)
- [ ] Important task _2025-01-15 09:00_
## Puede esperar
## Algún día / Quizás
## Notas Rápidas项目负责人
---
estado: En progreso
area: Carrera
inicio: 2025-01-01
deadline: 2025-03-01
objetivo: Build the thing
---______________________________________________________________________
技术栈
Runtime Node.js 18+
Framework NestJS 11 (application context, no HTTP)
MCP SDK @modelcontextprotocol/sdk 1.12
Parsing gray-matter (YAML), regex (tasks, sections)
Dates dayjs (Templater replacement)
Validation Zod (tool input schemas)
Architecture Clean Architecture, Ports & Adapters______________________________________________________________________
脚本
| 脚本 | 描述 |
|---|---|
npm run build | 编译TypeScript |
npm run start:stdio | 运行MCP服务器(stdio) |
npm run start:sse | 运行MCP服务器(SSE) |
npm run inspect | 打开MCP检查器 |
npm test | 运行测试 |
npm run test:cov | 运行覆盖率测试 |
npm run lint | 轻敲并修复 |
______________________________________________________________________
许可证
麻省理工学院
