Skip to content

Issue Connecting Claude to Obsidian via the MCP Server #60

Description

@DataVamp01

Summary of Troubleshooting Steps
Goal: To connect Claude Desktop to Obsidian using the obsidian-mcp server.

Initial Problem: Consistently receiving an "MCP obsidian: Server disconnected" error in the Claude Desktop application.

Troubleshooting Steps Performed:

Command Execution Errors:

Initially failed to run the server manually, receiving a 'C:\Program' is not recognized... error.

Fix: Correctly enclosed the executable path in double quotes.

Subsequently received an 'Unexpected token' error.

Fix: Identified the command was being run in PowerShell instead of Command Prompt. Corrected the syntax for both shells (& for PowerShell) and proceeded with cmd.exe.

Firewall and Network Configuration:

After the command ran, the "Server disconnected" error persisted.

Attempted to create a Windows Defender Firewall exception for node.exe.

Encountered an issue where the "Private" network checkbox was greyed out.

Fix: Changed the active Windows network profile from "Public" to "Private," which allowed the firewall rule to be correctly set for both profiles.

Application and Configuration File Errors:

After fixing the firewall, the Claude application itself began to crash on startup with a "JavaScript error occurred in the main process."

This was followed by a "Could not load app settings" error pointing to a JSON parsing issue: Unexpected non-whitespace character after JSON at position 12.

Fix: Corrected the claude_desktop_config.json file, which had invalid syntax (missing quotes on keys and strings, and likely contained extra text from an erroneous copy-paste).

Attempted to find server options using npx obsidian-mcp --help, which returned a Vault directory does not exist: --help error.

Fix: Deduced that the vault path was a required positional argument, not an optional one.

Final Configuration:

Arrived at the following syntactically correct and logically ordered configuration in claude_desktop_config.json:

JSON

{
"mcpServers": {
"obsidian": {
"command": "C:\Program Files\nodejs\npx.cmd",
"args": [
"-y",
"obsidian-mcp",
"[File location]",
"--api-url",
"https://127.0.0.1:27124"
],
"env": {
"OBSIDIAN_API_KEY": "[API Key]"
}
}
}
}
Current Status:

Despite all the above corrections, the "MCP obsidian: Server disconnected" error still occurs on startup, even though the application no longer crashes and the configuration file is correct. This strongly suggests a software bug within the MCP server package or its interaction with the local environment.

After extensive troubleshooting, we suspect the issue may not be a simple connection or configuration error. I noticed another user reported 'UTF-8 problems,' and it's possible the connection is failing silently due to a special character in a file or folder name within my Obsidian vault.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions