Add a port override env var

This commit is contained in:
TheConnMan
2025-06-08 06:24:23 -04:00
parent 0133bdd91f
commit a32eb48095
2 changed files with 19 additions and 6 deletions

View File

@@ -44,20 +44,25 @@ There are two ways to configure the environment with the Obsidian REST API Key.
],
"env": {
"OBSIDIAN_API_KEY": "<your_api_key_here>",
"OBSIDIAN_HOST": "<your_obsidian_host>"
"OBSIDIAN_HOST": "<your_obsidian_host>",
"OBSIDIAN_PORT": "<your_obsidian_port>"
}
}
}
```
2. Create a `.env` file in the working directory with the following required variable:
2. Create a `.env` file in the working directory with the following required variables:
```
OBSIDIAN_API_KEY=your_api_key_here
OBSIDIAN_HOST=your_obsidian_host
OBSIDIAN_PORT=your_obsidian_port
```
Note: You can find the key in the Obsidian plugin config.
Note:
- You can find the API key in the Obsidian plugin config
- Default port is 27124 if not specified
- Default host is 127.0.0.1 if not specified
## Quickstart
@@ -88,7 +93,12 @@ On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
"<dir_to>/mcp-obsidian",
"run",
"mcp-obsidian"
]
],
"env": {
"OBSIDIAN_API_KEY": "<your_api_key_here>",
"OBSIDIAN_HOST": "<your_obsidian_host>",
"OBSIDIAN_PORT": "<your_obsidian_port>"
}
}
}
}
@@ -107,7 +117,9 @@ On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
"mcp-obsidian"
],
"env": {
"OBSIDIAN_API_KEY" : "<YOUR_OBSIDIAN_API_KEY>"
"OBSIDIAN_API_KEY": "<YOUR_OBSIDIAN_API_KEY>",
"OBSIDIAN_HOST": "<your_obsidian_host>",
"OBSIDIAN_PORT": "<your_obsidian_port>"
}
}
}