A powerful TypeScript-based Model Context Protocol (MCP) server that enables intelligent note-taking with Obsidian Vault integration and Git synchronization. Built for seamless integration with Claude Desktop and cross-device knowledge management workflows.
- Create, Read, Update, Delete notes with rich metadata
- Smart search across titles, content, tags, projects, and categories
- Flexible organization with tags, projects, and categories
- Preview and confirmation system for safe updates and deletions
- Unique ID generation with timestamp-based identification
- Markdown file storage in your Obsidian vault
- Smart note linking with automatic relationship detection
- Cross-note connections for enhanced knowledge graphs
- Subfolder organization for clean vault structure
- Direct Obsidian compatibility for seamless editing
- Single repository workflow with direct vault integration
- Enhanced smart linking between related notes
- Faster cross-device sync with optimized Git operations
- Multiple sync strategies: full, status, pull, push, save-and-push
- Conflict-free operations with proper Git workflow
- Batch operations for efficient bulk syncing
- Emergency sync for conflict resolution
- Environment variable support for flexible deployment
- Configurable vault paths and Git settings
- Clean modular architecture with separated concerns
- TypeScript implementation with full type safety
- Production-ready error handling and logging
- Node.js 18+
- Git configured with remote repository access
- Obsidian vault (local directory)
- Claude Desktop application
-
Clone the repository
git clone https://github.com/Cannon07/ClaudeVault.git cd ClaudeVault -
Install dependencies
npm install
-
Configure environment
cp .env.example .env # Edit .env with your Obsidian vault path -
Set up your Obsidian vault with Git
# Navigate to your Obsidian vault cd /path/to/your/obsidian-vault # Initialize Git if not already done git init git remote add origin https://github.com/yourusername/your-vault-repo.git # Create initial commit git add . git commit -m "Initial vault setup" git push -u origin main
-
Build the project
npm run build
-
Configure Claude Desktop
Add to your Claude Desktop configuration file:
{ "mcpServers": { "claudevault": { "command": "node", "args": ["/path/to/ClaudeVault/dist/index.js"], "env": { "OBSIDIAN_VAULT_PATH": "/path/to/your/obsidian-vault" } } } } -
Restart Claude Desktop and start taking smart notes!
src/
βββ index.ts # Main MCP server
βββ types/
β βββ note.ts # Note interface and types
βββ tools/
β βββ index.ts # Tools API exports
β βββ definitions.ts # MCP tool definitions
β βββ handlers/ # Individual tool handlers
β βββ add-note.ts
β βββ search-notes.ts
β βββ list-notes.ts
β βββ update-note.ts
β βββ delete-note.ts
β βββ unified-sync.ts
βββ utils/
βββ unified-sync.ts # Main sync orchestration
βββ vault/ # Obsidian vault operations
β βββ vault-operations.ts
β βββ markdown-parser.ts
β βββ note-linking.ts
βββ git/ # Git synchronization
βββ git-operations.ts
βββ sync-strategies.ts
# Obsidian Vault Configuration
OBSIDIAN_VAULT_PATH=/path/to/your/obsidian-vault
OBSIDIAN_SUBFOLDER=ClaudeVault
# Git Configuration
DEFAULT_BRANCH=main
AUTO_SYNC_ON_SAVE=false
GIT_TIMEOUT=15000Notes are stored as Markdown files in your Obsidian vault with the following metadata:
# Note Title
Tags: #tag1 #tag2
Project: project-name
Category: category-name
Your note content here with full Markdown support...
## Related Notes
- [[Related Note 1]]
- [[Related Note 2]]Each note includes:
- Unique ID: Generated timestamp-based identifier
- Title: Human-readable note title
- Content: Full Markdown content with Obsidian features
- Tags: Flexible tagging system for organization
- Project: Optional project association
- Category: Optional categorization
- Related Notes: Auto-generated cross-references
# Add a new note
"Add a note titled 'API Design Patterns' with content 'REST vs GraphQL comparison' and tags 'api, design, architecture'"
# Search notes
"Search for notes about 'database optimization'"
# List recent notes
"List my last 5 notes"
# Update a note
"Update note note-1234567890123 to add tag 'important'"
# Delete a note
"Delete note about 'old project requirements'"
# Check sync status
"Sync notes with operation 'status'"
# Full unified synchronization
"Sync notes with operation 'full'"
# Pull latest changes only
"Sync notes with operation 'pull'"
# Commit and push with custom message
"Sync notes with operation 'push' and message 'Daily standup notes'"
# Save specific note and push
"Sync notes with operation 'save-and-push' and noteId 'note-1234567890123'"
# Health check
"Sync notes with operation 'status'" # Shows vault health and Git status
# Get vault information
"List my last 5 notes" # Shows vault statistics in output
# Find related notes (automatic in note creation)
# ClaudeVault automatically detects and links related notes when creating/updating
add_note: Create new notes with metadata and automatic linkingsearch_notes: Intelligent search across all note content and metadatalist_notes: List notes with optional limitsupdate_note: Modify existing notes with preview/confirmationdelete_note: Remove notes with safety confirmationsunified_sync: Advanced Git synchronization with multiple strategies
- Primary Setup: Configure ClaudeVault with your main Obsidian vault
- Git Integration: Your vault is backed by a Git repository
- Smart Linking: ClaudeVault automatically creates connections between related notes
- Cross-Device Sync:
- Start work session:
sync notes operation='pull' - Use ClaudeVault for intelligent note creation and management
- Use Obsidian for advanced editing, graph view, and plugins
- End session:
sync notes operation='full'(unified sync)
- Start work session:
- Best of Both Worlds: AI-powered note management + Obsidian's powerful features
- Automatic Linking: ClaudeVault intelligently connects related concepts
- Git Backup: Full version control and cross-device synchronization
- Markdown Files: Human-readable, future-proof storage format
- Graph View: Visualize knowledge connections in Obsidian
- Uses Anthropic's Model Context Protocol for Claude integration
- Implements standard MCP tool definitions and handlers
- Supports both synchronous and asynchronous operations
- Markdown file storage in structured Obsidian vault
- Smart note linking with automatic relationship detection
- Vault operations for reading, writing, and organizing notes
- Configurable subfolder structure for clean organization
- Single repository workflow with direct vault integration
- Enhanced sync strategies: full, pull, push, save-and-push
- Intelligent conflict resolution and emergency sync
- Batch operations for efficient bulk synchronization
- Cross-device compatibility with automatic Git operations
- Unified Sync Engine: Central orchestration of all sync operations
- Vault Operations: Direct Obsidian vault file management
- Git Strategies: Multiple sync approaches for different use cases
- Note Linking: Automatic relationship detection and cross-referencing
- Markdown Parser: Bidirectional conversion between notes and Markdown
npm run build # Compile TypeScript to JavaScript
npm run dev # Run server in development mode with tsx
npm start # Run compiled server- Create handler in
src/tools/handlers/ - Add tool definition in
src/tools/definitions.ts - Export from
src/tools/index.ts - Add case in main server switch statement
- Build and test
- Unified Sync: Central sync orchestration in
utils/unified-sync.ts - Vault Operations: Obsidian file management in
utils/vault/ - Git Strategies: Multiple sync approaches in
utils/git/ - Tool Handlers: Individual MCP tool implementations in
tools/handlers/
Current Known Issues:
- TypeScript configuration needs updates for Node.js types and MCP SDK imports
- Build requires proper tsconfig.json with Node.js lib support
Utility Functions Available (not exposed as tools):
healthCheck(): System health verificationgetVaultInfo(): Vault configuration and statisticsfindRelatedNotes(): Automatic note relationship detection
- Private Obsidian vault: Keep personal notes in your local Obsidian vault
- Environment-based configuration: No sensitive data in source code
- Git authentication: Uses your existing Git authentication
- Local-first: Notes stored locally in Markdown with optional cloud backup
- Open format: Human-readable Markdown files, never locked in proprietary formats
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Anthropic for the Model Context Protocol
- Claude Desktop for MCP integration
- The open-source community for TypeScript and Node.js ecosystem
- Create an issue for bug reports or feature requests
- Check existing issues before creating new ones
- Provide detailed information for better assistance
ClaudeVault v2.0 - Built with β€οΈ for developers who love taking smart notes in Obsidian