LPM-cli

MCP servers

Wire Claude Code, Cursor, Windsurf, VS Code, and Claude Desktop to LPM's MCP server.

lpm mcp <action> [name]

Manages MCP (Model Context Protocol) server configuration for AI editors. lpm mcp setup writes the LPM MCP server entry into each supported editor that already has an MCP config file, and reports missing configs as skipped so the editor's agent can call LPM tools (search, install hint, audit, etc.) on your behalf.

Examples

lpm mcp setup                      # write the "lpm-registry" entry to existing editor configs
lpm mcp setup my-server            # use a custom server name instead of "lpm-registry"
lpm mcp status                     # which editors have any MCP server configured
lpm mcp remove lpm-registry        # remove the LPM entry from every editor that has it

The positional argument is the server name that gets written into each editor's mcpServers (or VS Code's servers) map — it is not an editor selector. lpm mcp setup always walks every editor in the supported list, writes the entry for editors with an existing config file, and prints a skipped row for missing configs; pass a name to override the default lpm-registry.

Subcommands

SubcommandEffect
setup [name]Add an MCP entry under name (default lpm-registry) to every supported editor whose config file exists. Idempotent — re-running overwrites the entry in place. Missing configs are listed as skipped.
remove <name>Remove the named entry from every editor whose config file exists. Editors without an existing config are skipped silently.
statusList every supported editor and which MCP servers (LPM or other) are configured in each.

Supported editors

EditorPlatformConfig fileKey
Claude Codeall~/.claude.jsonmcpServers
Cursorall~/.cursor/mcp.jsonmcpServers
Windsurfall~/.codeium/windsurf/mcp_config.jsonmcpServers
VS CodemacOS~/Library/Application Support/Code/User/mcp.jsonservers
VS CodeLinux~/.config/Code/User/mcp.jsonservers
Claude DesktopmacOS~/Library/Application Support/Claude/claude_desktop_config.jsonmcpServers

setup does not create missing editor config files. When a supported editor's config is present, LPM merges the server entry alongside any servers the user (or another tool) already wrote. Other keys in the config — themes, settings, unrelated MCP servers — are preserved. A malformed existing config is a hard error: the file is left untouched rather than overwritten.

What gets written

{
  "mcpServers": {
    "lpm-registry": {
      "command": "npx",
      "args": ["-y", "@lpm.dev/lpm-mcp-server"]
    }
  }
}

VS Code uses the same shape under the servers key instead of mcpServers. The server itself is the @lpm.dev/lpm-mcp-server npm package — npx -y fetches and runs it on demand, so no separate install step is required.

After setup, restart the editor and ask the agent something like "find a JSON-schema validator on LPM" — it'll route through the MCP tools to LPM's search and quality endpoints rather than guessing from training data.

Flags

lpm mcp takes no specific flags besides the global flags. --json emits structured output (success, server, plus configured / removed_from / editors depending on the subcommand) for scripting.

See also