Logo Obsidian Multivault MCP

Obsidian Multivault MCP

Cộng đồng
bepitulaz

Multi-vault and multiuser Obsidian MCP

Nhà phát hànhbepitulaz
Kho mãobsidian-multivault-mcp
Ngôn ngữTypeScript
Bản fork
7
Sao
61
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Obsidian Multivault MCP cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    61 sao và 7 bản fork từ kho mã được liên kết.

obsidian-multivault-mcp

An MCP server that gives Claude read/write access to Obsidian vaults that live on a VPS — built for multiple vaults and multiple users from a single deployment. Everyone shares one server; each person is routed to their own private vault by the passphrase they log in with (HTTP mode) or by the vault path Claude Desktop launches with (stdio mode). The server runs on the VPS with direct filesystem access to the vaults.

Features

  • Multi-vault, multi-user — one server serves many people, each mapped to their own vault. In HTTP mode everyone adds the same connector URL and their distinct login passphrase decides which vault they get; in stdio mode each Claude Desktop passes its own vault path.
  • Two transports from one codebase — stdio over ssh (Claude Desktop) and an OAuth-protected Streamable HTTP endpoint (Claude mobile/web/desktop remote connectors).
  • Read/write tools with strict path safety — vault-relative paths only; .., absolute paths, symlink escapes, and null bytes are rejected; writes limited to an extension allowlist. Optional --read-only and per-user readOnly.
  • Self-hosted OAuth 2.1 — passphrase login, PKCE, JWT access tokens, and Dynamic Client Registration, so no third-party auth service is needed.
  • Single-file deploy — esbuild bundles everything to one dist/index.js; deploy is a one-file copy.

There is no SSH library inside the server — SSH is only the transport Claude Desktop uses to start it and exchange JSON-RPC. Part of a "centralise the vaults on the VPS" setup:

  Mac                                            VPS (always-on)
  ┌ Obsidian app ──(obsidian-remote-ssh plugin)── SSH ─▶ Go daemon ─┐
  │                                                                 ├─▶  a user's vault
  └ Claude Desktop ─(ssh stdio → node index.js)── SSH ─▶ THIS server┘        ▲
                                                                     Hermes agent (direct fs)

Tools

Read: list_notes, read_note, search_notes. Write (disabled with --read-only): write_note, create_note, append_to_note, edit_note, delete_note, move_note.

All paths are vault-relative and confined to the vault root — .., absolute paths, symlink escapes, and null bytes are rejected; writes/deletes/moves are restricted to allowed extensions (.md, .markdown, .canvas, .txt by default; override with --ext).

Build & test locally

bash
npm install
npm run build            # bundles to dist/index.js (single file)
npm run smoke            # spins up the server against a temp vault and exercises every tool
npm run typecheck        # optional: tsc --noEmit

You can also drive it interactively with the MCP Inspector:

bash
npm run inspect -- /absolute/path/to/a/vault

Deploy to the VPS

Requires Node 20+ on the VPS.

bash
VPS=user@your-vps DEST=obsidian-multivault-mcp ./scripts/deploy.sh
# copies dist/index.js to  ~/obsidian-multivault-mcp/index.js  on the VPS

Smoke-test the remote copy from your Mac (should print a startup line on stderr, then wait):

bash
ssh user@your-vps node obsidian-multivault-mcp/index.js /absolute/path/to/vault
# Ctrl-C to stop

Wire up Claude Desktop (per Mac)

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{
  "mcpServers": {
    "obsidian-multivault": {
      "command": "ssh",
      "args": [
        "youruser@your-vps",
        "node",
        "/home/youruser/obsidian-multivault-mcp/index.js",
        "/home/youruser/alice-vault"
      ]
    }
  }
}

Restart Claude Desktop. A second Mac (different vault on the same VPS) uses the same block with that Mac's vault path as the last argument.

Notes:

  • ssh must authenticate non-interactively (key auth, no passphrase prompt) — test with ssh user@your-vps true.
  • Add "--read-only" as a final arg to expose only the read tools.
  • Config is passed as CLI args, not env, because ssh does not forward environment variables by default.

CLI

node index.js <vault-root> [--read-only] [--ext .md,.canvas] [--http [--port 8787] [--host 127.0.0.1]]

Default (no --http): stdio transport, launched over ssh by Claude Desktop (above). With --http: a long-lived HTTP server for Claude's remote connectors, including the mobile app (see below).


Reach it from the Claude mobile app (remote connector)

The mobile app can't use ssh. Like claude.ai / Desktop / Cowork, it connects to remote MCP servers from Anthropic's cloud, over Streamable HTTP to a public HTTPS URL. So the same server also runs an HTTP transport (--http) fronted by a self-hosted OAuth 2.1 layer — the ssh key gate is gone once it's public, so a login gate replaces it.

Claude mobile ──HTTPS──▶ Caddy (:443, auto Let's Encrypt)  ─▶  node index.js --http (127.0.0.1:8787)
                          203-0-113-10.sslip.io                 ├ OAuth 2.1 (passphrase login, PKCE, JWT)
                                                                  └ /mcp  (guarded by bearer JWT)  ─▶ vault

The stdio/ssh path for Claude Desktop is unchanged and runs independently.

HTTP-mode configuration (env vars)

--http reads these from the environment:

VarRequiredMeaning
MCP_PUBLIC_URLyesPublic origin, e.g. https://203-0-113-10.sslip.io. Used as the OAuth issuer/audience.
MCP_JWT_SECRETyes32+ random bytes used to sign access/refresh tokens. Rotating it revokes all tokens.
MCP_USERS_FILEone ofPer-user {id, passphrase, vault} map (see below) — for multiple people/vaults.
MCP_AUTH_PASSPHRASEone ofSingle-user shortcut: the login passphrase for the one vault given as the CLI arg. Use this or MCP_USERS_FILE.
MCP_CLIENTS_FILEnoWhere DCR client registrations persist (default: next to index.js).
MCP_NO_AUTHnoSet to 1 to disable auth — local testing only, never public.

Multiple people, multiple vaults

Point MCP_USERS_FILE at a JSON file with one entry per person — each distinct passphrase maps to that person's own vault. Everyone adds the same connector URL in their own Claude account; the passphrase they log in with is what routes them to the right vault. See users.example.json.

json
{
  "users": [
    { "id": "alice", "passphrase": "a-long-passphrase",           "vault": "/home/youruser/alice-vault" },
    { "id": "bob",   "passphrase": "a-DIFFERENT-long-passphrase", "vault": "/home/youruser/bob-vault", "readOnly": false }
  ]
}

In this mode the CLI vault argument is not needed (node dist/index.js --http). Optional per-user keys: readOnly and ext.

Test HTTP mode locally

bash
npm run build
npm run smoke:http           # spins up two servers: tools-over-HTTP + full OAuth handshake

# Or drive it by hand (auth disabled) with the MCP Inspector:
MCP_NO_AUTH=1 node dist/index.js /path/to/vault --http --port 8787
#   → point the Inspector (Streamable HTTP) at http://localhost:8787/mcp

Deploy to a public HTTPS endpoint (VPS)

See DEPLOY.md for the full, copy-pasteable runbook — installing Caddy, the /etc/obsidian-multivault-mcp.env secrets, the systemd unit, the Caddyfile, firewall, verification, and troubleshooting. It's written so an agent with shell access on the VPS can follow it end to end.

In short: sslip.io gives an HTTPS-capable hostname for the bare IP with no domain purchase (203-0-113-10.sslip.io → 203.0.113.10); Caddy terminates TLS on 443 and reverse-proxies to the Node service on 127.0.0.1:8787; the service runs under systemd reading its secrets from /etc/obsidian-multivault-mcp.env. Requires Node 20+ and ports 80 + 443 open.

Add it in the Claude mobile app

Settings → Connectors → Add custom connector → paste https://203-0-113-10.sslip.io/mcp → leave Advanced settings (Client ID/Secret) blank (the server supports Dynamic Client Registration) → Add. When prompted, complete the browser login with your own passphrase. All tools then appear. Each person adds the same URL in their own Claude account and logs in with their own passphrase to reach their own vault.

Security notes (the public surface is read + write)

  • The passphrase and JWT secret live only in the mode-600 EnvironmentFile. Use a strong passphrase.
  • Access tokens are short-lived (1h) JWTs; rotate MCP_JWT_SECRET to revoke everything immediately.
  • Run --read-only in the systemd unit if you don't need mobile writes — it shrinks the blast radius.
  • Keep the Node service bound to 127.0.0.1; only Caddy faces the internet, over HTTPS.

Cài đặt

TypingMind
{
  "mcpServers": {
    "obsidian-multivault-mcp": {
      "command": "ssh",
      "args": [
        "{{config.SSH_USER_HOST}}",
        "node",
        "{{config.REMOTE_PATH}}",
        "{{config.VAULT_PATH}}",
        "{{config.READ_ONLY_FLAG}}"
      ],
      "env": {
        "SSH_USER_HOST": "<SSH_USER_HOST>",
        "REMOTE_PATH": "<REMOTE_PATH>",
        "VAULT_PATH": "<VAULT_PATH>"
      }
    }
  }
}

Dùng MCP Obsidian Multivault MCP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Obsidian Multivault MCP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Obsidian Multivault MCP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Obsidian Multivault MCP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "obsidian-multivault-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "obsidian-multivault-mcp"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Obsidian Multivault MCP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Obsidian Multivault MCP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Obsidian Multivault MCP giúp tôi làm việc này không?
Obsidian Multivault MCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Obsidian Multivault MCP.

Câu hỏi thường gặp

Máy chủ MCP Obsidian Multivault MCP dùng để làm gì?

Obsidian Multivault MCP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Obsidian Multivault MCP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Obsidian Multivault MCP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Obsidian Multivault MCP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Obsidian Multivault MCP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Obsidian Multivault MCP với TypingMind?

Obsidian Multivault MCP hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Obsidian Multivault MCP cung cấp những công cụ nào trong TypingMind?

Obsidian Multivault MCP cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Obsidian Multivault MCP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Obsidian Multivault MCP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇