obsidian-mcp-server

obsidian-mcp-server

Gives Claude direct access to an Obsidian vault, enabling read, write, search, and automatic git sync for cross-device use.

Category
访问服务器

README

obsidian-mcp-server

An MCP server that gives Claude direct access to your Obsidian vault — read, write, search, daily notes, tags, backlinks, frontmatter, and automatic git sync so your vault stays up to date across every device.

Tools

Tool Description
obsidian_read Read a note by path
obsidian_write Create or overwrite a note (auto git push)
obsidian_append Append to a note (auto git push)
obsidian_delete Delete a note (auto git push)
obsidian_move Move or rename a note (auto git push)
obsidian_list List all notes or a subdirectory
obsidian_search Full-text search with context
obsidian_find Fuzzy search notes by title
obsidian_tags Tag index — all tags and the notes that use them
obsidian_query Find notes by frontmatter field (e.g. status: in-progress)
obsidian_today Get or create today's daily note
obsidian_template Create a note from a template
obsidian_frontmatter Read or update YAML frontmatter
obsidian_links Outgoing wikilinks + incoming backlinks
obsidian_pull Pull latest from git
obsidian_push Manually commit and push all changes

Setup

Prerequisites

  • Node.js 18+
  • A GitHub account
  • Your Obsidian vault on your local machine

0. Set up your vault as a git repo

If your vault isn't already on GitHub, do this once:

cd "/path/to/your/Obsidian Vault"
git init
git branch -m main
git add -A
git commit -m "initial commit"

Then create a repo on GitHub (private recommended) and link it:

gh repo create my-obsidian-vault --private --source=. --remote=origin --push
# or without the GitHub CLI:
git remote add origin https://github.com/yourusername/my-obsidian-vault.git
git push -u origin main

On any other device, just clone it:

git clone https://github.com/yourusername/my-obsidian-vault.git "/path/to/vault"

1. Clone and install

git clone https://github.com/aumsuthar/obsidian-mcp-server.git
cd obsidian-mcp-server
npm install
npm run build

2. Configure environment

cp .env.example .env

Edit .env and set OBSIDIAN_VAULT_PATH to the absolute path of your vault on this device:

OBSIDIAN_VAULT_PATH="/Users/you/Documents/My Vault"

That's the only required variable. See .env.example for optional settings (daily notes format, auto-sync intervals, etc.).

3. Register with Claude

Add to ~/.mcp.json:

{
  "mcpServers": {
    "obsidian": {
      "command": "node",
      "args": [
        "--env-file=/path/to/obsidian-mcp-server/.env",
        "/path/to/obsidian-mcp-server/dist/index.js"
      ]
    }
  }
}

Restart Claude Code or Claude Desktop to pick it up.


Cross-device sync

Your vault path is set per-device in .env — so on each machine you just clone the vault repo, clone this repo, set OBSIDIAN_VAULT_PATH in .env, and you're done. The vault content stays in sync via git.

Workflow:

  1. On device A: Claude writes a note → auto-commits and pushes to GitHub
  2. On device B: call obsidian_pull (or set OBSIDIAN_AUTO_PULL_MINUTES) before reading

Auto-sync

Set these in .env to sync automatically in the background:

OBSIDIAN_AUTO_PUSH_MINUTES=5   # commit and push every 5 minutes if there are changes
OBSIDIAN_AUTO_PULL_MINUTES=5   # pull every 5 minutes

Daily notes

obsidian_today creates a daily note in the Daily/ folder using the YYYY-MM-DD format by default.

To customize:

OBSIDIAN_DAILY_DIR="Journal"
OBSIDIAN_DAILY_FORMAT="YYYY/MM/YYYY-MM-DD"

If a Templates/Daily.md exists in your vault, it will be used as the template. Supported variables: {{date}}, {{title}}.


Templates

Put .md files in your vault's Templates/ folder (configurable via OBSIDIAN_TEMPLATES_DIR). Call obsidian_template with the template name and any variables to substitute.

Example template Templates/Meeting.md:

---
date: {{date}}
type: meeting
---
# {{title}}

## Attendees

## Notes

## Action items

Development

npm run dev     # run with tsx (no build needed, loads .env)
npm run build   # compile to dist/

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选