@mauricio.wolff/mcp-obsidian 0.5.2 → 0.5.4
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/README.md +10 -10
- package/dist/server.js +1 -1
- package/dist/src/filesystem.js +4 -2
- package/dist/src/frontmatter.js +2 -3
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ A lightweight Model Context Protocol (MCP) server for safe Obsidian vault access
|
|
|
16
16
|
|
|
17
17
|
If using the published package:
|
|
18
18
|
```bash
|
|
19
|
-
npx @modelcontextprotocol/inspector npx @mauricio.wolff/mcp-obsidian /path/to/your/vault
|
|
19
|
+
npx @modelcontextprotocol/inspector npx @mauricio.wolff/mcp-obsidian@latest /path/to/your/vault
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
3. **Configure your AI client:**
|
|
@@ -27,7 +27,7 @@ A lightweight Model Context Protocol (MCP) server for safe Obsidian vault access
|
|
|
27
27
|
"mcpServers": {
|
|
28
28
|
"obsidian": {
|
|
29
29
|
"command": "npx",
|
|
30
|
-
"args": ["@mauricio.wolff/mcp-obsidian", "/path/to/your/vault"]
|
|
30
|
+
"args": ["@mauricio.wolff/mcp-obsidian@latest", "/path/to/your/vault"]
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -39,7 +39,7 @@ A lightweight Model Context Protocol (MCP) server for safe Obsidian vault access
|
|
|
39
39
|
"mcpServers": {
|
|
40
40
|
"obsidian": {
|
|
41
41
|
"command": "npx",
|
|
42
|
-
"args": ["@mauricio.wolff/mcp-obsidian", "/path/to/your/vault"],
|
|
42
|
+
"args": ["@mauricio.wolff/mcp-obsidian@latest", "/path/to/your/vault"],
|
|
43
43
|
"env": {}
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -88,7 +88,7 @@ A lightweight Model Context Protocol (MCP) server for safe Obsidian vault access
|
|
|
88
88
|
No installation needed! Use `npx` to run directly:
|
|
89
89
|
|
|
90
90
|
```bash
|
|
91
|
-
npx @mauricio.wolff/mcp-obsidian /path/to/your/obsidian/vault
|
|
91
|
+
npx @mauricio.wolff/mcp-obsidian@latest /path/to/your/obsidian/vault
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
### For Developers
|
|
@@ -110,7 +110,7 @@ npx @modelcontextprotocol/inspector npm start /path/to/your/vault
|
|
|
110
110
|
|
|
111
111
|
**End users:**
|
|
112
112
|
```bash
|
|
113
|
-
npx @mauricio.wolff/mcp-obsidian /path/to/your/obsidian/vault
|
|
113
|
+
npx @mauricio.wolff/mcp-obsidian@latest /path/to/your/obsidian/vault
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
**Developers:**
|
|
@@ -130,7 +130,7 @@ Add to your Claude Desktop configuration file:
|
|
|
130
130
|
"mcpServers": {
|
|
131
131
|
"obsidian": {
|
|
132
132
|
"command": "npx",
|
|
133
|
-
"args": ["@mauricio.wolff/mcp-obsidian", "/Users/yourname/Documents/MyVault"]
|
|
133
|
+
"args": ["@mauricio.wolff/mcp-obsidian@latest", "/Users/yourname/Documents/MyVault"]
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
}
|
|
@@ -142,11 +142,11 @@ Add to your Claude Desktop configuration file:
|
|
|
142
142
|
"mcpServers": {
|
|
143
143
|
"obsidian-personal": {
|
|
144
144
|
"command": "npx",
|
|
145
|
-
"args": ["@mauricio.wolff/mcp-obsidian", "/Users/yourname/Documents/PersonalVault"]
|
|
145
|
+
"args": ["@mauricio.wolff/mcp-obsidian@latest", "/Users/yourname/Documents/PersonalVault"]
|
|
146
146
|
},
|
|
147
147
|
"obsidian-work": {
|
|
148
148
|
"command": "npx",
|
|
149
|
-
"args": ["@mauricio.wolff/mcp-obsidian", "/Users/yourname/Documents/WorkVault"]
|
|
149
|
+
"args": ["@mauricio.wolff/mcp-obsidian@latest", "/Users/yourname/Documents/WorkVault"]
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
}
|
|
@@ -182,7 +182,7 @@ Edit `~/.claude.json`:
|
|
|
182
182
|
"mcpServers": {
|
|
183
183
|
"obsidian": {
|
|
184
184
|
"command": "npx",
|
|
185
|
-
"args": ["@mauricio.wolff/mcp-obsidian", "/path/to/your/vault"],
|
|
185
|
+
"args": ["@mauricio.wolff/mcp-obsidian@latest", "/path/to/your/vault"],
|
|
186
186
|
"env": {}
|
|
187
187
|
}
|
|
188
188
|
}
|
|
@@ -198,7 +198,7 @@ Edit `.claude.json` in your project or add to the projects section:
|
|
|
198
198
|
"mcpServers": {
|
|
199
199
|
"obsidian": {
|
|
200
200
|
"command": "npx",
|
|
201
|
-
"args": ["@mauricio.wolff/mcp-obsidian", "/path/to/your/vault"]
|
|
201
|
+
"args": ["@mauricio.wolff/mcp-obsidian@latest", "/path/to/your/vault"]
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
}
|
package/dist/server.js
CHANGED
|
@@ -18,7 +18,7 @@ const fileSystem = new FileSystemService(vaultPath, pathFilter, frontmatterHandl
|
|
|
18
18
|
const searchService = new SearchService(vaultPath, pathFilter);
|
|
19
19
|
const server = new Server({
|
|
20
20
|
name: "mcp-obsidian",
|
|
21
|
-
version: "0.5.
|
|
21
|
+
version: "0.5.4"
|
|
22
22
|
}, {
|
|
23
23
|
capabilities: {
|
|
24
24
|
tools: {},
|
package/dist/src/filesystem.js
CHANGED
|
@@ -130,13 +130,15 @@ export class FileSystemService {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
async listDirectory(path = '') {
|
|
133
|
-
|
|
133
|
+
// Normalize path: treat '.' as root directory
|
|
134
|
+
const normalizedPath = path === '.' ? '' : path;
|
|
135
|
+
const fullPath = this.resolvePath(normalizedPath);
|
|
134
136
|
try {
|
|
135
137
|
const entries = await readdir(fullPath, { withFileTypes: true });
|
|
136
138
|
const files = [];
|
|
137
139
|
const directories = [];
|
|
138
140
|
for (const entry of entries) {
|
|
139
|
-
const entryPath =
|
|
141
|
+
const entryPath = normalizedPath ? `${normalizedPath}/${entry.name}` : entry.name;
|
|
140
142
|
if (!this.pathFilter.isAllowed(entryPath)) {
|
|
141
143
|
continue;
|
|
142
144
|
}
|
package/dist/src/frontmatter.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import matter from 'gray-matter';
|
|
2
|
-
import * as yaml from 'js-yaml';
|
|
3
2
|
export class FrontmatterHandler {
|
|
4
3
|
parse(content) {
|
|
5
4
|
try {
|
|
@@ -38,8 +37,8 @@ export class FrontmatterHandler {
|
|
|
38
37
|
warnings: []
|
|
39
38
|
};
|
|
40
39
|
try {
|
|
41
|
-
// Test if the frontmatter can be serialized to valid YAML using
|
|
42
|
-
|
|
40
|
+
// Test if the frontmatter can be serialized to valid YAML using gray-matter
|
|
41
|
+
matter.stringify('', frontmatterData);
|
|
43
42
|
}
|
|
44
43
|
catch (error) {
|
|
45
44
|
result.isValid = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mauricio.wolff/mcp-obsidian",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Lightweight MCP server for safe Obsidian vault access",
|
|
5
5
|
"author": "bitbonsai",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,9 +34,7 @@
|
|
|
34
34
|
"@types/node": "^20.0.0",
|
|
35
35
|
"tsx": "^4.0.0",
|
|
36
36
|
"typescript": "^5.0.0",
|
|
37
|
-
"vitest": "^1.0.0"
|
|
38
|
-
"js-yaml": "^4.1.0",
|
|
39
|
-
"@types/js-yaml": "^4.0.0"
|
|
37
|
+
"vitest": "^1.0.0"
|
|
40
38
|
},
|
|
41
39
|
"engines": {
|
|
42
40
|
"node": ">=18.0.0"
|