Skip to content

Release 0.4.0: hand off to lpm mcp serve - #6

Merged
tolgaergin merged 1 commit into
mainfrom
retire/hand-off-to-lpm-mcp-serve
Nov 12, 2026
Merged

tolgaergin merged 1 commit into
mainfrom
retire/hand-off-to-lpm-mcp-serve

Conversation

@tolgaergin

Copy link
Copy Markdown
Contributor

The LPM CLI serves MCP itself from 0.86.0 (lpm-dev/rust-client#1137, released in v0.86.0), so this is the last release of @lpm-registry/mcp-server.

What 0.4.0 does

  • Hands off to the CLI. When it finds LPM CLI 0.86.0 or later, at LPM_CLI_PATH or as lpm on PATH outside the project (the existing discovery), it starts lpm mcp serve on its own stdio. It passes SIGINT, SIGTERM and SIGHUP on, and exits as the CLI's server exits. Editors configured with npx -y @lpm-registry/mcp-server@latest get the CLI's server.
  • Keeps working otherwise. With an earlier CLI, or none, or when the CLI can't start, it serves its own tools as before (with the unreleased bounded-response fixes from Read registry responses within a size limit and one timeout #5). CLIs before 0.86.0 run @lpm-registry/mcp-server@latest for their own lpm mcp serve, so this path must keep working for them.
  • Never loops. The version check keeps an older CLI from starting this package again. As a second guard, the hand-off sets LPM_MCP_NPM_HANDOFF, and a server started with it never hands off again.
  • Says it is retired, in its instructions to agents and in its log line, and the README now covers moving to lpm mcp serve.

The version comes from the first line of lpm --version. 0.86.0's nightlies predate the native server, so a prerelease of 0.86.0 doesn't count. Older CLIs print an update notice below the version, so only the first line is read. Nothing reads stdin before the hand-off, so requests the client sends while the version is checked reach the CLI's server.

Verification

  • npm test: 371 passed. npm run lint is clean.
  • Process tests on POSIX with stand-in CLIs cover: the hand-off, including a request sent before the version check finishes; passing on SIGTERM; an older CLI keeping the bundled server; and a CLI that starts the package again, which doesn't loop. Each test fails with its mechanism removed: the guard, signal forwarding, the version gate, and reading stdin early.
  • End to end on macOS with real CLIs:
    • 0.86.0: handed off. The CLI's server answered with its 10 tools, and lpm_search returned results.
    • 0.85.0 (from the release) and no CLI: the bundled server ran its 17 tools, lpm_search returned results, and the retirement instructions were sent.

After merging: publish 0.4.0, then deprecate earlier versions on npm with a pointer to lpm mcp serve.

🤖 Generated with Claude Code

The LPM CLI serves MCP itself from 0.86.0, so this is the package's last
release. When it finds LPM CLI 0.86.0 or later, it starts `lpm mcp serve`
on its own stdio, passing stop signals on and mirroring the exit, so
editors that start the package through npx get the CLI's server.

With an earlier CLI, or none, it serves its own tools as before and tells
agents it is retired. CLIs before 0.86.0 run this package for their own
`lpm mcp serve`, so it must keep working for them. The hand-off sets
LPM_MCP_NPM_HANDOFF, and a server started with it never hands off again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tolgaergin
tolgaergin merged commit 9befce7 into main Nov 12, 2026
2 checks passed
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