Obsidian Claude Code
Provides an MCP server embedded in an Obsidian plugin that lets clients read and write vault files, inspect the active file and workspace file list, and access the Obsidian API.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Obsidian Claude Code
An Obsidian plugin that implements an MCP (Model Context Protocol) server to enable Claude Code integration with Obsidian vaults.
This plugin allows Claude Code and other MCP clients (like Claude Desktop) to interact with your Obsidian vault, providing AI-powered assistance with direct access to your notes and files.
Features
Dual Transport MCP Server: Supports both WebSocket (for Claude Code) and HTTP/SSE (for Claude Desktop)
Auto-Discovery: Claude Code automatically finds and connects to your vault
File Operations: Read and write vault files through MCP protocol
Workspace Context: Provides current active file and vault structure to Claude
Multiple Client Support: Connect both Claude Code and Claude Desktop simultaneously
Configurable Ports: Avoid conflicts when running multiple vaults
Related MCP server: workspace-mcp
MCP Client Configuration
This plugin serves as an MCP server that various Claude clients can connect to. Here's how to configure different clients:
Claude Desktop (as of 2025-06-09)
Claude Desktop requires a special configuration to connect to the Obsidian MCP server because it does not directly support HTTP transports. We will use mcp-remote, a tool that creates a local stdio bridge to the server's HTTP endpoint.
Configuration Steps:
Install and enable this plugin in Obsidian.
Make sure you have Node.js installed, as
npx(which comes with Node.js) is used to run the bridge tool.Locate your Claude Desktop config file:
macOS:
$HOME/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add the Obsidian MCP server to your config using the
mcp-remotecommand.npxwill automatically download and run it for you.{ "mcpServers": { "obsidian": { "command": "npx", "args": ["mcp-remote", "http://localhost:22360/sse"], "env": {} } } }Restart Claude Desktop after making the configuration change.
Test the connection by asking Claude about your vault: "What files are in my Obsidian vault?"
Other MCP Clients (with direct HTTP support)
If you are using an MCP client that directly supports the legacy "HTTP with SSE" transport, you can use a simpler configuration without the mcp-remote bridge.
Example Configuration:
{
"mcpServers": {
"obsidian": {
"url": "http://localhost:22360/sse",
"env": {}
}
}
}Claude Code CLI
Claude Code automatically discovers and connects to Obsidian vaults through WebSocket.
Usage Steps:
Install and enable this plugin in Obsidian
Run Claude Code in your terminal:
claudeSelect your vault using the
/idecommandChoose "Obsidian" from the IDE list
Claude Code will automatically connect via WebSocket
Port Configuration
Default Port: The plugin uses port 22360 by default to avoid conflicts with common development services.
Custom Port Setup:
Go to Obsidian Settings → Community Plugins → Claude Code → Settings
Change the "HTTP Server Port" in the MCP Server Configuration section
Update your Claude Desktop config to use the new port:
{ "mcpServers": { "obsidian": { "url": "http://localhost:22360/mcp", "env": {} } } }NOTE: You can change the port in the settings.Restart Claude Desktop to apply the changes
Multiple Vaults: If you run multiple Obsidian vaults with this plugin, each vault needs a unique port. The plugin will automatically detect port conflicts and guide you to configure different ports.
A Note on MCP Specification Version
As of 2025-06-09
This plugin intentionally uses an older MCP specification for HTTP transport. The latest"Streamable HTTP" protocol (2025-03-26) is not yet supported by most MCP clients, including Claude Code and Claude Desktop.
To ensure compatibility, we use the legacy "HTTP with SSE" protocol (2024-11-05). Adhering to the newest specification will lead to connection failures with current tools.
Troubleshooting
Claude Desktop not connecting:
Verify the config file path and JSON syntax
Ensure Obsidian is running with the plugin enabled
Check that the port (22360) isn't blocked by firewall
Restart Claude Desktop after config changes
Claude Code not finding vault:
Verify the plugin is enabled in Obsidian
Check for
.lockfiles in Claude config directory:Windows:
%APPDATA%\claude\ide\(modern location)%USERPROFILE%\.claude\ide\(legacy location)
macOS/Linux:
$CLAUDE_CONFIG_DIR/ide/if environment variable is set~/.config/claude/ide/(default since Claude Code v1.0.30)~/.claude/ide/(legacy location)
Restart Obsidian if the vault doesn't appear in
/idelist
Windows-specific issues:
Terminal not working: Ensure Python 3.7+ is installed and in PATH
Build errors: Use
npminstead ofbunon Windows if issues occurPath issues: The plugin automatically handles Windows path separators
Lock file permissions: Run Obsidian as administrator if lock files aren't created
Port conflicts:
Configure a different port in plugin settings
Update client configurations to match the new port
Common alternative ports: 22361, 22362, 8080, 9090
Tool Architecture
This plugin implements a flexible tool system that allows different tools to be exposed to different MCP clients:
Tool Categories
Shared Tools (available to both IDE and MCP clients):
File operations:
view,str_replace,create,insertWorkspace operations:
get_current_file,get_workspace_filesObsidian API access:
obsidian_api
IDE-specific Tools (only available via Claude Code WebSocket):
getDiagnostics- System and vault diagnosticsopenDiff- Diff view operations (stub for Obsidian)close_tab- Tab management (stub for Obsidian)closeAllDiffTabs- Bulk tab operations (stub for Obsidian)
MCP-only Tools (only available via HTTP/SSE):
Currently none, but the architecture supports adding them
Adding New Tools
To add a new tool to the plugin:
For Shared Tools (available to both IDE and MCP):
Add the tool definition to
src/tools/general-tools.tsin theGENERAL_TOOL_DEFINITIONSarrayAdd the implementation in the
createImplementations()method ofGeneralToolsclassThe tool will automatically be available to both WebSocket and HTTP clients
For IDE-specific Tools:
Add the tool definition to
src/ide/ide-tools.tsin theIDE_TOOL_DEFINITIONSarrayAdd the implementation in the
createImplementations()method ofIdeToolsclassThe tool will only be available to Claude Code via WebSocket
For MCP-only Tools:
Add the tool definition to
src/tools/mcp-only-tools.tsin theMCP_ONLY_TOOL_DEFINITIONSarrayCreate an implementation class similar to
GeneralToolsorIdeToolsUpdate
src/mcp/dual-server.tsto register the tools only to the HTTP registry
Tool Registration Flow
The plugin uses a dual registry system:
WebSocket Registry: Contains shared tools + IDE-specific tools
HTTP Registry: Contains shared tools + MCP-only tools
This separation ensures that:
Claude Code gets access to IDE-specific functionality
Standard MCP clients only see appropriate tools
Shared functionality is available to all clients
Installation from Local Repository
Windows-Specific Installation
Prerequisites:
Install Node.js (includes npm)
Install Git for Windows
Optional: Python 3.7+ for terminal features (from python.org)
Clone and Build:
git clone https://github.com/yourusername/obsidian-claude-code-mcp.git cd obsidian-claude-code-mcp npm install npm run buildInstall to Obsidian:
Find your vault's plugins folder:
[Your Vault]\.obsidian\pluginsCreate a new folder:
claude-code-mcpCopy these files from the build output:
main.jsmanifest.jsonstyles.css(if exists)
Enable the Plugin:
Open Obsidian Settings
Go to Community Plugins
Enable "Obsidian Claude Code"
Configure Claude Desktop (Windows):
Edit
%APPDATA%\Claude\claude_desktop_config.jsonAdd the configuration as shown in the MCP Client Configuration section above
macOS/Linux Installation
Prerequisites:
Node.js and npm installed
Git installed
Clone and Build:
git clone https://github.com/yourusername/obsidian-claude-code-mcp.git cd obsidian-claude-code-mcp npm install npm run buildInstall to Obsidian:
# Replace [Your Vault] with your vault path cp -r main.js manifest.json styles.css "[Your Vault]/.obsidian/plugins/claude-code-mcp/"Enable the plugin in Obsidian settings
Development
This project uses TypeScript to provide type checking and documentation. The repo depends on the latest plugin API (obsidian.d.ts) in TypeScript Definition format, which contains TSDoc comments describing what it does.
Releasing new releases
Update your
manifest.jsonwith your new version number, such as1.0.1, and the minimum Obsidian version required for your latest release.Update your
versions.jsonfile with"new-plugin-version": "minimum-obsidian-version"so older versions of Obsidian can download an older version of your plugin that's compatible.Create new GitHub release using your new version number as the "Tag version". Use the exact version number, don't include a prefix
v. See here for an example: https://github.com/obsidianmd/obsidian-sample-plugin/releasesUpload the files
manifest.json,main.js,styles.cssas binary attachments. Note: The manifest.json file must be in two places, first the root path of your repository and also in the release.Publish the release.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Siftable MCP server for governed work, knowledge, calendar, people, datasets, and Vault.
Read and write shared BitsWeave context, projects, tasks, and work sessions through MCP.
Query, browse, and automate OmegaAI workspaces from any MCP client. Streamable HTTP with OAuth 2.0.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceExposes a secure, path-confined bridge to a local workspace and git remotes, enabling MCP clients to search, read, write, reset files, and perform git operations.-
- AlicenseAqualityBmaintenanceEnables MCP clients to safely read, write, edit, search, and optionally run commands within one or more named project workspaces, while maintaining a work journal and tracking changes.19MIT
- FlicenseNot gradedqualityBmaintenanceEnables MCP clients to manage files in an isolated workspace and perform lightweight Git operations through a protected Streamable HTTP endpoint, including listing, reading, writing, searching, replacing, and deleting files plus checking status and diffs.1-
- AlicenseCqualityBmaintenanceEnables MCP-compatible agents to operate a versioned shared workspace system through standard tools, including project initialization, file operations, branching, merging, publishing, checkpoints, deduplicated storage, command execution, and background process management over stdio or Streamable HTTP.4123 npmMIT