-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
The MCP server binary ignores the OBSIDIAN_API_URL environment variable and always connects to port
27124, regardless of the configured value. This makes it impossible to use MCP Tools with multiple
Obsidian vaults simultaneously on different ports.
Steps to Reproduce
- Set up two Obsidian vaults with Local REST API on different ports (e.g., Vault A on 27124, Vault B
on 27126) - Configure Claude Desktop with two MCP server entries, each with the correct OBSIDIAN_API_URL:
"vault-a": {
"command": "/path/to/vault-a/.obsidian/plugins/mcp-tools/bin/mcp-server",
"env": {
"OBSIDIAN_API_KEY": "...",
"OBSIDIAN_API_URL": "https://127.0.0.1:27124"
}
},
"vault-b": {
"command": "/path/to/vault-b/.obsidian/plugins/mcp-tools/bin/mcp-server",
"env": {
"OBSIDIAN_API_KEY": "...",
"OBSIDIAN_API_URL": "https://127.0.0.1:27126"
}
} - Open both vaults in Obsidian
- Restart Claude Desktop
Expected Behavior
Each MCP server should connect to its configured port via OBSIDIAN_API_URL.
Actual Behavior
- Both servers connect to port 27124 regardless of OBSIDIAN_API_URL
- The vault on 27124 works; the vault on 27126 fails with 401 (wrong API key hitting wrong vault)
- If only the 27126 vault is open, connection fails entirely with "Unable to connect"
Environment
- MCP Tools: v0.2.27
- Local REST API: v3.4.2
- Obsidian: v1.11.5
- macOS
Workaround
Currently, only one vault can be used at a time by ensuring the active vault is on port 27124.
Feature Request
Please add support for OBSIDIAN_API_URL (or separate OBSIDIAN_HOST/OBSIDIAN_PORT variables) so multiple
vaults can be used simultaneously with different ports.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working