pkm-mcp-server 1.2.1 → 1.3.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 CHANGED
@@ -6,6 +6,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.3.0] - 2026-03-19
10
+
11
+ ### Added
12
+ - `pkm-mcp-server init` — interactive onboarding wizard that walks users through vault setup, template installation, folder structure, OpenAI API key configuration, and Claude Code registration in a single session
13
+ - `cli.js` — new CLI dispatcher with `init` and `--version` subcommands; existing MCP server behavior unchanged when run without arguments
14
+ - `templates/note.md` — minimal generic note template for users who prefer to define their own templates
15
+ - 36 unit tests for init wizard helpers
16
+
17
+ ### Changed
18
+ - `index.js` refactored to export `startServer()` for CLI dispatcher (backward compatible — `node index.js` still works)
19
+ - Entry point updated from `index.js` to `cli.js` in package.json (`bin`, `main`, `exports`)
20
+
21
+ ### Dependencies
22
+ - Added `@inquirer/prompts` for interactive CLI prompts
23
+
9
24
  ## [1.2.1] - 2026-03-17
10
25
 
11
26
  ### Added
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![Node.js >= 20](https://img.shields.io/badge/Node.js-%3E%3D20-green.svg)](https://nodejs.org/)
6
6
  [![CI](https://github.com/AdrianV101/Obsidian-MCP/actions/workflows/ci.yml/badge.svg)](https://github.com/AdrianV101/Obsidian-MCP/actions/workflows/ci.yml)
7
7
 
8
- An MCP (Model Context Protocol) server that gives Claude Code full read/write access to your Obsidian vault. 18 tools for note CRUD, full-text search, semantic search, graph traversal, metadata queries, and session activity tracking. Published on npm as [`pkm-mcp-server`](https://www.npmjs.com/package/pkm-mcp-server).
8
+ An MCP (Model Context Protocol) server that gives Claude Code full read/write access to your Obsidian vault. 19 tools for note CRUD, full-text search, semantic search, graph traversal, metadata queries, session activity tracking, and passive knowledge capture. Published on npm as [`pkm-mcp-server`](https://www.npmjs.com/package/pkm-mcp-server).
9
9
 
10
10
  ## Why
11
11
 
@@ -42,6 +42,7 @@ https://github.com/user-attachments/assets/58ad9c9b-d987-4728-89e7-33de20b73a38
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
44
  | `vault_update_frontmatter` | Atomic YAML frontmatter updates (set, create, remove fields; validates enum fields by note type) |
45
+ | `vault_capture` | Signal a PKM-worthy capture (decision, task, research, bug); returns immediately, background hook creates the note |
45
46
 
46
47
  ### Fuzzy Path Resolution
47
48
 
@@ -55,7 +56,7 @@ vault_read({ path: "devlog.md" })
55
56
  // Same result — .md extension is optional
56
57
 
57
58
  vault_links({ path: "alpha" })
58
- // Works on vault_links, vault_neighborhood, vault_suggest_links too
59
+ // Works on vault_peek, vault_links, vault_neighborhood, vault_suggest_links too
59
60
  ```
60
61
 
61
62
  Folder-scoped tools accept partial folder names:
@@ -279,7 +280,9 @@ All paths passed to tools are relative to vault root. The server includes path s
279
280
 
280
281
  **Graph exploration** resolves `[[wikilinks]]` to file paths (handling aliases, headings, and ambiguous basenames), then does BFS traversal to return notes grouped by hop distance.
281
282
 
282
- **Activity logging** records every tool call with timestamps and session IDs, enabling Claude to recall what happened in previous conversations.
283
+ **Activity logging** records every tool call (except `vault_activity` itself) with timestamps and session IDs, enabling Claude to recall what happened in previous conversations.
284
+
285
+ **Passive capture** uses `vault_capture` to signal that something is worth persisting (a decision, task, research finding, or bug). The tool returns immediately — a PostToolUse hook spawns a background agent that creates the structured vault note. Combined with the Stop hook (which sweeps each session for un-captured decisions and tasks), this keeps the vault up to date without interrupting the coding flow.
283
286
 
284
287
  ## Troubleshooting
285
288
 
@@ -302,6 +305,8 @@ Check your Node version with `node -v`. The file watcher uses `fs.watch({ recurs
302
305
 
303
306
  Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, code style guidelines, and the pull request process before submitting changes.
304
307
 
308
+ See [CHANGELOG.md](CHANGELOG.md) for release history and [SECURITY.md](SECURITY.md) to report vulnerabilities.
309
+
305
310
  ## License
306
311
 
307
312
  MIT
package/cli.js ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { createRequire } from "module";
4
+
5
+ const subcommand = process.argv[2];
6
+
7
+ try {
8
+ if (subcommand === "init") {
9
+ const { runInit } = await import("./init.js");
10
+ await runInit();
11
+ } else if (subcommand === "--version" || subcommand === "-v") {
12
+ const require = createRequire(import.meta.url);
13
+ const { version } = require("./package.json");
14
+ console.log(`pkm-mcp-server v${version}`);
15
+ } else if (!subcommand) {
16
+ const { startServer } = await import("./index.js");
17
+ await startServer();
18
+ } else {
19
+ console.error(`Unknown command: ${subcommand}`);
20
+ console.error("Usage: pkm-mcp-server [init]");
21
+ process.exit(1);
22
+ }
23
+ } catch (e) {
24
+ console.error(`Fatal: ${e.message}`);
25
+ process.exit(1);
26
+ }