# The LifeOS MCP Server > [!metadata]- Metadata > **Published:** [[2025-05-25|May 25, 2025]] > **Tags:** #🌐 #ai-integration #knowledge-management #mcp ![[mcp-server-obsidian-hero-banner.png]] Making your Obsidian vault accessible to AI assistants for improved knowledge management In today's knowledge economy, effective personal information management is essential. The [LifeOS MCP Server](https://github.com/shayonpal/mcp-for-lifeos) makes your knowledge vault accessible to AI assistants, enabling them to read, search, and create notes while maintaining organization. ## What is the LifeOS MCP Server? The LifeOS MCP (Model Context Protocol) server provides AI assistants with structured access to your Obsidian vault. It enables AI models like Claude to create, read, and search notes while maintaining YAML compliance and organizational standards based on the PARA method (Projects, Areas, Resources, Archives). The server implements the Model Context Protocol, allowing AI assistants to interact with your personal knowledge base. It gives Claude the ability to function as your knowledge assistant that can work with your notes. ## The Vision: AI as Your Knowledge Partner With this system, an AI can: - Recall notes you've written - Create new notes that match your organizational system - Find connections between ideas across your knowledge base - Maintain consistent formatting and metadata - Suggest relevant information from your research This augments your thinking process by helping you capture, organize, and retrieve information effectively. ## The Architecture: How It All Works ### Core Components The system consists of several key components: **1. MCP Server Foundation** Built on the Model Context Protocol SDK, the server exposes specialized tools for AI assistants to interact with your vault. **2. Search Engine** The search engine (`search-engine.ts`) provides: - Full-text search with relevance scoring - Metadata filtering (content type, tags, categories, people) - Date range queries - Regex support - Context extraction around search matches **3. Template System** The template engine (`template-engine-dynamic.ts`) integrates with your Obsidian templates: - Discovers templates from your vault - Processes Templater syntax - Routes to folders based on content type - Injects data for template fields - Handles missing templates **4. YAML Compliance Engine** Enforces LifeOS YAML standards through `vault-utils.ts`: - Uses `source` field for URLs - Maintains location format: `Country [CODE]` - Preserves auto-managed fields - Validates syntax and reports errors **5. Obsidian Integration Layer** The `obsidian-links.ts` module generates clickable links: - Deep linking to notes and headers - Search links for queries - Workflow integration between AI conversations and vault ### Workflow Example When creating a note from a template: 1. Server receives a `create_note_from_template` request with title and template key 2. Template engine loads the appropriate template 3. Template variables are processed 4. Note is created in the appropriate folder with proper YAML frontmatter 5. Obsidian link is returned to the AI assistant 6. You can click the link to open the new note ## Key Features ### YAML-Compliant Note Creation The server follows LifeOS YAML rules: - Consistent field naming - Standard location formatting - Protection of auto-managed fields - YAML syntax validation ### Search Capabilities The search engine offers: - Content, title, and metadata search - Filtering by content type, category, tags, people, or folder - Date range queries - Relevance ranking - Context extraction for search terms For example, you can ask the AI to "find all restaurant notes from the last month" and it will filter by content type and date range. ### Template Processing The template system handles Obsidian templates: - Processes template variables - Formats dates consistently - Injects custom data - Provides sensible fallbacks When you ask the AI to create a note, it fills in the date, title, and any custom information, creating a properly formatted note. ## Integration Ecosystem ### Claude Desktop The primary integration target for natural language interaction with your vault. Ask Claude to "create a daily note" or "find articles about productivity" and it will work with your Obsidian vault. ### Raycast Integration Quick vault access from macOS: - `@lifeos-mcp` mentions in AI chats - Vault search from Raycast - Note creation and management through AI commands - Clickable Obsidian links ### Cursor IDE Integration Access your knowledge vault in your development environment: - Vault context in Agent Mode - Research while coding - Create development notes linked to project planning - Integrate learning materials with coding workflow ## Real-World Usage Examples ### Creating Notes with AI Tell the AI: *"Create a restaurant note for that Italian place we went to in New York, rate it 4.5/5"* and it will: - Use the restaurant template - Fill in the cuisine as "Italian" - Set the location as "New York [US]" - Add the rating - Place it in the correct folder - Generate proper YAML frontmatter ### Intelligent Search Ask: *"Find all my articles about machine learning from this year"* and the AI will: - Search across notes - Filter by content type "Article" - Look for machine learning content - Show results from 2024 - Rank by relevance - Provide clickable links ### Daily Note Management Say *"Get today's daily note"* or *"Show me my journal entry from last Tuesday"* and the AI will retrieve the existing note or create a new one with the proper template. ## Practical Applications ### Personal Knowledge Management Helps maintain an organized knowledge base: - Create journal entries with consistent formatting - Capture articles with proper metadata - Generate structured notes - Build linked notes with consistent structure ### Research and Reference For researchers and information workers: - Search across notes for relevant information - Create structured notes from templates - Build connections between related notes - Maintain consistent metadata ### Project Management For project work: - Create project notes in the correct location - Link related resources to project notes - Generate daily notes tracking project progress - Build Maps of Content (MOCs) to organize project information ## Why This Approach Works ### Built for Reliability The server includes error handling and validation to keep your vault organized and data safe, with diagnostic tools to catch issues. ### Respects Your Workflow The server adapts to your existing Obsidian setup, discovering templates automatically, respecting folder structure, and maintaining your formatting standards. ### Future-Proof Design The system uses semantic versioning and compatibility checking to prevent updates from breaking your setup. Responses include version metadata to maintain compatibility. ## Getting Started ### Installation 1. Download the project from GitHub 2. Install dependencies with npm 3. Build the server 4. Configure your vault path 5. Set up your AI client Setup takes just a few minutes, with detailed instructions in the repository. ### Security Considerations - Configuration files are git-ignored to protect personal paths - No external network access required - Operations respect Obsidian's file locking - Maintains boundaries around auto-managed fields ## Conclusion The LifeOS MCP server integrates AI with personal knowledge management tools to create new workflows. By respecting organizational systems while adding intelligent capabilities, it enhances human knowledge work. For researchers, writers, developers, or anyone with a knowledge base, this project offers AI-powered personal knowledge management. The combination of organizational standards, search capabilities, and AI integration creates a reliable and useful system. --- *Check out the full project and documentation at [https://github.com/shayonpal/mcp-for-lifeos](https://github.com/shayonpal/mcp-for-lifeos)*