obsidian-mcp-server 2.0.2 → 2.0.3

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 ADDED
@@ -0,0 +1,88 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.0.3] - 2025-06-12
9
+
10
+ ### Fixed
11
+
12
+ - **NPM Package Display**: Explicitly included `README.md`, `LICENSE`, and `CHANGELOG.md` in the `files` array in `package.json` to ensure they are displayed correctly on the npm package page.
13
+
14
+ ## [2.0.2] - 2025-06-12
15
+
16
+ ### Fixed
17
+
18
+ - **NPM Package Version**: Bad npm package. Bumping to v2.0.2 for publishing.
19
+
20
+ ## [2.0.1] - 2025-06-12
21
+
22
+ ### Added
23
+
24
+ - **Enhanced Documentation**:
25
+ - Added a warning to the `VaultCacheService` documentation about its potential for high memory usage on large vaults.
26
+ - Added a code comment in `obsidianManageFrontmatterTool` to clarify the regex-based key deletion strategy.
27
+
28
+ ### Changed
29
+
30
+ - **Improved SSL Handling**: The `OBSIDIAN_VERIFY_SSL` environment variable is now correctly parsed as a boolean, ensuring more reliable SSL verification behavior.
31
+ - **API Service Refactoring**: Simplified the `httpsAgent` handling within the `ObsidianRestApiService` to improve code clarity and remove redundant agent creation on each request.
32
+
33
+ ### Fixed
34
+
35
+ - **Path Import Correction**: Corrected a path import in the `obsidianGlobalSearchTool` to use `node:path/posix` for better cross-platform compatibility.
36
+
37
+ ## [2.0.0] - 2025-06-12
38
+
39
+ Version 2.0.0 is a complete overhaul of the Obsidian MCP Server, migrating it to my [`cyanheads/mcp-ts-template`](https://github.com/cyanheads/mcp-ts-template). This release introduces a more robust architecture, a streamlined toolset, enhanced security, and significant performance improvements. It is a breaking change from the 1.x series.
40
+
41
+ ### Added
42
+
43
+ - **New Core Architecture**: The server is now built on the [`cyanheads/mcp-ts-template`](https://github.com/cyanheads/mcp-ts-template), providing a standardized, modular, and maintainable structure.
44
+ - **Hono HTTP Transport**: The HTTP transport has been migrated from Express to Hono, offering a more lightweight and performant server.
45
+ - **Vault Cache Service**: A new in-memory `VaultCacheService` has been introduced. It caches vault content to improve performance for search operations and provides a resilient fallback if the Obsidian API is temporarily unavailable. It also refreshes periodically.
46
+ - **Advanced Authentication**:
47
+ - Added support for **OAuth 2.1** bearer token validation alongside the existing secret key-based JWTs.
48
+ - Introduced `authContext` using `AsyncLocalStorage` for secure, request-scoped access to authentication details.
49
+ - **New Tools**:
50
+ - `obsidian_delete_file`: A new tool to permanently delete files from the vault.
51
+ - `obsidian_search_replace`: A powerful new tool to perform search and replace operations with regex support.
52
+ - **Enhanced Utilities**:
53
+ - **Request Context**: A robust request context system (`requestContextService`) for improved logging and tracing.
54
+ - **Error Handling**: A centralized `ErrorHandler` for consistent and detailed error reporting.
55
+ - **Async Utilities**: A `retryWithDelay` utility is now used across the application to make API calls more resilient.
56
+ - **New Development Scripts**: Added `docs:generate` (for TypeDoc) and `inspect:stdio`/`inspect:http` (for MCP Inspector) to `package.json`.
57
+
58
+ ### Changed
59
+
60
+ - **Project Structure**: The entire project has been reorganized to align with the [`cyanheads/mcp-ts-template`](https://github.com/cyanheads/mcp-ts-template), improving separation of concerns (e.g., `services`, `mcp-server`, `types-global`).
61
+ - **Tool Consolidation and Enhancement**: The toolset has been redesigned for clarity and power:
62
+ - `obsidian_list_files` replaces `obsidian_list_files_in_vault` and `obsidian_list_files_in_dir`, offering more flexible filtering.
63
+ - `obsidian_read_file` replaces `obsidian_get_file_contents` and now supports returning content as structured JSON.
64
+ - `obsidian_update_file` replaces `obsidian_append_content` and `obsidian_update_content` with explicit modes (`append`, `prepend`, `overwrite`).
65
+ - `obsidian_global_search` replaces `obsidian_find_in_file` with added support for path/date filtering and pagination.
66
+ - `obsidian_manage_frontmatter` replaces `obsidian_get_properties` and `obsidian_update_properties` with atomic get/set/delete operations.
67
+ - `obsidian_manage_tags` replaces `obsidian_get_tags` and now manages both frontmatter and inline tags.
68
+ - **Configuration Overhaul**: Environment variables have been renamed for consistency and clarity.
69
+ - `OBSIDIAN_BASE_URL` now consolidates protocol, host, and port.
70
+ - New variables like `MCP_TRANSPORT_TYPE`, `MCP_LOG_LEVEL`, and `MCP_AUTH_SECRET_KEY` have been introduced.
71
+ - **Dependency Updates**: All dependencies, including the MCP SDK, have been updated to their latest stable versions.
72
+ - **Obsidian API Service**: The `ObsidianRestApiService` has been completely refactored into a modular class, providing a typed, resilient, and centralized client for all interactions with the Obsidian Local REST API.
73
+
74
+ ### Removed
75
+
76
+ - **Removed Tools**: The following tools from version 1.x have been removed and their functionality integrated into the new, more comprehensive tools:
77
+ - `obsidian_list_files_in_vault`
78
+ - `obsidian_list_files_in_dir`
79
+ - `obsidian_get_file_contents`
80
+ - `obsidian_append_content`
81
+ - `obsidian_update_content`
82
+ - `obsidian_find_in_file`
83
+ - `obsidian_complex_search` (path-based searching is now a filter in `obsidian_global_search`)
84
+ - `obsidian_get_tags`
85
+ - `obsidian_get_properties`
86
+ - `obsidian_update_properties`
87
+ - **Removed Resources**: The `obsidian://tags` resource has been removed. Tag information is now available through the `obsidian_manage_tags` tool. I may add the resource back in the future if there is demand for it. Please open an issue if you would like to see it return.
88
+ - **Old Configuration**: All old, non-prefixed environment variables (e.g., `VERIFY_SSL`, `REQUEST_TIMEOUT`) have been removed in favor of the new, standardized configuration schema.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![TypeScript](https://img.shields.io/badge/TypeScript-^5.8.3-blue.svg)](https://www.typescriptlang.org/)
4
4
  [![Model Context Protocol](https://img.shields.io/badge/MCP%20SDK-^1.12.1-green.svg)](https://modelcontextprotocol.io/)
5
- [![Version](https://img.shields.io/badge/Version-2.0.2-blue.svg)](./CHANGELOG.md)
5
+ [![Version](https://img.shields.io/badge/Version-2.0.3-blue.svg)](./CHANGELOG.md)
6
6
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
7
7
  [![Status](https://img.shields.io/badge/Status-Production-brightgreen.svg)](https://github.com/cyanheads/obsidian-mcp-server/issues)
8
8
  [![GitHub](https://img.shields.io/github/stars/cyanheads/obsidian-mcp-server?style=social)](https://github.com/cyanheads/obsidian-mcp-server)
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "obsidian-mcp-server",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Obsidian Knowledge-Management MCP (Model Context Protocol) server that enables AI agents and development tools to interact with an Obsidian vault. It provides a comprehensive suite of tools for reading, writing, searching, and managing notes, tags, and frontmatter, acting as a bridge to the Obsidian Local REST API plugin.",
5
5
  "main": "dist/index.js",
6
6
  "files": [
7
- "dist"
7
+ "dist",
8
+ "README.md",
9
+ "LICENSE",
10
+ "CHANGELOG.md"
8
11
  ],
9
12
  "bin": {
10
13
  "obsidian-mcp-server": "dist/index.js"