Obsidian
Get your MCP Obsidian server and tools running in the cloud using Meshagent in minutes!
Environment Variables
Make sure to set the following required environment variables:
OBSIDIAN_HOST
: The hostname or IP of your Obsidian REST API plugin (e.g.,host.docker.internal
)OBSIDIAN_API_KEY
: Your secret API key for accessing the API (YOUR_OBSIDIAN_API_KEY
)
Step-By-Step
-
Install Meshagent and dependencies
-
Sign up and authenticate with Meshagent
- Follow instructions at Meshagent CLI Get Started
-
Run the MCP Obsidian Server Agent in a room
- This command will start a Meshagent room (
test
) with the MCP Obsidian server tool available. - Rooms will close automatically if they go inactive.
- This command will start a Meshagent room (
-
Start a chatbot in the Meshagent room
- This will launch a chatbot in the room that can use the Obsidian toolkit.
- You can run multiple toolkits in the same room with the same or different agents.
- A link to access and interact with the agent and tools will be shown in the output.
Tools Available
The following tools are available via the MCP Obsidian server:
Tool | Description |
---|---|
obsidian_append_content | Append content to a new or existing file in the vault. |
obsidian_batch_get_file_contents | Return the contents of multiple files in your vault, concatenated with headers. |
obsidian_complex_search | Complex search for documents using a JsonLogic query. |
obsidian_delete_file | Delete a file or directory from the vault. |
obsidian_get_file_contents | Return the content of a single file in your vault. |
obsidian_get_periodic_note | Get current periodic note for the specified period. |
obsidian_get_recent_changes | Get recently modified files in the vault. |
obsidian_get_recent_periodic_notes | Get most recent periodic notes for the specified period type. |
obsidian_list_files_in_dir | Lists all files and directories that exist in a specific Obsidian directory. |
obsidian_list_files_in_vault | Lists all files and directories in the root directory of your Obsidian vault. |
obsidian_patch_content | Insert content into an existing note relative to a heading, block reference, or frontmatter field. |
obsidian_simple_search | Simple search for documents matching a specified text query across all files in the vault. |
Tools Details
obsidian_append_content
Append content to a new or existing file in the vault.
- Parameters:
content
(string): Content to appendfilepath
(string): Path to the file (relative)
obsidian_batch_get_file_contents
Return the contents of multiple files, concatenated with headers.
- Parameters:
filepaths
(array): List of file paths
obsidian_complex_search
Complex search for documents using a JsonLogic query.
- Parameters:
query
(object): Example:{"glob": ["*.md", {"var": "path"}]}
obsidian_delete_file
Delete a file or directory from the vault.
- Parameters:
confirm
(boolean): Confirmation (must be true)filepath
(string): Path to file/dir
obsidian_get_file_contents
Return the content of a single file.
- Parameters:
filepath
(string): Path to the file
obsidian_get_periodic_note
Get current periodic note for the specified period.
- Parameters:
period
(string): daily, weekly, monthly, etc.
obsidian_get_recent_changes
Get recently modified files.
- Parameters:
days
(integer, optional): Files modified within N days (default: 90)limit
(integer, optional): Max number (default: 10)
obsidian_get_recent_periodic_notes
Get most recent periodic notes for the specified period type.
- Parameters:
period
(string): The period typeinclude_content
(boolean, optional): Include note content (default: false)limit
(integer, optional): Max number (default: 5)
obsidian_list_files_in_dir
Lists all files and directories in a specific directory.
- Parameters:
dirpath
(string): Directory path
obsidian_list_files_in_vault
Lists all files and directories in the vault root.
obsidian_patch_content
Insert content into an existing note relative to a heading, block, or frontmatter.
- Parameters:
content
(string): Content to insertfilepath
(string): File pathoperation
(string): append, prepend, replacetarget
(string): Identifier (heading, block, etc.)target_type
(string): Type of target
obsidian_simple_search
Simple text search for documents in the vault.
- Parameters:
query
(string): Search textcontext_length
(integer, optional): How much context (default: 100)
Useful Links
- Meshagent: https://www.meshagent.com/
- Getting Started: docs.meshagent.com/room_api/get_started
- API Overview: docs.meshagent.com/room_api/overview
- Meshagent MCP Obsidian Docker Image: docker.com/r/meshagent/mcp-obsidian
Run powerful Obsidian document automations and queries inside collaborative Meshagent Rooms using secure, scalable, cloud-native workflows!