Fix OBSIDIAN_HOST environment variable parsing to support protocol and port#52
Fix OBSIDIAN_HOST environment variable parsing to support protocol and port#52crazy-matt wants to merge 1 commit intoMarkusPfundstein:mainfrom
Conversation
|
Hi bump this is getting in the way of multiple instances running at the same time |
|
Posting this comment for posterity, in hopes that it helps anyone else who lands here. This PR is based on package version 0.2.1 (released December 5, 2024). As of October 5, 2025, it has merge conflicts with the The core functionality provided by this PR -- environment variable support for
There hasn't been another release since 0.2.2, nor could I find any obvious indication of plans for such a release. The Until a new package version is released, the easiest way to use the package with these changes is by using the Installation: pip install git+https://github.com/MarkusPfundstein/mcp-obsidian.git@4aac5c2b874a219652e783b13fde2fb89e9fb640
# or
uv pip install --system git+https://github.com/MarkusPfundstein/mcp-obsidian.git@4aac5c2b874a219652e783b13fde2fb89e9fb640Configuration: {
"mcpServers": {
"obsidian": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/MarkusPfundstein/mcp-obsidian.git@4aac5c2b874a219652e783b13fde2fb89e9fb640",
"mcp-obsidian"
],
"env": {
"OBSIDIAN_API_KEY": "<REDACTED>",
"OBSIDIAN_HOST": "127.0.0.1",
"OBSIDIAN_PORT": "27124",
"OBSIDIAN_PROTOCOL": "https"
}
}
}
}I've successfully deployed the package with the Given that 1) the functionality from this PR is already available in the For what it's worth, I personally think that the URL parsing approach implemented by this PR is an improvement and would like to see it be fixed up and merged to the |
I landed here, thank you for posting the workaround, it worked perfectly!!! |
Problem Root Cause
The code was reading
OBSIDIAN_HOSTfrom environment variables but ignoring its value, always using a hard-coded default.Changes
parse_host_config()static method extracts components from full URLscreate_obsidian_api()factory that parsesOBSIDIAN_HOSTand passes correct parametersFixing