Transform your Obsidian vault into a living, self-maintaining Second Brain for AI coding agents.
π Architecture Map β Β· π Changelog β Β· π¦ Roadmap
Every coding session you waste time re-explaining your project to the AI:
You: "We use Clerk for auth, Neon for DB, deploy to Vercel..."
AI: "Got it! Now what were those API conventions again?"
You: [explains again. and again. and again.]
Your AI assistant has no memory. Every session starts from zero.
Obsidian Second Mind is an MCP server that gives AI assistants persistent, structured memory by connecting directly to your Obsidian vault.
Session 1: You explain the architecture once β saved to vault
Session 2: AI loads context in 0.1s β starts coding immediately
Session N: AI remembers every decision ever made
One command at session start:
get_project_context("my-app") β PRD + Architecture + Guidelines + Last session
| Feature | Description |
|---|---|
| π Hybrid Search | Semantic (ChromaDB) + BM25 keyword with RRF fusion |
| 𧬠Temporal Knowledge Graph | Track how your tech stack evolves over time |
| π± Telegram Capture Bot | Throw ideas from your phone β vault instantly |
| π Cascade Ingest | One source automatically updates N related wiki pages |
| π§ Agent Memory | Session save/load β AI never loses context between sessions |
| πΊοΈ Architecture Scanner | Auto-generate Mermaid dependency maps from source code |
| π‘ Tech Radar | Scan GitHub trending β save relevant tools to vault |
| β‘ 100% Local | No cloud, no API keys, everything on your machine |
| π Zero Cost | Free forever β no subscriptions, no tokens |
graph TB
subgraph IDE["π₯οΈ IDE (Claude Code / Cursor / Gemini)"]
Agent["AI Agent"]
end
subgraph MCP["π MCP Server (18 core tools, +12 opt-in)"]
Search["π Hybrid Search"]
Graph["𧬠Knowledge Graph"]
Memory["π§ Agent Memory"]
Ingest["π₯ Cascade Ingest"]
Scout["π‘ Intelligence Layer"]
end
subgraph Storage["πΎ Local Storage"]
Vault["π Obsidian Vault"]
Chroma["ποΈ ChromaDB"]
TKG["π Temporal KG"]
Cache["β‘ Wake-up Cache"]
end
subgraph Capture["π± Capture Layer"]
Bot["π€ Telegram Bot"]
Radar["π‘ Auto Radar"]
end
Agent <-->|"JSON-RPC (stdio)"| MCP
Search --> Chroma
Search --> Vault
Graph --> TKG
Memory --> Cache
Ingest --> Vault
Bot -->|"inbox/"| Vault
Radar -->|"alerts"| Bot
Scout --> Vault
git clone https://github.com/nzt108-dev/obsidian-second-mind.git
cd obsidian-second-mind
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"cp .env.example .env
# Edit .env β set OBSIDIAN_BRIDGE_VAULT_PATH to your vaultobsidian-bridge indexClaude Code β add to ~/.claude.json:
{
"mcpServers": {
"obsidian-second-mind": {
"command": "/path/to/.venv/bin/obsidian-bridge",
"args": ["serve"]
}
}
}Cursor β add to .cursor/mcp.json:
{
"mcpServers": {
"obsidian-second-mind": {
"command": "/path/to/.venv/bin/obsidian-bridge",
"args": ["serve"]
}
}
}Gemini / Antigravity β add to MCP settings with the same format.
# 1. Create a bot via @BotFather in Telegram
# 2. Set token in .env:
# OBSIDIAN_BRIDGE_TELEGRAM_BOT_TOKEN=your-token
# OBSIDIAN_BRIDGE_TELEGRAM_ALLOWED_USERS=your-telegram-id
obsidian-bridge botNow send any message to your bot β it lands in vault/inbox/ and gets indexed.
18 tools are registered by default. The Temporal Knowledge Graph, GitHub
Radar / Auto Architect, and Tech-Radar-adjacent scout tools (12 more) are
disabled by default β a 2026-07 audit found them going unused (the
temporal KG has had ~11 facts since April with no active writers, and
_radar/_inbox sit empty because the GitHub radar already runs as a
separate cron job) and just adding noise to tool-selection. Set:
export OSM_ENABLE_EXTRA_TOOLS=1before starting the MCP server to register all 30 tools again.
| Tool | Description |
|---|---|
search_vault(query) |
Hybrid semantic + BM25 search across the vault |
get_project_context(project) |
Full project context: PRD + Architecture + Rules |
get_global_rules() |
Global coding standards and design principles |
list_projects() |
List all projects with note counts |
get_note(path) |
Read a specific note by path |
create_note(project, title, type, content) |
Create notes (10 types) |
update_note(path, content) |
Append or replace content in existing notes |
| Tool | Description |
|---|---|
lint_vault() |
Health-check: orphans, stale notes, broken links, TODOs |
rebuild_index() |
Rebuild vector index + regenerate index.md |
query_graph(type, node) |
WikiLink graph: neighbors, paths, hubs, clusters |
extract_patterns() |
Analyze decisions for success/failure patterns |
save_insight(project, title, content) |
Save synthesis back to wiki |
| Tool | Description |
|---|---|
analyze_sessions(project?) |
Find repeating problems across session logs |
scout_tools(category) |
Scan internet for new relevant tools & MCP servers |
check_dependencies(project) |
Check npm/pip/flutter deps for updates & security |
| Tool | Description |
|---|---|
scan_architecture(project) |
Scan source code β Mermaid dependency map |
scan_github_trending(category) |
Scan GitHub trending repos into the vault |
watch_developer(username) |
Track a GitHub developer's new repos |
analyze_repo(url) |
Analyze a single GitHub repo for relevance |
pack_context(project) |
Pack a project's vault notes into one file for LLM context |
| Tool | Description |
|---|---|
get_wakeup_context() |
Compact ~200 token context for session start |
ingest_source(content, project) |
Cascade ingest: 1 source β N wiki updates |
auto_radar_scan(category) |
Tech radar scan with diff tracking + Telegram alerts |
| Tool | Description |
|---|---|
kg_add_fact(subject, predicate, object) |
Add temporal fact with validity window |
kg_invalidate(subject, predicate, object) |
Mark a fact as no longer valid |
kg_timeline(entity) |
Chronological history of all facts about an entity |
kg_check_contradictions() |
Detect conflicting facts in the knowledge graph |
| Tool | Description |
|---|---|
save_session(project, summary, next_steps) |
Save session context to vault |
load_session(project) |
Load last session snapshot for instant recall |
get_enhanced_wakeup(project) |
Full memory: context + last session + KG facts |
~/YourVault/
βββ _global/ # Rules for ALL projects
β βββ coding-standards.md
β βββ tech-stack.md
β βββ design-principles.md
βββ _memory/ # Agent Memory (auto-managed)
β βββ wakeup-cache.json
β βββ {project}-latest.json
βββ _templates/ # Note templates
βββ inbox/ # Quick captures from Telegram
βββ my-project/ # Per-project knowledge
β βββ prd.md
β βββ architecture.md
β βββ api-rules.md
β βββ ui-guidelines.md
β βββ architecture-map.md # Auto-generated dependency map
β βββ decisions/
β βββ 001-chose-postgresql.md
βββ index.md # Auto-generated vault catalog
βββ log.md # Chronological operation log
βββ knowledge-graph.json # Temporal KG storage
---
project: my-project
type: architecture # prd | architecture | guidelines | api | decision
# note | concept | comparison | synthesis | research
tags:
- auth
- postgresql
priority: high # high | medium | low
created: 2026-04-01
updated: 2026-04-15
---# Core
obsidian-bridge serve # Start MCP server (stdio mode)
obsidian-bridge index # Build/rebuild search index
obsidian-bridge search "auth flow" # Search from terminal
obsidian-bridge watch # Auto-index on file changes
obsidian-bridge status # Vault & index stats
# Projects
obsidian-bridge list-projects # Show all projects
obsidian-bridge add-project slug # Create project folder structure
# Capture
obsidian-bridge bot # Start Telegram capture bot
obsidian-bridge ingest "text" -p project # Cascade ingest from CLI
obsidian-bridge radar # Run tech radar scan
# Agent Memory
obsidian-bridge save project # Save session context
obsidian-bridge emergency-save project # Fast save before context loss
# Dashboard
obsidian-bridge dashboard # Launch web dashboard (localhost:8765)- Parser reads
.mdfiles, extracts YAML frontmatter, resolves[[WikiLinks]] - Indexer splits notes into chunks, creates embeddings via
sentence-transformers(local) - Hybrid Search combines ChromaDB (semantic) + BM25 (keyword) with Reciprocal Rank Fusion
- Decay Scoring boosts recent, high-priority notes in results
kg_add_fact("brieftube", "uses_auth", "clerk")β adds fact withvalid_fromdate- When stack changes:
kg_invalidate(...)marks old fact as expired, new fact added - Contradiction Detector flags when two active facts conflict
kg_timeline("brieftube")shows complete history: what tech was used when
save_sessioncaptures git state, uncommitted files, decisions made, next steps β JSON snapshot + vault noteload_sessionrestores full context at session start in ~0.1s- Enhanced wake-up = project context + last session memory + active KG facts
- Emergency save β minimal fast path before context window fills up
- Raw source (text/URL/note) enters the system
- Entity extraction finds projects, technologies, concepts
- Primary note is created in target project
- Cross-references added to all related existing notes
- Concept stubs created for new entities
- A single ingest can touch 5β15 wiki pages automatically
| Metric | Value |
|---|---|
| Python LOC | ~8,000 |
| MCP Tools | 18 core (+12 opt-in via OSM_ENABLE_EXTRA_TOOLS=1) |
| CLI Commands | 14 |
| Search latency | < 200ms |
| Session restore | ~0.1s |
| Dependencies | 12 core |
- 100% local β all data stays on your machine
- No cloud APIs β embeddings via local
sentence-transformers - No LLM required β KG, ingest, and search are deterministic algorithms
- Your vault, your data β this tool is a bridge, not a service
- v0.1 β Core: vault parser, semantic search, MCP server
- v0.3 β Wiki Engine: WikiLink graph, vault linter
- v0.4 β Adaptive Brain: decay scoring, pattern extraction
- v0.5 β Intelligence: session analyzer, tech radar, dependency checker
- v0.6 β Capture: Telegram bot, wake-up context
- v0.7 β Cascade Ingest: 1βN wiki updates
- v0.8 β Temporal Brain: validity windows, contradiction detection
- v0.9 β Agent Memory: session save/load
- v1.0 β Ultimate Brain: polished, documented, released
- v1.2 β Auto Architect: architecture scanner + GitHub radar
- v1.3 β Multi-vault support
- v1.4 β Team mode (shared vault, multiple users)
- v2.0 β Plugin for Obsidian (native integration)
PRs welcome! Please open an issue first to discuss what you'd like to change.
# Dev setup
git clone https://github.com/nzt108-dev/obsidian-second-mind.git
cd obsidian-second-mind
pip install -e ".[dev]"
ruff check src/
pytest tests/ -vMIT β see LICENSE