Obsidian MCP Server
The Obsidian MCP Server enables Obsidian vault data access and integration through the Model Context Protocol.
Access Vault Contents: Retrieve structured JSON data of your Obsidian vault through the
get_vault_contentstool, with optional path parameter to target specific directories.Server Information: Get information about the Obsidian server itself.
Metadata Access: Obtain vault metadata alongside content in JSON format.
Development Support: Includes debugging through MCP Inspector and development utilities like auto-rebuild with
npm run watch.
Provides access to Obsidian vault contents, allowing retrieval of vault files and metadata through the 'get_vault_contents' tool. Connects to the Obsidian API to retrieve information about the vault structure and file contents.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Obsidian MCP Server summarize my meeting notes from yesterday"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
A Model Context Protocol server for Obsidian integration
This is a TypeScript-based MCP server that implements integration with Obsidian. It demonstrates core MCP concepts by providing:
Resources representing Obsidian vault contents
Tools for accessing vault data
API integration with Obsidian
Project Statistics
Total lines of code: 345
Main files:
src/tool-handlers.ts(76 lines)src/resource-handlers.ts(45 lines)src/server.ts(32 lines)src/api-client.ts(25 lines)
Related MCP server: MCP Server
Directory Structure
obsidian-mcp/
├── .codegpt/
│ └── head
├── src/
│ ├── api-client.ts
│ ├── index.ts
│ ├── resource-handlers.ts
│ ├── server.ts
│ └── tool-handlers.ts
├── .SourceSageignore
├── package.json
├── README.md
└── tsconfig.jsonFeatures
Resources
Access Obsidian server info via
obsidian://server-infoURIGet vault contents with metadata
JSON format for easy integration
Tools
get_vault_contents- Retrieve contents of Obsidian vaultTakes path as optional parameter (default: root directory)
Returns structured JSON response
API Integration
Secure HTTPS connection with Obsidian API
Custom axios client with error handling
Windows path normalization support
Development
Prerequisites
Node.js v18+
TypeScript 5.3+
Obsidian API key (set as OBSIDIAN_API_KEY environment variable)
Setup
# Install dependencies
npm install
# Build the server
npm run build
# Start development server with auto-rebuild
npm run watchInstallation
To use with Claude Desktop, add the server config:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"obsidian-mcp": {
"command": "/path/to/obsidian-mcp/build/index.js",
"env": {
"OBSIDIAN_API_KEY": "your-api-key-here"
}
}
}
}Debugging
We recommend using the MCP Inspector:
npm run inspectorThe Inspector will provide a URL to access debugging tools in your browser.
Dependencies
Runtime
@modelcontextprotocol/sdk: MCP server implementation
axios: HTTP client for API communication
Development
@types/node: TypeScript definitions for Node.js
typescript: TypeScript compiler
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Maintenance
Related MCP Connectors
An MCP server that used to create notes
Google Keep-style notes app with an MCP server for AI agents to read/write notes.
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
A simple Typescript MCP server built using the official MCP Typescript SDK and smithery/cli. This…
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceThis TypeScript-based MCP server enables users to manage a simple notes system with capabilities to create and summarize notes through structured prompts and resources.1 npm-
- AlicenseNot gradedqualityDmaintenanceThis TypeScript-based MCP server allows users to manage a simple notes system through creating and summarizing text notes using Model Context Protocol (MCP).2,105 npm8MIT
- AlicenseBqualityDmaintenanceA TypeScript-based MCP server that implements a simple notes system, allowing users to create, access, and generate summaries of text notes.12888 npm3MIT
- FlicenseBqualityDmaintenanceA TypeScript-based MCP server that implements a simple notes system, allowing users to create, access, and generate summaries of text notes.23-