Skip to content

fix(mcp): launch PAL via uvx from PyPI - #232

Merged
laurigates merged 2 commits into
mainfrom
fix/pal-mcp-uvx
Sep 22, 2026
Merged

laurigates merged 2 commits into
mainfrom
fix/pal-mcp-uvx

Conversation

@laurigates

Copy link
Copy Markdown
Owner

What

Points this repo's PAL MCP entry at the published package and renames the server key to pal:

"pal": { "command": "uvx", "args": ["pal-mcp-server"] }

Any env block on the entry is preserved byte-for-byte; only command/args and the key change.

Why

A fleet-wide sweep of the 13 repos configuring PAL found five different launch shapes, four of them either broken or unable to run anywhere but one laptop. Each shape was probed with a real MCP initialize handshake:

Shape Result
uvx pal-mcp-server (PyPI) starts in 0.6s, portable
bare pal-mcp-server binary starts in 0.7s, but only where uv tool install has run
uvx --from git+… starts in 5.6s, needs a GitHub round-trip every time
uv run --project <local checkout> fails, rc=2
uvx --from git+…BeehiveInnovations crashes on import

When the server fails to start, the agent sees no PAL tools at all and falls back to invoking PAL by hand — which is the behaviour that prompted the sweep.

pal-mcp-server is on PyPI at 10.5.0, published by the project's own release-please workflow via trusted publishing (OIDC), so the package is the same code the git URL was building — without the clone, the local install, or the network dependency.

The rename

The server key was pal-mcp-server in nine repos and pal in four. That changes the exposed tool names between mcp__pal__* and mcp__pal-mcp-server__*, so any skill or rule naming one form silently missed in the other half of the fleet even where the server was healthy. Standardising on pal matches the canonical registry in the dotfiles repo (.chezmoidata.toml, [mcp_servers.pal]).

Local .claude/settings.local.json enablement lists were updated to match in the same pass. Those files are gitignored, so they are not part of this diff.

Verification

The rewritten entry was launched exactly as configured — uvx pal-mcp-server, with the entry's own env applied — and completed an MCP initialize handshake, reporting PAL 10.4.4 from cache.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WFdCCsngcpLhXmSNPacr2W

laurigates and others added 2 commits September 3, 2026 14:53
The entry ran `uv run --project` against a local checkout at an absolute path under /Users/lgates, which only exists on one machine. It had also stopped working entirely: the checkout pins `required-version = ">=0.8.17,<0.12"` while current uv is 0.12.x, so every project command failed with `error: Required uv version ... does not match the running version` and the server never started.

`uvx pal-mcp-server` resolves the published package (PyPI 10.5.0, released
by the project's own release-please workflow via trusted publishing), needs
no local install or checkout, and completes an MCP initialize handshake in
0.6s. Any env block on the entry is preserved unchanged.

The server key is renamed `pal-mcp-server` -> `pal` so the exposed tools are
`mcp__pal__*` in every repo. The two names were split roughly half and half
across the fleet, so guidance naming one of them silently missed in the
others even when the server was healthy.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WFdCCsngcpLhXmSNPacr2W
Bare `uvx pal-mcp-server` does not check the index on a normal run. It
prefers a copy installed with `uv tool install` when one exists, and
otherwise reuses whatever it first cached -- with no time-based expiry, so a
machine can sit on an old build indefinitely and a published fix never
reaches it.

Measured against a machine holding 10.4.4 while PyPI served 10.5.0:

    uvx pal-mcp-server                        -> 10.4.4
    uvx --refresh pal-mcp-server              -> 10.4.4
    uvx --reinstall pal-mcp-server            -> 10.4.4
    uvx --refresh-package ... pal-mcp-server  -> 10.4.4
    uvx pal-mcp-server@latest                 -> 10.5.0
    uvx --isolated pal-mcp-server             -> 10.5.0

`--refresh` and `--reinstall` act on the wheel cache, which is not what
selects the version here, so neither overrides the preference. `@latest`
does, and is the form the uv docs give for this.

Cost is one index round-trip per server start: 0.8-1.1s against 0.5s
cached. The trade is that a start now wants network; PAL is a network client
anyway, so an offline start had little to do.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WFdCCsngcpLhXmSNPacr2W
@laurigates
laurigates merged commit 8455e56 into main Sep 22, 2026
4 checks passed
@laurigates
laurigates deleted the fix/pal-mcp-uvx branch September 22, 2026 18:07
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.

1 participant