home / mcp / obsidian claude code mcp server
Provides a dual-transport MCP server for Claude Code and Claude Desktop to read and write your Obsidian vault via MCP.
Configuration
View docs{
"mcpServers": {
"iansinnott-obsidian-claude-code-mcp": {
"url": "http://localhost:22360/sse"
}
}
}This MCP server enables Claude Code and Claude Desktop to interact with your Obsidian vaults using a dual-transport setup. It lets you read and write vault files, access workspace context, and connect multiple clients safely across configurable ports.
Connect Claude Code via WebSocket to your Obsidian vault to gain real-time AI-assisted editing and navigation. For Claude Desktop, use the HTTP/SSE path so Claude Desktop can stream from the same vault. Your vault becomes a live data source that Claude can query to read file contents, list files, and apply edits.
Prerequisites: ensure you have Node.js installed to run MCP-related tooling. You also need Obsidian with this MCP server plugin installed and enabled.
Install and enable the MCP server plugin in Obsidian. Then start Obsidian with the vault you want to expose.
Configure the client connections from the respective MCP clients. The default HTTP transport port is 22360, and the server exposes an SSE endpoint for HTTP-based clients and a WebSocket path for Claude Code.
Use the following configuration examples to connect Claude Desktop and Claude Code to your MCP server.
{
"mcpServers": {
"obsidian": {
"url": "http://localhost:22360/sse",
"env": {}
}
}
}Claude Desktop can connect through a local bridge that forwards the HTTP endpoint to a stdio-based workflow. Use the following snippet in your Claude Desktop config to point to the SSE endpoint.
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:22360/sse"],
"env": {}
}
}
}Claude Code automatically discovers and connects to Obsidian vaults via WebSocket. Install and enable the plugin, then run Claude Code and select your vault from the IDE list to establish the connection.
The default port for the MCP server is 22360 to minimize conflicts with common development services. If you run multiple vaults or encounter port conflicts, you can change the port in Obsidian Settings.
You can run the MCP server for multiple Obsidian vaults. Each vault must use a unique port. The plugin detects conflicts and guides you to configure distinct ports.
This server uses the legacy HTTP with SSE transport for compatibility with Claude Code and Claude Desktop. The newer Streamable HTTP protocol is not yet supported by these clients.
Claude Desktop not connecting: Verify the config path and JSON syntax, ensure Obsidian is running with the plugin enabled, check that the port isn’t blocked by a firewall, and restart Claude Desktop after changes.
Claude Code not finding vault: Verify the plugin is enabled, check for lock files in your Claude IDE config directory, and restart Obsidian if the vault doesn’t appear in the IDE list.
Port conflicts: Configure a different port in plugin settings and update client configurations to match. Common alternative ports include 22361, 22362, 8080, 9090.
When enabling MCP access, only expose vaults you intend to share with AI agents. Use local connections (localhost) for personal use and restrict access through firewall rules if exposing beyond your machine.
Read file contents and metadata from the vault.
Replace text within vault files with specified patterns.
Create new files or folders in the vault.
Insert content into existing files at a given position.
Retrieve the path and contents of the currently active file.
List all files and folders in the current vault workspace.
Provide access to Obsidian API capabilities from MCP clients.
Return system and vault diagnostics available to Claude Code via WebSocket.
Open a diff view for changes (prototype functionality for Obsidian).
Close a currently opened tab in the editor (prototype).
Close all open diff tabs in a batch operation (prototype).