Skip to content

docs(pi): clarify fixed shared MCP config location - #125

Merged
ElbertePlinio merged 4 commits into
mainfrom
fix/123-pi-xdg-config
Sep 7, 2026
Merged

ElbertePlinio merged 4 commits into
mainfrom
fix/123-pi-xdg-config

Conversation

@ElbertePlinio

Copy link
Copy Markdown
Member

Closes #123

Verified the installed pi-mcp-adapter 2.32.1 at /home/dev/.pi/agent/npm/node_modules/pi-mcp-adapter. Its exact shared-global lookup is join(homedir(), ".config", "mcp", "mcp.json") in config.ts:13. Normal discovery adds that path as shared-global at config.ts:438-449, and loadMcpConfig reads and merges the discovered sources at config.ts:318-331. There is no XDG_CONFIG_HOME lookup. The installed CLI independently uses the same fixed path in cli.js:42. Source paths above are relative to the installed package directory. PI_MCP_CONFIG_MODE=exclusive bypasses shared discovery (config.ts:426-435); it does not redirect the shared-global path to XDG.

Both writers therefore keep $HOME/.config/mcp/mcp.json, even when XDG_CONFIG_HOME is set. README and INSTALL now explain why. The Rust init plan warning names the fixed location and ignored variable; its regression test checks both the warning and planned target. Doctor and dry-run target resolution remain unchanged. No TypeScript installer or browser-entry logic changed.

All requested validation passed: bun install --frozen-lockfile, bun run typecheck, bun run lint, bun run test, bun run build, cargo fmt --check, cargo clippy --workspace --all-targets --locked -- -D warnings, cargo test --workspace --locked, and complexity-gate check --changed. Vitest: 114 files passed, 1,473 tests passed, four skipped. Rust includes all 34 init tests passing. Explicit complexity checks of both touched Rust files checked 86 functions with no violations or unverified files. Live Android and opt-in live Flutter were not exercised.

Independent final review found no blocking issues. Rebased on origin/main before opening. No unresolved implementation issues; no path change is needed for this adapter version.

@ElbertePlinio
ElbertePlinio merged commit e427345 into main Sep 7, 2026
10 checks passed
@ElbertePlinio
ElbertePlinio deleted the fix/123-pi-xdg-config branch September 7, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(pi): honor XDG_CONFIG_HOME when writing the Pi MCP config

1 participant