home / mcp / obsidian-mcp mcp server
Provides an MCP server that exposes Obsidian vault data, tools to access vault contents, and API integration.
Configuration
View docs{
"mcpServers": {
"sunwood-ai-labs-obsidian-mcp": {
"command": "/path/to/obsidian-mcp/build/index.js",
"args": [],
"env": {
"OBSIDIAN_API_KEY": "your-api-key-here"
}
}
}
}This MCP server enables Obsidian integration by exposing vault data as resources, providing tools to access vault contents, and integrating with Obsidian through a secure API. It lets you query vault structures, access metadata, and extend Obsidian workflows via the MCP protocol.
You interact with this MCP server through an MCP client. The server represents Obsidian vault contents as resources and offers a dedicated tool to fetch vault data. Use the client to request vault information, browse the vault structure, and trigger data retrieval in a structured, JSON-friendly format. The integration focuses on practical data access and combineable actions that fit into your existing Obsidian workflows.
Prerequisites you need before installing the MCP server:
Install dependencies, build, and run in watch mode to auto-rebuild on changes:
npm install
npm run build
npm run watchPlace the MCP server config into your environment where the MCP launcher can read it. The server exposes itself as a local process you start via the specified command. Here is the example configuration provided for this MCP server setup:
{
"mcpServers": {
"obsidian_mcp": {
"command": "/path/to/obsidian-mcp/build/index.js",
"env": {
"OBSIDIAN_API_KEY": "your-api-key-here"
}
}
}
}For interactive debugging, use the MCP Inspector to access debugging tools in your browser. Start the inspector to obtain the URL you’ll use to connect.
npm run inspectorRetrieves the contents of the Obsidian vault. Accepts an optional path parameter (defaults to the vault root) and returns structured JSON data representing files, folders, and metadata within the vault.