obsidian-git-mcp
This MCP server enables AI collaborators to read and write to a git-backed Obsidian vault with transactional integrity, ensuring every write is a validated, attributed commit pushed to the remote.
README
obsidian-git-mcp
An MCP server for git-backed Obsidian vaults. Every write an AI collaborator makes becomes a validated, attributed git commit pushed to the vault's canonical remote — or it doesn't happen at all.
What does it do?
- Wraps MCPVault in-process for the vault tool surface: search, read, create, patch, frontmatter, and tags.
- Runs every write as a git transaction: lock, verify the checkout is clean, fetch, fast-forward to the remote, apply the change, validate it, commit, push, and return the commit SHA.
- Rolls the checkout back to its pre-transaction state when any step fails, so a failed write leaves nothing behind.
- Refuses conflicting concurrent edits instead of guessing a merge. A push race with a non-conflicting remote commit retries a bounded number of times; an actual conflict stops immediately.
- Attributes each commit to the collaborator that made it, so
git log --author=ChatGPTis the audit trail. The service itself stays the committer. - Adds the git-aware tools MCPVault doesn't have:
vault_status,list_recent_changes, andappend_to_section. - Ships destructive tools (
delete_note,move_note) disabled by default, and denies.obsidian/writes and path traversal at both the path-filter and transaction layers.
Why create this?
My vault's main branch on GitHub is the canonical copy of my second brain, and AI collaborators read and write it directly. The existing git-flavored vault MCP servers either treat the local checkout as a disposable cache the remote overwrites, or batch writes on a debounce timer and push whenever — which means a concurrent edit can silently vanish, and a "successful" write may never reach the remote. That's not acceptable for a vault that multiple agents and my own devices sync against, so this server makes git the transaction boundary: a write either lands as a pushed, attributed, validated commit, or the checkout rolls back and the caller is told why.
Running it
Point the server at a normal git clone of your vault (never your live Obsidian directory — the checkout is the server's workspace and it will hard-reset it to the remote when recovering from a crash):
obsidian-git-mcp /path/to/vault-checkout
The server speaks MCP over stdio. Configuration comes from environment variables:
| Variable | Default | Purpose |
|---|---|---|
OGM_COLLABORATOR |
(required) | Name recorded as the git author of every write |
OGM_COLLABORATOR_EMAIL |
derived from the name | Email recorded as the git author |
OGM_SERVICE_NAME |
obsidian-git-mcp |
Name recorded as the git committer |
OGM_SERVICE_EMAIL |
service@obsidian-git-mcp.local |
Email recorded as the git committer |
OGM_BRANCH |
main |
Branch the transaction wrapper syncs and pushes |
OGM_REMOTE |
origin |
Remote the transaction wrapper fetches and pushes |
OGM_ALLOW_DESTRUCTIVE |
unset | Set to 1 to expose delete_note and move_note |
Example Claude Code registration:
claude mcp add vault -e OGM_COLLABORATOR="Claude Code" -- obsidian-git-mcp /path/to/vault-checkout
Status
Phase 1 spike: the contract-test suite and transaction wrapper are being built TDD-first to decide whether MCPVault stays the underlying tool surface. The verdict and its rationale will be recorded here.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。