This Obsidian MCP server, developed by cyanheads, enables AI models to interact with Obsidian vaults through a standardized interface. Built with TypeScript and leveraging the Model Context Protocol SDK, it provides tools for file operations, content search, and metadata management within Obsidian. The implementation features atomic operations, efficient query processing, and automatic timestamp handling. It's particularly useful for AI assistants and applications needing to manage knowledge bases in Obsidian, enabling use cases like note-taking, content organization, and information retrieval without dealing directly with Obsidian's API complexities.
Lists all files and directories within the root of your Obsidian vault. Returns a hierarchical structure detailing files, folders, and their types.
Lists files and directories within a specific folder in your Obsidian vault. Returns a hierarchical structure. Note: Empty directories may not be included in the results. Useful for exploring vault organization. Parameters: dirpath (string) - Path to list files from (relative to vault root).
Retrieves the full content of a specified file within your Obsidian vault. Supports various readable file formats. Parameters: filepath (string) - Path to the relevant file (relative to your vault root).
Appends the provided content to the end of a specified file in the vault. If the file does not exist, it will be created. Parameters: filepath (string) - Path to the file (relative to vault root); content (string) - Content to append to the file.
Overwrites the entire content of a specified file in the vault with the provided content. If the file does not exist, it will be created. Parameters: filepath (string) - Path to the file (relative to vault root); content (string) - The new, complete content for the file.
Performs a full-text search across all files in your Obsidian vault. Returns matching files with context around each match. Parameters: query (string) - Text pattern to search for; contextLength (number) - Number of characters surrounding each match to provide context (default: 10).
Finds files based on path patterns using JsonLogic queries. Primarily supports glob for pattern matching (e.g., '*.md') and var for accessing the 'path' variable. Parameters: query (object) - A JsonLogic query object targeting file paths.
Retrieves all tags defined in the YAML frontmatter of markdown files within your Obsidian vault, along with their usage counts and associated file paths. Optionally, limit the search to a specific folder. Parameters: path (string, optional) - Optional folder path to restrict the tag search.
Retrieves properties (like title, tags, status) from the YAML frontmatter of a specified Obsidian note. Returns all defined properties, including any custom fields. Parameters: filepath (string) - Path to the note file (relative to vault root).
Updates properties within the YAML frontmatter of a specified Obsidian note. By default, array properties are merged; use the 'replace' option to overwrite them instead. Parameters: filepath (string) - Path to the note file (relative to vault root); properties (object) - Properties to update; replace (boolean) - If true, array properties will be completely replaced.
No reviews yet. Be the first to review!
Sign in to join the conversation