Obsidian Second Brain MCP
Allows AI agents to read from and append to an Obsidian vault for durable project memory, enabling logging bugs, features, decisions, and session closeouts.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Obsidian Second Brain MCP start project memory for this repository"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Obsidian Second Brain MCP and Skill
Local MCP server and Codex skill for Obsidian-backed project memory.
This project turns an Obsidian vault into durable project context for AI coding agents. It is meant to complement tools like CodeGraph:
CodeGraph answers: "How does this code work?"
Obsidian Second Brain MCP answers: "What do we know about this project, bug, feature, decision, session, release, and next action?"
The server is local-first. It reads and appends Markdown files in your Obsidian vault. It does not require a cloud service, API key, or hosted database.
What It Provides
MCP tools:
project_memory_start- load a compact project context pack before meaningful work.project_memory_status- check repo-to-Obsidian linkage.project_memory_log_bug- record bug reports, investigation, fixes, verification, and next actions.project_memory_log_feature- record feature intent, implementation, verification, and follow-up.project_memory_record_decision- record durable choices and rationale.project_memory_close_session- write a session closeout with outcome, changed files, verification, open questions, next actions, and deployment status.
CLI commands:
obsidian-second-brain-mcp serveobsidian-second-brain-mcp initobsidian-second-brain-mcp statusobsidian-second-brain-mcp agents-snippet
Codex skill:
skills/obsidian-second-brain-mcp/SKILL.md
Related MCP server: Markdown Memory Context MCP Server
Requirements
Node.js 20 or newer.
An Obsidian vault stored on the local filesystem.
An AI agent that supports MCP over stdio, such as Codex CLI.
Install From Source
git clone https://github.com/YOUR-USERNAME/obsidian-second-brain-mcp-and-skill.git
cd obsidian-second-brain-mcp-and-skill
npm install
npm run build
npm linkConfirm the CLI is available:
obsidian-second-brain-mcp --helpConfigure Codex MCP
Add this MCP server to your Codex config. The exact config file location may vary by Codex version, but a common location is:
~/.codex/config.tomlExample:
[mcp_servers.obsidian_second_brain]
command = "obsidian-second-brain-mcp"
args = ["serve"]Restart Codex after editing MCP config.
Link A Repo To An Obsidian Project
From the repo you want to document:
obsidian-second-brain-mcp init \
--project "Example Project" \
--vault "/absolute/path/to/your/Obsidian Vault" \
--obsidian-project "01_Projects/Example Project" \
--write-agentsThis creates:
.obsidian-second-brain.json
AGENTS.mdIt also creates missing starter notes inside the configured Obsidian project folder:
Project Brief.md
Bugs.md
Decisions.md
Runbook.md
Next Actions.md
Activity Log.md
Changelog.md
Releases.md
Open Questions.md
Session Log.mdCheck the link:
obsidian-second-brain-mcp statusRepo Config
Each linked repo has a .obsidian-second-brain.json file:
{
"projectName": "Example Project",
"projectCode": "EP",
"vaultPath": "/absolute/path/to/your/Obsidian Vault",
"obsidianProjectPath": "01_Projects/Example Project",
"hubNote": "EP_ExampleProject_Home.md"
}If you do not want to store vaultPath in each repo, omit it and set:
export OBSIDIAN_VAULT_PATH="/absolute/path/to/your/Obsidian Vault"Do not commit .obsidian-second-brain.json if it contains private local paths. Use examples/project-config.example.json as the public template.
Install The Codex Skill
Copy the skill folder into your Codex skills directory:
mkdir -p ~/.codex/skills
cp -R skills/obsidian-second-brain-mcp ~/.codex/skills/Restart Codex. The skill tells Codex when to use the MCP tools during project work.
Intended Agent Workflow
When you start work in a linked repo, the agent should:
Call
project_memory_startwith the repo path.Use the returned project notes as durable context.
For bugs, call
project_memory_log_bugduring investigation and again when fixed or verified.For features, call
project_memory_log_featurewhen scope or implementation becomes clear.Use
project_memory_record_decisionfor durable choices.Before final response, call
project_memory_close_sessionif meaningful work happened.Ask whether to deploy or release when deployment status is relevant but not known.
Privacy
This repo contains no personal vault paths, project names, API keys, or private notes.
The MCP server runs locally and only reads/writes files in the vault path you configure. It does not send your notes anywhere.
You should still avoid committing:
.obsidian-second-brain.jsonfiles with private paths.Obsidian notes copied from a private vault.
Secrets or API keys in project notes.
Development
npm install
npm run typecheck
npm run buildRun the server manually:
obsidian-second-brain-mcp serveLicense
MIT
Available Tools
6 toolsproject_memory_close_sessionA
Close the loop after meaningful work by appending a session record to Obsidian. Use before final response when code, docs, bugs, features, tests, or deployment status changed.
Inputs: outcome (required), projectPath (required), blocked, changed, +5 more.
project_memory_log_bugB
Append a bug investigation or fix record to Obsidian. Use when a bug is identified, investigated, fixed, verified, or left blocked.
Inputs: title (required), projectPath (required), fix, status, +5 more.
project_memory_log_featureB
Append a feature planning or implementation record to Obsidian. Use when starting, changing, completing, or deferring feature work.
Inputs: title (required), projectPath (required), scope, status, +5 more.
project_memory_record_decisionA
Record a durable project decision in Obsidian. Use when the agent or user chooses an approach, rejects alternatives, changes scope, or decides deployment/release behavior.
Inputs: why (required), decision (required), projectPath (required), impact, +1 more.
project_memory_startA
Load the compact Obsidian project memory pack for this repo before meaningful work. Use this at session start, before bug fixes, before feature work, and before project health reviews.
Inputs: projectPath (required), intent.
project_memory_statusA
Check whether this repo is linked to an Obsidian project memory pack and list missing standard notes.
Inputs: projectPath (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct purpose: starting/ending sessions, logging bugs/features, recording decisions, and checking status. Descriptions clearly differentiate them, leaving no ambiguity.
All tools share the 'project_memory_' prefix with verb_noun for most (close_session, log_bug, etc.). 'start' and 'status' deviate slightly (verb only and noun only), but the pattern remains highly predictable.
Six tools cover the essential operations for a project memory system without excess. Each tool serves a clear, non-redundant purpose.
The tool set covers the full lifecycle of project memory: start, log (bugs, features, decisions), close, and status check. No obvious gaps for the intended domain.
Maintenance
Related MCP Connectors
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Personal context for every AI: search, read, and write back to your private Markdown library.
Open-source Obsidian for MDX - edit local docs with agent assistance
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI agents to explore, search, and manage local Obsidian vault documents with tools for document search, automatic frontmatter property generation, and attachment organization.5205 npm2ISC
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to maintain a structured Markdown or Obsidian memory vault with tools for reading, writing, searching, and organizing notes.MIT
- AlicenseAqualityDmaintenanceProvides AI agents with direct filesystem access to an Obsidian vault for note management, task orchestration, context persistence, and git synchronization.2762 npm3MIT
- AlicenseAqualityDmaintenanceEnables AI coding agents to read, write, search, and organize notes in an Obsidian vault directly via the filesystem.133,512 npmMIT