obsidian-mcp-rs 0.1.1

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/bin/bin.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
package/bin/bin.js ADDED
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const node_child_process_1 = require("node:child_process");
5
+ const node_fs_1 = require("node:fs");
6
+ const node_path_1 = require("node:path");
7
+ function detectPlatform() {
8
+ const { platform, arch } = process;
9
+ if (platform === "darwin") {
10
+ return arch === "arm64" ? "darwin-arm64" : "darwin-x64";
11
+ }
12
+ if (platform === "win32") {
13
+ return arch === "arm64" ? "win32-arm64" : "win32-x64";
14
+ }
15
+ if (platform === "linux") {
16
+ const isMusl = detectMusl();
17
+ if (arch === "arm64")
18
+ return "linux-arm64";
19
+ return isMusl ? "linux-x64-musl" : "linux-x64";
20
+ }
21
+ throw new Error(`Unsupported platform: ${platform}/${arch}`);
22
+ }
23
+ function detectMusl() {
24
+ try {
25
+ const { execSync } = require("node:child_process");
26
+ const output = execSync("ldd --version 2>&1 || true", {
27
+ encoding: "utf8",
28
+ stdio: ["pipe", "pipe", "pipe"],
29
+ });
30
+ return output.toLowerCase().includes("musl");
31
+ }
32
+ catch {
33
+ return false;
34
+ }
35
+ }
36
+ function resolveBinaryPath(platform) {
37
+ const packageName = `@obsidian-mcp-rs/${platform}`;
38
+ const binaryName = platform.startsWith("win32") ? "obsidian-mcp-rs.exe" : "obsidian-mcp-rs";
39
+ const candidates = [
40
+ () => {
41
+ const packageDir = require.resolve(`${packageName}/package.json`);
42
+ return (0, node_path_1.join)(packageDir, "..", binaryName);
43
+ },
44
+ () => (0, node_path_1.join)(__dirname, "..", "..", "..", `${packageName.replace("@obsidian-mcp-rs/", "")}`, binaryName),
45
+ ];
46
+ for (const candidate of candidates) {
47
+ try {
48
+ const p = candidate();
49
+ if ((0, node_fs_1.existsSync)(p))
50
+ return p;
51
+ }
52
+ catch {
53
+ // continue
54
+ }
55
+ }
56
+ throw new Error(`Could not find the obsidian-mcp-rs binary for platform '${platform}'.\n` +
57
+ `Make sure the package '${packageName}' is installed.\n` +
58
+ `Run: npm install ${packageName}`);
59
+ }
60
+ function main() {
61
+ const platform = detectPlatform();
62
+ const binaryPath = resolveBinaryPath(platform);
63
+ const args = process.argv.slice(2);
64
+ const result = (0, node_child_process_1.spawnSync)(binaryPath, args, {
65
+ stdio: "inherit",
66
+ env: process.env,
67
+ });
68
+ if (result.error) {
69
+ throw result.error;
70
+ }
71
+ process.exit(result.status ?? 0);
72
+ }
73
+ main();
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "obsidian-mcp-rs",
3
+ "version": "0.1.1",
4
+ "description": "Rust MCP server for Obsidian vaults — read, write, search notes via Model Context Protocol. Works with Claude, Cursor, and any MCP client.",
5
+ "keywords": [
6
+ "obsidian",
7
+ "mcp",
8
+ "mcp-server",
9
+ "model-context-protocol",
10
+ "notes",
11
+ "vault",
12
+ "obsidian-vault",
13
+ "ai",
14
+ "ai-assistant",
15
+ "claude",
16
+ "cursor",
17
+ "llm",
18
+ "rust",
19
+ "markdown",
20
+ "knowledge-base",
21
+ "note-taking",
22
+ "cross-platform",
23
+ "stdio",
24
+ "npx",
25
+ "obsidian-plugin"
26
+ ],
27
+ "homepage": "https://github.com/MrRefactoring/obsidian-mcp-rs",
28
+ "bugs": {
29
+ "url": "https://github.com/MrRefactoring/obsidian-mcp-rs/issues"
30
+ },
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/MrRefactoring/obsidian-mcp-rs.git"
34
+ },
35
+ "license": "MIT",
36
+ "author": "Vladislav Tupikin",
37
+ "type": "commonjs",
38
+ "main": "./bin/bin.js",
39
+ "bin": {
40
+ "obsidian-mcp-rs": "./bin/bin.js"
41
+ },
42
+ "files": ["bin", "README.md"],
43
+ "scripts": {
44
+ "build": "tsc",
45
+ "prepublishOnly": "npm run build"
46
+ },
47
+ "optionalDependencies": {
48
+ "@obsidian-mcp-rs/darwin-arm64": "0.1.1",
49
+ "@obsidian-mcp-rs/darwin-x64": "0.1.1",
50
+ "@obsidian-mcp-rs/linux-arm64": "0.1.1",
51
+ "@obsidian-mcp-rs/linux-x64": "0.1.1",
52
+ "@obsidian-mcp-rs/linux-x64-musl": "0.1.1",
53
+ "@obsidian-mcp-rs/win32-arm64": "0.1.1",
54
+ "@obsidian-mcp-rs/win32-x64": "0.1.1"
55
+ },
56
+ "devDependencies": {
57
+ "@types/node": "^22.0.0",
58
+ "typescript": "^6.0.0"
59
+ },
60
+ "engines": {
61
+ "node": ">=22"
62
+ }
63
+ }