Personal Knowledge Management via Obsidian MCP - capture learnings to daily notes and search vault
Capture learnings and search your Obsidian vault using the Obsidian MCP server.
This skill provides personal knowledge management functionality:
Required:
/home/dxta/Documents/Obsidian/personal~/.config/opencode/opencode.jsonVerify MCP Configuration:
cat ~/.config/opencode/opencode.json | grep -A 10 obsidian
Should show:
"obsidian": {
"type": "local",
"command": ["npx", "-y", "@huangyihe/obsidian-mcp"],
"environment": {
"OBSIDIAN_VAULT_PATH": "/home/dxta/Documents/Obsidian/personal",
"OBSIDIAN_API_TOKEN": "{env:OBSIDIAN_API_TOKEN}",
"OBSIDIAN_API_PORT": "27123"
},
"enabled": true
}
Enable Obsidian Local REST API:
export OBSIDIAN_API_TOKEN=your-token# Capture a learning to today's daily note
~/.config/opencode/skills/data/pkm/scripts/pkm.py capture "content to capture" --tags tag1,tag2
# Search vault for notes
~/.config/opencode/skills/data/pkm/scripts/pkm.py search "query" --max 10
# Show help
~/.config/opencode/skills/data/pkm/scripts/pkm.py --help
Capture a learning:
~/.config/opencode/skills/data/pkm/scripts/pkm.py capture "Learned about React hooks optimization" --tags react,frontend
Search for notes:
~/.config/opencode/skills/data/pkm/scripts/pkm.py search "obsidian"
Search with max results:
~/.config/opencode/skills/data/pkm/scripts/pkm.py search "project management" --max 20
Capture without tags:
~/.config/opencode/skills/data/pkm/scripts/pkm.py capture "Important meeting notes"
Capture with multiple tags:
~/.config/opencode/skills/data/pkm/scripts/pkm.py capture "Key insight about database design" --tags database,backend,sql
Learnings are captured to daily notes at:
Daily Notes/YYYY-MM-DD.md
Each learning entry is formatted as:
---