Skip to content

Commit 06dc180

Browse files
authored
Fix Windows Obsidian MCP registration
Use npx.cmd for Windows Obsidian MCP registration and document operator test caveats.
1 parent 8942b4f commit 06dc180

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

docs/operator-testing.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\register-global.ps1 -A
5050

5151
## 4. List MCP Servers In Each CLI
5252

53+
Use the canonical Windows profile when testing global CLI configuration. This avoids the accented-profile drift that can make a CLI read stale user-level settings:
54+
55+
```powershell
56+
$env:USERPROFILE = 'C:\Users\KimHarjamaki'
57+
$env:HOME = 'C:\Users\KimHarjamaki'
58+
$env:AZURE_CONFIG_DIR = 'C:\Users\KimHarjamaki\.azure'
59+
```
60+
5361
```powershell
5462
codex.cmd mcp list | Select-String -Pattern 'prompt-refiner|obsidian|Connected|enabled'
5563
claude.cmd mcp list | Select-String -Pattern 'prompt-refiner|obsidian|Connected|Configured'
@@ -64,6 +72,10 @@ Expected result:
6472

6573
Codex may show `Unsupported` in the status column for stdio MCP entries. Treat the registration doctor as the authoritative config drift check.
6674

75+
On Windows, Obsidian MCP must be registered with `npx.cmd`, not `npx`. `npx` can resolve to the PowerShell shim (`npx.ps1`) and fail under the default execution policy.
76+
77+
Gemini can report MCP servers as disabled when the current folder is untrusted. Start Gemini from the repo once with `--skip-trust` or accept the workspace trust prompt. Gemini also requires its own auth setup (`GEMINI_API_KEY`, Vertex AI, or Gemini Code Assist) before a trusted full CLI session can start.
78+
6779
## 5. Verify Dashboard Runtime Health
6880

6981
Start or restart the local background runtime:

universal-refiner/scripts/operations/register-global.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ $profile = Resolve-NormalizedPath $ProfileRoot
320320
$repoRoot = Resolve-NormalizedPath (Join-Path $PSScriptRoot "..\..")
321321
$serverPath = ConvertTo-ConfigPath (Join-Path $repoRoot "dist\src\index.js")
322322
$vaultPath = ConvertTo-ConfigPath $ObsidianVaultPath
323+
$isWindowsHost = $env:OS -eq "Windows_NT" -or [System.IO.Path]::DirectorySeparatorChar -eq "\"
324+
$npxCommand = if ($isWindowsHost) { "npx.cmd" } else { "npx" }
323325

324326
if ([string]::IsNullOrWhiteSpace($CodexHome)) {
325327
if (-not $PSBoundParameters.ContainsKey("ProfileRoot") -and -not [string]::IsNullOrWhiteSpace($env:CODEX_HOME)) {
@@ -336,7 +338,7 @@ $servers = [ordered]@{
336338
args = @($serverPath)
337339
}
338340
"obsidian" = [ordered]@{
339-
command = "npx"
341+
command = $npxCommand
340342
args = @("-y", "@bitbonsai/mcpvault@latest", $vaultPath)
341343
}
342344
}

0 commit comments

Comments
 (0)