π¦
Obsidian MCP For Opencode
Obsidian MCP server working for opencode
0 installs
1 stars
Trust: 48 β Fair
Devtools
Installation
npx obsidian-mcp-for-opencodeAsk AI about Obsidian MCP For Opencode
Powered by Claude Β· Grounded in docs
I know everything about Obsidian MCP For Opencode. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
Obsidian MCP Server for OpenCode
A local MCP (Model Context Protocol) server that provides semantic search over your Obsidian vault using local embeddings and SQLite vector storage.
Features
- Semantic search β find notes by meaning, not just keywords
- Fully local β no API keys, no cloud services. Embeddings run on your machine
- Incremental indexing β only re-embeds changed files (content-based change detection)
- Orphan cleanup β automatically removes deleted/renamed files from index
- Markdown-aware chunking β respects headings, frontmatter, and document structure
- Tag support β search and filter by Obsidian tags (frontmatter + inline)
- Lightweight β SQLite-based, no Docker or external databases
Setup
npm install
npm run build
Configuration
| Environment Variable | Default | Description |
|---|---|---|
| OBSIDIAN_VAULT_PATH | (required) | Path to your Obsidian vault |
| OBSIDIAN_IGNORED_KEYS | timesViewed,date modified | Comma-separated frontmatter keys to ignore for change detection |
The OBSIDIAN_IGNORED_KEYS setting allows you to exclude volatile frontmatter fields from content hash calculation. This prevents unnecessary re-indexing when only metadata like view counts or modification timestamps change, while still detecting actual content changes.
Usage
Indexing database
OBSIDIAN_VAULT_PATH=/path/to/vault npm run index
Standalone
# Via environment variable
OBSIDIAN_VAULT_PATH=/path/to/vault npm start
# Via CLI argument
node dist/index.js /path/to/vault
With OpenCode
Add to your opencode.json:
{
"mcp": {
"obsidian-mcp": {
"type": "local",
"command": ["node", "/path/to/obsidian-mcp-for-opencode/dist/index.js"],
"environment": {
"OBSIDIAN_VAULT_PATH": "/path/to/your/obsidian/vault",
},
"timeout":600000,
"enabled": true
}
}
}
MCP Tools
| Tool | Description |
|---|---|
search_notes | Semantic search across the vault |
read_note | Read full content of a specific note |
list_tags | List all tags in the vault |
search_by_tag | Find notes by tag |
reindex | Re-index the vault (incremental or full) |
vault_stats | Get indexing statistics |
Tech Stack
- Embeddings:
Xenova/multilingual-e5-smallvia@xenova/transformers(384 dimensions, runs locally) - Vector Store: SQLite +
sqlite-vecextension - MCP SDK:
@modelcontextprotocol/sdk - Chunking: Markdown-aware, respects headings and frontmatter via
gray-matter
