obsidian-dev-memory
Obsidian Developer Memory MCP
ローカルModel Context Protocolサーバーで、CursorやGitHub CopilotなどのAIコーディングアシスタントに永続的なエンジニアリングメモリを提供します。
メモリはObsidianボールト内の通常のMarkdownファイルとして保存されます。Obsidianが実行されている必要はありません。コミュニティプラグインもObsidian APIキーも不要です。
同じstdio MCPサーバーがCursorとGitHub Copilot / VS Codeの両方で動作します。
アーキテクチャ
Cursor Agent --------------------\
\
> MCP stdio server
/ |
GitHub Copilot / VS Code --------/ v
obsidian-dev-memory
|
v
Obsidian Markdown VaultDeveloper opens spring-auth in Cursor
|
v
Cursor calls get_project_context("spring-auth")
|
v
AI sees current project state + recent decisions
|
v
Developer and AI implement feature
|
v
AI calls capture_work_session(...)
|
+--> session note
|
+--> Git branch/SHA recorded
|
v
Durable architecture choice?
|
yes
|
v
record_decision(...)Related MCP server: LumenCore
なぜ直接Markdownなのか?
ボールトが情報源です。ノートはObsidian、git、または任意のテキストエディタで読み取り・編集可能なままです。サーバーはObsidianが開いていることに依存せず、ホスト型メモリAPIと通信せず、独自のデータベースも書き込みません。
要件
Python 3.12+
ローカルのObsidianボールトディレクトリ
自動リポジトリスナップショットが必要な場合のみ、
PATH上のGit
インストール
git clone https://github.com/jmjava/obsidian-mcp.git
cd obsidian-mcp
uv syncuv syncは公式MCP Python SDKとプロジェクトパッケージをインストールします。
設定
必須:
export OBSIDIAN_VAULT_PATH="$HOME/Documents/ObsidianVault"オプション:
export OBSIDIAN_MEMORY_ROOT="AI Memory"OBSIDIAN_MEMORY_ROOTはデフォルトでAI Memoryです。エディタのMCP設定でこれらの変数を直接指定できます。このプロジェクトには.env.exampleがドキュメント用に含まれています。サーバーは.envファイルを自動的に読み込みません。
サーバーの実行
export OBSIDIAN_VAULT_PATH="/tmp/example-vault"
mkdir -p "$OBSIDIAN_VAULT_PATH"
uv run python -m obsidian_dev_memoryまたは:
uv run obsidian-dev-memoryプロセスはstdio上でMCPを話します。アプリケーションログをstdoutに書き込まないでください。診断情報はstderrに送られます。
Cursorのセットアップ
プロジェクトレベルのCursor設定は.cursor/mcp.jsonにあり、現在のmcpServers形式を使用します。ポータブルテンプレートはconfig/cursor.mcp.json.exampleにあります:
{
"mcpServers": {
"obsidian-dev-memory": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/obsidian-dev-memory-mcp",
"run",
"python",
"-m",
"obsidian_dev_memory"
],
"env": {
"OBSIDIAN_VAULT_PATH": "/ABSOLUTE/PATH/TO/OBSIDIAN/VAULT"
}
}
}
}このリポジトリには.cursor/rules/obsidian-memory.mdcも同梱されており、Cursorにメモリの読み書きのタイミングを指示します。
マシン固有の.cursor/mcp.jsonファイルはインストーラーによって作成され、ここにはコミットされません。
GitHub Copilot / VS Codeのセットアップ
ワークスペースのCopilot / VS Code設定は.vscode/mcp.jsonにあり、現在のservers形式を使用します。ポータブルテンプレートはconfig/vscode.mcp.json.exampleにあります:
{
"servers": {
"obsidian-dev-memory": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/obsidian-dev-memory-mcp",
"run",
"python",
"-m",
"obsidian_dev_memory"
],
"env": {
"OBSIDIAN_VAULT_PATH": "/ABSOLUTE/PATH/TO/OBSIDIAN/VAULT"
}
}
}
}.github/copilot-instructions.mdはCopilotにCursorと同じメモリ動作を提供します。
インストーラーの使用方法
このサーバーを別の開発プロジェクトに配線します:
./scripts/install-project.sh \
--project /home/user/src/example \
--vault /home/user/Documents/ObsidianVaultオプション:
./scripts/install-project.sh \
--project /home/user/src/example \
--vault /home/user/Documents/ObsidianVault \
--server /path/to/obsidian-dev-memory-mcp--serverが省略された場合、スクリプトは自身の場所からこのリポジトリを推測します。
インストーラーは以下を作成または更新します:
<project>/.cursor/mcp.json<project>/.cursor/rules/obsidian-memory.mdc<project>/.vscode/mcp.json<project>/.github/copilot-instructions.md
ターゲットプロジェクトまたはボールトが存在しない場合は明確に失敗し、MCP JSONをマージするため、無関係なサーバーが破壊されることはありません。
MCPツール
ツール | 目的 |
|
|
| 今日のセッションノートにタイムスタンプ付きセクションを追加する |
| 永続的な決定ノートを書き込む |
| 簡潔なプロジェクト状態ノートを置き換える |
| プロジェクトメモリのローカルファイル名およびテキスト検索 |
| ボール相対のMarkdownファイルを1つ読み取る |
|
|
get_project_contextは、プロジェクトが新しい場合、失敗する代わりに空のセクションを返します。
record_decisionはYYYY-MM-DD-<decision-slug>.mdを書き込みます。そのファイルが既に存在する場合、サーバーは上書きする代わりに数値サフィックス(-2、-3、...)を追加します。
capture_work_sessionはオプションのrepository_pathを受け入れます。そのパスがGitリポジトリの場合、ノートはリポジトリ名、ブランチ、短いSHA、ダーティ状態、および短い変更ファイルリストを記録します。完全な差分は決して書き込まれません。Git以外のパスは無視されます。
ボールのレイアウト
AI Memory/
└── Projects/
└── <project-slug>/
├── Project State.md
├── Sessions/
│ └── YYYY-MM-DD.md
└── Decisions/
└── YYYY-MM-DD-<decision-slug>.md
Daily/
└── YYYY-MM-DD.mdAI MemoryフォルダはOBSIDIAN_MEMORY_ROOTを尊重します。論理プロジェクト名はスラッグ化されます(Spring Authorization Server → spring-authorization-server)。
ワークフロー例
CursorまたはVS Codeでプロジェクトを開きます。
重要な作業の前に、アシスタントは
get_project_contextを呼び出します。意味のある実装の後に、
capture_work_sessionを呼び出します。アーキテクチャの選択が行われたとき、
record_decisionを呼び出します。全体的なステータスが変更されたとき、
update_project_stateを呼び出します。いつでもObsidianでボールを開いて、同じファイルを読み取ったり編集したりします。
セキュリティモデル
すべてのノートパスは
OBSIDIAN_VAULT_PATH内で解決される必要があります。絶対ノートパス、
../トラバーサル、検出可能なシンボリックリンクエスケープは拒否されます。書き込みは可能な場合、アトミック(
tempfile+os.replace)です。ツールは一般的なファイルシステムAPIではありません。
秘密に見える値(キー、トークン、JWT、秘密鍵、
password=代入)は、書き込まれる前に[redacted-secret]に置き換えられます。CursorルールとCopilot指示は、アシスタントにパスワード、APIキー、トークン、JWT、秘密鍵、
.envの内容、データベース資格情報、本番秘密、機密の顧客データを永続化しないように指示します。
テスト
テストは一時ディレクトリを使用し、実際のボールは使用しません。
uv run pytestより広範なローカルチェック:
export OBSIDIAN_VAULT_PATH="$HOME/Documents/ObsidianVault"
./scripts/smoke-test.shスモークテストは、環境変数、ボールディレクトリ、パッケージインポート、サーバー構築、pytestスイートを検証します。
トラブルシューティング
症状 | 確認すべき点 |
サーバーがすぐに終了する |
|
ツールがCursorに表示されない | プロジェクトの |
ツールがCopilotに表示されない | ワークスペースの |
|
|
決定ファイル名が既に存在した | サーバーは上書きする代わりに |
セッションにGitセクションがない |
|
予期しないstdoutノイズ | MCP JSON-RPCのみがstdoutを使用する必要があります。ログはstderrに属します |
ライセンス
MIT。LICENSEを参照してください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceProvides persistent memory for AI coding assistants, storing and retrieving architectural decisions, patterns, and solutions across sessions using semantic search, while also offering git integration for commit messages and code expertise mapping.MIT- AlicenseNot gradedqualityCmaintenanceProvides AI coding assistants with persistent project memory to retain architectural decisions, code patterns, and domain knowledge across sessions. It stores data locally in a SQLite database, allowing agents to remember, recall, and manage project-specific context using full-text search.8Apache 2.0
- AlicenseNot gradedqualityDmaintenanceProvides persistent long-term memory for AI assistants with tag-based retrieval, wiki-style linking, and source references, storing memories as markdown files with SQLite index.1MIT
- AlicenseNot gradedqualityBmaintenanceProvides persistent, searchable memory and knowledge capture for AI-assisted development, enabling agents to retain decisions, bugs, and patterns across sessions and projects.MIT
Related MCP Connectors
Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.
Persistent memory for AI agents. Search, store, and recall across sessions.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jmjava/obsidian-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server