obsidian-mcp-server 3.1.9 → 3.1.10

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/CLAUDE.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** obsidian-mcp-server
4
- **Version:** 3.1.9
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.8.20`
4
+ **Version:** 3.1.10
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.1`
6
6
  **Engines:** Bun ≥1.3.11, Node ≥24.0.0
7
7
 
8
8
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
@@ -343,15 +343,16 @@ Each per-version file opens with YAML frontmatter:
343
343
 
344
344
  ```markdown
345
345
  ---
346
- summary: One-line headline, ≤250 chars # required — powers the rollup index
346
+ summary: One-line headline, ≤350 chars # required — powers the rollup index
347
347
  breaking: false # optional — true flags breaking changes
348
+ security: false # optional — true flags security fixes
348
349
  ---
349
350
 
350
351
  # 0.1.0 — YYYY-MM-DD
351
352
  ...
352
353
  ```
353
354
 
354
- `breaking: true` renders a `· ⚠️ Breaking` badge in the rollup — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames).
355
+ `breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section. When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
355
356
 
356
357
  ---
357
358
 
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![npm](https://img.shields.io/npm/v/obsidian-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/obsidian-mcp-server) [![Version](https://img.shields.io/badge/Version-3.1.9-blue.svg?style=flat-square)](./CHANGELOG.md) [![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-259?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/)
10
+ [![npm](https://img.shields.io/npm/v/obsidian-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/obsidian-mcp-server) [![Version](https://img.shields.io/badge/Version-3.1.10-blue.svg?style=flat-square)](./CHANGELOG.md) [![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-259?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/)
11
11
 
12
12
  [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![TypeScript](https://img.shields.io/badge/TypeScript-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.11-blueviolet.svg?style=flat-square)](https://bun.sh/)
13
13
 
@@ -176,6 +176,7 @@ Built on [`@cyanheads/mcp-ts-core`](https://www.npmjs.com/package/@cyanheads/mcp
176
176
 
177
177
  - Declarative tool and resource definitions — single file per primitive, framework handles registration and validation
178
178
  - Unified error handling — handlers throw, framework catches, classifies, and formats. Tools advertise their failure surface via typed `errors[]` contracts.
179
+ - Server-level `instructions` on `initialize` — surfaces deployment-specific orientation (active path policy, read-only mode, command-palette toggle) to spec-compliant clients alongside the static tool/resource catalog
179
180
  - Pluggable auth on the HTTP transport: `none`, `jwt`, `oauth`
180
181
  - Structured logging with optional OpenTelemetry tracing
181
182
  - STDIO and Streamable HTTP transports
@@ -295,7 +296,7 @@ MCP_TRANSPORT_TYPE=http OBSIDIAN_API_KEY=... bun run start:http
295
296
  | `MCP_AUTH_DISABLE_SCOPE_CHECKS` | When `true`, bypasses per-tool scope enforcement after the auth-context presence check. Token signature, audience, issuer, and expiry validation remain intact. Use only when a custom claim can't be injected and combine with `OBSIDIAN_READ_PATHS` / `OBSIDIAN_WRITE_PATHS` / `OBSIDIAN_READ_ONLY` for access control. A `WARNING` is logged at startup whenever the bypass is active. | `false` |
296
297
  | `MCP_LOG_LEVEL` | Log level (RFC 5424). | `info` |
297
298
  | `LOGS_DIR` | Directory for log files (Node.js only). | `<project-root>/logs` |
298
- | `OTEL_ENABLED` | Enable OpenTelemetry. | `false` |
299
+ | `OTEL_ENABLED` | Enable [OpenTelemetry instrumentation](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry) (spans, metrics, completion logs). | `false` |
299
300
 
300
301
  See [`.env.example`](./.env.example) for the full list of optional overrides.
301
302
 
@@ -0,0 +1,20 @@
1
+ ---
2
+ summary: "Server-level `instructions` on `initialize` surfaces deployment-specific orientation (path policy, read-only mode, command-palette toggle) to spec-compliant clients. Framework bump to `@cyanheads/mcp-ts-core ^0.9.1`."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 3.1.10 — 2026-05-16
8
+
9
+ ## Added
10
+
11
+ - **`buildInstructions()` in `src/index.ts`** — composes the server-level `instructions` string sent on every `initialize`. Always emits a baseline orientation paragraph (tool prefix, path addressing, tag hierarchy with parent roll-up), then layers in deployment-specific sections when active: read-only mode, scoped `OBSIDIAN_READ_PATHS` / `OBSIDIAN_WRITE_PATHS`, and the opt-in command-palette pair. The conditional lines mirror the same scope strings used by `path_forbidden` error data so a client sees consistent guidance whether it reads `initialize.instructions` or an error response.
12
+
13
+ ## Changed
14
+
15
+ - **`@cyanheads/mcp-ts-core` `^0.8.20 → ^0.9.1`** — adopts `createApp({ instructions })` (new in 0.9.0). Definition linting is now build-time only; `schema-format-portability` is on by default (error-level). See the framework's [0.9.x changelog](https://github.com/cyanheads/mcp-ts-core/tree/main/changelog/0.9.x) for the full set.
16
+ - **`undici` `^8.2.0 → ^8.3.0`**, **`@types/node` `^25.6.2 → ^25.8.0`** — routine refresh.
17
+ - **`scripts/devcheck.ts`** — `bun outdated` markdown-row parser fixed. Splits on `|` start at index `[1]` (leading empty cell), and the trailing `(dev|peer|prod|optional)` workspace-type marker is stripped before the allowlist lookup so bare package names match.
18
+ - **Changelog tooling** — summary soft cap raised 250 → 350 chars across `changelog/template.md`, `scripts/build-changelog.ts` (`SUMMARY_MAX_LENGTH`), and the CLAUDE.md authoring section. CLAUDE.md also picks up the `security: false` frontmatter field and the `🛡️ Security` badge note.
19
+ - **Synced 8 skills** from `node_modules/@cyanheads/mcp-ts-core/skills/`: `add-tool` 2.8→2.9, `api-errors` 1.5→1.6, `api-linter` 1.2→1.3, `api-workers` 1.3→1.4, `design-mcp-server` 2.10→2.11, `field-test` 2.3→2.4, `polish-docs-meta` 1.7→1.8, `tool-defs-analysis` 1.1→1.2. Mirrored into the agent directory.
20
+ - **README** — new Features bullet for server-level `instructions`. `OTEL_ENABLED` env-var row now links to the framework's [telemetry docs](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry).
@@ -4,7 +4,7 @@
4
4
  # to author a new release. Set that file's H1 to `# <version> — YYYY-MM-DD`
5
5
  # with a concrete date.
6
6
 
7
- # Required. One-line GitHub Release-style headline. ~250 character soft cap.
7
+ # Required. One-line GitHub Release-style headline. 350 character cap.
8
8
  # Default short and scannable. Don't pad, don't stitch unrelated changes with
9
9
  # semicolons — pick the headline. Quotes required: unquoted YAML treats `: `
10
10
  # inside the value as a key separator and fails GitHub's strict parser.
package/dist/index.js CHANGED
@@ -15,6 +15,29 @@ import { initObsidianService } from './services/obsidian/obsidian-service.js';
15
15
  import { PathPolicy } from './services/obsidian/path-policy.js';
16
16
  const config = getServerConfig();
17
17
  const policy = new PathPolicy(config);
18
+ /**
19
+ * Build the server-level `instructions` string sent on every `initialize`.
20
+ * Provides baseline orientation about the server and then layers in
21
+ * deployment-specific lines (read-only mode, scoped paths, command-palette
22
+ * toggle) when those flags are active.
23
+ */
24
+ function buildInstructions() {
25
+ const sections = [
26
+ 'Obsidian vault MCP server backed by the Local REST API plugin. Use `obsidian_*` tools to search, read, and edit vault notes. Notes are addressed by vault-relative path including the file extension (e.g. `Folder/Note.md`). Tags support hierarchical `parent/child` notation; counts roll up to parents.',
27
+ ];
28
+ if (config.readOnly) {
29
+ sections.push('Read-only mode is active (OBSIDIAN_READ_ONLY=true): every write tool rejects every path with `path_forbidden` / `read_only_mode`.');
30
+ }
31
+ else if (!policy.isUnrestricted) {
32
+ const { readPaths, writePaths } = policy.describe();
33
+ const render = (scope) => typeof scope === 'string' ? scope : scope.map((p) => `'${p}'`).join(', ');
34
+ sections.push(`Vault path policy is enforced. Readable: ${render(readPaths)}. Writable: ${render(writePaths)}. Paths outside scope reject with \`path_forbidden\` — error data carries the active scope so you can self-correct.`);
35
+ }
36
+ if (config.enableCommands && !config.readOnly) {
37
+ sections.push('Command-palette tools (`obsidian_list_commands`, `obsidian_execute_command`) are enabled and can fire any Obsidian command. Commands are opaque and may be destructive — prefer dedicated tools when one fits.');
38
+ }
39
+ return sections.join('\n\n');
40
+ }
18
41
  const writeTools = config.readOnly
19
42
  ? writeToolDefinitions.map((def) => disabledTool(def, {
20
43
  reason: 'Disabled by OBSIDIAN_READ_ONLY=true.',
@@ -36,6 +59,7 @@ const { services } = await createApp({
36
59
  tools,
37
60
  resources: allResourceDefinitions,
38
61
  prompts: allPromptDefinitions,
62
+ instructions: buildInstructions(),
39
63
  setup() {
40
64
  initObsidianService(config);
41
65
  },
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,eAA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B,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CACjC,YAAY,CAAC,GAAG,EAAE;QAChB,MAAM,EAAE,MAAM,CAAC,QAAQ;YACrB,CAAC,CAAC,4DAA4D;YAC9D,CAAC,CAAC,4EAA4E;QAChF,IAAI,EAAE,MAAM,CAAC,QAAQ;YACnB,CAAC,CAAC,6FAA6F;YAC/F,CAAC,CAAC,kGAAkG;KACvG,CAAC,CACH,CAAC;AAER,MAAM,KAAK,GAAG,CAAC,GAAG,mBAAmB,EAAE,GAAG,UAAU,EAAE,GAAG,YAAY,CAAC,CAAC;AAEvE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,SAAS,CAAC;IACnC,KAAK;IACL,SAAS,EAAE,sBAAsB;IACjC,OAAO,EAAE,oBAAoB;IAC7B,YAAY,EAAE,iBAAiB,EAAE;IACjC,KAAK;QACH,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;CACF,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,SAAS,GAAG,qBAAqB,CAAC,oBAAoB,CAAC;IAC3D,SAAS,EAAE,SAAS;IACpB,GAAG,MAAM,CAAC,QAAQ,EAAE;IACpB,cAAc,EAAE,MAAM,CAAC,cAAc,IAAI,CAAC,MAAM,CAAC,QAAQ;CAC1D,CAAC,CAAC;AACH,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;AAC/C,IAAI,MAAM,CAAC,yBAAyB,EAAE,CAAC;IACrC,QAAQ,CAAC,MAAM,CAAC,OAAO,CACrB,uHAAuH,EACvH,SAAS,CACV,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obsidian-mcp-server",
3
- "version": "3.1.9",
3
+ "version": "3.1.10",
4
4
  "mcpName": "io.github.cyanheads/obsidian-mcp-server",
5
5
  "description": "MCP server for Obsidian vaults — read, write, search, and surgically edit notes, tags, and frontmatter via the Local REST API plugin. STDIO or Streamable HTTP.",
6
6
  "type": "module",
@@ -76,15 +76,15 @@
76
76
  "access": "public"
77
77
  },
78
78
  "dependencies": {
79
- "@cyanheads/mcp-ts-core": "^0.8.20",
79
+ "@cyanheads/mcp-ts-core": "^0.9.1",
80
80
  "@types/js-yaml": "^4.0.9",
81
81
  "js-yaml": "^4.1.1",
82
82
  "pino-pretty": "^13.1.3",
83
- "undici": "^8.2.0"
83
+ "undici": "^8.3.0"
84
84
  },
85
85
  "devDependencies": {
86
86
  "@biomejs/biome": "^2.4.15",
87
- "@types/node": "^25.6.2",
87
+ "@types/node": "^25.8.0",
88
88
  "depcheck": "^1.4.7",
89
89
  "ignore": "^7.0.5",
90
90
  "tsc-alias": "^1.8.17",
package/server.json CHANGED
@@ -6,14 +6,14 @@
6
6
  "url": "https://github.com/cyanheads/obsidian-mcp-server",
7
7
  "source": "github"
8
8
  },
9
- "version": "3.1.9",
9
+ "version": "3.1.10",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "registryBaseUrl": "https://registry.npmjs.org",
14
14
  "identifier": "obsidian-mcp-server",
15
15
  "runtimeHint": "node",
16
- "version": "3.1.9",
16
+ "version": "3.1.10",
17
17
  "packageArguments": [
18
18
  {
19
19
  "type": "positional",
@@ -95,7 +95,7 @@
95
95
  "registryBaseUrl": "https://registry.npmjs.org",
96
96
  "identifier": "obsidian-mcp-server",
97
97
  "runtimeHint": "node",
98
- "version": "3.1.9",
98
+ "version": "3.1.10",
99
99
  "packageArguments": [
100
100
  {
101
101
  "type": "positional",