pkm-mcp-server 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -1
- package/README.md +3 -3
- package/handlers.js +16 -0
- package/index.js +34 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.2.0] - 2026-03-17
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `vault_capture` tool — signal a PKM-worthy capture (decision, task, research, bug); returns immediately while a background hook creates the note
|
|
13
|
+
- PKM hook scripts for Claude Code integration:
|
|
14
|
+
- SessionStart hook (`session-start.js`) — loads project context from vault automatically
|
|
15
|
+
- PostToolUse hook (`capture-handler.sh`) — spawns Sonnet agent for explicit `vault_capture` calls
|
|
16
|
+
- Stop hook (`stop-sweep.sh`) — spawns Haiku agent for passive decision/task sweep at session end
|
|
17
|
+
- Enum validation for task `status` (pending/active/done/cancelled) and `priority` (low/normal/high/urgent) fields in `vault_write` and `vault_update_frontmatter` — non-task note types are unaffected
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- `sqlite-vec` upgraded from pinned alpha (0.1.7-alpha.2) to stable release (0.1.7)
|
|
21
|
+
- `@modelcontextprotocol/sdk` updated to 1.27.1
|
|
22
|
+
- `better-sqlite3` updated to 12.8.0
|
|
23
|
+
|
|
24
|
+
### Security
|
|
25
|
+
- Resolved 7 transitive dependency vulnerabilities (hono, @hono/node-server, ajv, express-rate-limit, flatted, minimatch, qs)
|
|
26
|
+
|
|
9
27
|
## [1.1.0] - 2026-02-23
|
|
10
28
|
|
|
11
29
|
### Changed
|
|
@@ -55,6 +73,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
55
73
|
- Atomic file creation in `vault_write` (`wx` flag) prevents race conditions
|
|
56
74
|
- Error messages sanitized to prevent leaking absolute vault paths
|
|
57
75
|
|
|
58
|
-
[Unreleased]: https://github.com/AdrianV101/Obsidian-MCP/compare/v1.
|
|
76
|
+
[Unreleased]: https://github.com/AdrianV101/Obsidian-MCP/compare/v1.2.0...HEAD
|
|
77
|
+
[1.2.0]: https://github.com/AdrianV101/Obsidian-MCP/compare/v1.1.0...v1.2.0
|
|
59
78
|
[1.1.0]: https://github.com/AdrianV101/Obsidian-MCP/compare/v1.0.0...v1.1.0
|
|
60
79
|
[1.0.0]: https://github.com/AdrianV101/Obsidian-MCP/releases/tag/v1.0.0
|
package/README.md
CHANGED
|
@@ -36,12 +36,12 @@ https://github.com/user-attachments/assets/58ad9c9b-d987-4728-89e7-33de20b73a38
|
|
|
36
36
|
| `vault_recent` | Recently modified files |
|
|
37
37
|
| `vault_links` | Wikilink analysis (incoming/outgoing) |
|
|
38
38
|
| `vault_neighborhood` | Graph exploration via BFS wikilink traversal |
|
|
39
|
-
| `vault_query` | Query notes by YAML frontmatter (type, status, tags, dates, custom fields, sorting) |
|
|
39
|
+
| `vault_query` | Query notes by YAML frontmatter (type, status, tags/tags_any, dates, custom fields, sorting) |
|
|
40
40
|
| `vault_tags` | Discover tags with counts; folder scoping, glob filters, inline tag parsing |
|
|
41
41
|
| `vault_activity` | Session activity log for cross-conversation memory |
|
|
42
42
|
| `vault_trash` | Soft-delete to `.trash/` (Obsidian convention), warns about broken incoming links |
|
|
43
43
|
| `vault_move` | Move/rename files with automatic wikilink updating across vault |
|
|
44
|
-
| `vault_update_frontmatter` | Atomic YAML frontmatter updates (set, create, remove fields) |
|
|
44
|
+
| `vault_update_frontmatter` | Atomic YAML frontmatter updates (set, create, remove fields; validates enum fields by note type) |
|
|
45
45
|
|
|
46
46
|
### Fuzzy Path Resolution
|
|
47
47
|
|
|
@@ -211,7 +211,7 @@ All paths passed to tools are relative to vault root. The server includes path s
|
|
|
211
211
|
|
|
212
212
|
## How It Works
|
|
213
213
|
|
|
214
|
-
**Note creation** is template-based. `vault_write` loads templates from `05-Templates/`, substitutes Templater-compatible variables (`<% tp.date.now("YYYY-MM-DD") %>`, `<% tp.file.title %>`), and validates required frontmatter fields (`type`, `created`, `tags`).
|
|
214
|
+
**Note creation** is template-based. `vault_write` loads templates from `05-Templates/`, substitutes Templater-compatible variables (`<% tp.date.now("YYYY-MM-DD") %>`, `<% tp.file.title %>`), and validates required frontmatter fields (`type`, `created`, `tags`). Optional frontmatter fields — `status`, `priority`, `project`, `deciders`, `due`, `source` — can be set per template type. Task notes enforce enum validation on `status` (pending/active/done/cancelled) and `priority` (low/normal/high/urgent).
|
|
215
215
|
|
|
216
216
|
**Semantic search** embeds notes on startup and watches for changes via `fs.watch`. Long notes are chunked by `##` headings. The index is a regenerable cache stored in `.obsidian/` so it syncs across machines via Obsidian Sync. The initial sync runs in the background — search is available immediately but may return incomplete results until sync finishes (a progress message is shown).
|
|
217
217
|
|
package/handlers.js
CHANGED
|
@@ -848,6 +848,21 @@ export async function createHandlers({ vaultPath, templateRegistry, semanticInde
|
|
|
848
848
|
};
|
|
849
849
|
}
|
|
850
850
|
|
|
851
|
+
async function handleCapture(args) {
|
|
852
|
+
const { type, title, content } = args;
|
|
853
|
+
if (!type || !title || !content) {
|
|
854
|
+
throw new Error(
|
|
855
|
+
`vault_capture requires type, title, and content. Got: type=${type || "(missing)"}, title=${title || "(missing)"}, content=${content ? "provided" : "(missing)"}`
|
|
856
|
+
);
|
|
857
|
+
}
|
|
858
|
+
return {
|
|
859
|
+
content: [{
|
|
860
|
+
type: "text",
|
|
861
|
+
text: `Capture queued: [${type}] ${title}`
|
|
862
|
+
}]
|
|
863
|
+
};
|
|
864
|
+
}
|
|
865
|
+
|
|
851
866
|
return new Map([
|
|
852
867
|
["vault_read", handleRead],
|
|
853
868
|
["vault_write", handleWrite],
|
|
@@ -867,5 +882,6 @@ export async function createHandlers({ vaultPath, templateRegistry, semanticInde
|
|
|
867
882
|
["vault_trash", handleTrash],
|
|
868
883
|
["vault_move", handleMove],
|
|
869
884
|
["vault_update_frontmatter", handleUpdateFrontmatter],
|
|
885
|
+
["vault_capture", handleCapture],
|
|
870
886
|
]);
|
|
871
887
|
}
|
package/index.js
CHANGED
|
@@ -344,6 +344,40 @@ Pass custom <%...%> variables via the 'variables' parameter.`,
|
|
|
344
344
|
},
|
|
345
345
|
required: ["old_path", "new_path"]
|
|
346
346
|
}
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
name: "vault_capture",
|
|
350
|
+
description: "Signal that something is worth capturing in the PKM vault. " +
|
|
351
|
+
"Returns immediately — a background agent handles the actual note creation. " +
|
|
352
|
+
"Use this when you identify a decision, task, or research finding worth preserving.",
|
|
353
|
+
inputSchema: {
|
|
354
|
+
type: "object",
|
|
355
|
+
properties: {
|
|
356
|
+
type: {
|
|
357
|
+
type: "string",
|
|
358
|
+
enum: ["adr", "task", "research", "bug"],
|
|
359
|
+
description: "The type of capture: adr (decision), task, research (finding/pattern), bug (issue/fix)"
|
|
360
|
+
},
|
|
361
|
+
title: {
|
|
362
|
+
type: "string",
|
|
363
|
+
description: "Brief descriptive title (e.g., 'Use sqlite-vec over Chroma')"
|
|
364
|
+
},
|
|
365
|
+
content: {
|
|
366
|
+
type: "string",
|
|
367
|
+
description: "The substance of the capture — context, rationale, details. 1-5 sentences."
|
|
368
|
+
},
|
|
369
|
+
priority: {
|
|
370
|
+
type: "string",
|
|
371
|
+
enum: ["low", "normal", "high", "urgent"],
|
|
372
|
+
description: "Priority level (tasks only, default: normal)"
|
|
373
|
+
},
|
|
374
|
+
project: {
|
|
375
|
+
type: "string",
|
|
376
|
+
description: "Project name for vault routing (e.g., 'Obsidian-MCP'). If omitted, inferred from session context."
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
required: ["type", "title", "content"]
|
|
380
|
+
}
|
|
347
381
|
}
|
|
348
382
|
];
|
|
349
383
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pkm-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "MCP server for Obsidian vault integration with Claude Code — 18 tools for notes, search, and graph traversal",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
55
55
|
"better-sqlite3": "^12.6.2",
|
|
56
56
|
"js-yaml": "^4.1.0",
|
|
57
|
-
"sqlite-vec": "0.1.7
|
|
57
|
+
"sqlite-vec": "^0.1.7"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@eslint/js": "^10.0.1",
|