MCP servers
Wire Claude Code, Cursor, Windsurf, VS Code, and Claude Desktop to the LPM.dev Registry MCP server.
lpm mcp <action> [name]Manages MCP (Model Context Protocol) server configuration for AI editors. lpm mcp setup writes the LPM.dev Registry 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.dev Registry 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.dev Registry entry from every editor that has itThe 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
| Subcommand | Effect |
|---|---|
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. |
serve | Run the verified stdio server configured by setup. Editors launch this automatically; direct terminal use and --json are rejected because stdout belongs to MCP JSON-RPC. |
remove <name> | Remove the named entry from every editor whose config file exists. Editors without an existing config are skipped silently. |
status | List every supported editor and which MCP servers (LPM.dev Registry or other) are configured in each. |
Supported editors
| Editor | Platform | Config file | Key |
|---|---|---|---|
| Claude Code | all | ~/.claude.json | mcpServers |
| Cursor | all | ~/.cursor/mcp.json | mcpServers |
| Windsurf | all | ~/.codeium/windsurf/mcp_config.json | mcpServers |
| VS Code | macOS | ~/Library/Application Support/Code/User/mcp.json | servers |
| VS Code | Linux | ~/.config/Code/User/mcp.json | servers |
| Claude Desktop | macOS | ~/Library/Application Support/Claude/claude_desktop_config.json | mcpServers |
setup does not create missing editor config files. When a supported editor's config is present, LPM CLI 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.
Each editor configuration file has a 16 MiB limit enforced before JSON parsing. Missing files remain skipped; an oversized file is a hard, path-specific error and is left untouched. See local configuration size limits.
What gets written
{
"mcpServers": {
"lpm-registry": {
"command": "lpm",
"args": ["mcp", "serve"]
}
}
}VS Code uses the same shape under the servers key instead of mcpServers. The launcher resolves @lpm-registry/mcp-server@latest through the LPM CLI install pipeline and runs the newest release allowed by the active security posture.
The verified runtime lives at ~/.lpm/cache/mcp/runtime and is revalidated after 24 hours. Refreshes install into a restricted staging directory and replace the active runtime only after the install and integrity checks complete. A registry transport outage, retryable HTTP failure, or rate limit can fall back to the last verified runtime; integrity, policy, firewall, provenance, authentication, and approval failures do not. Use lpm cache path mcp to inspect the cache or lpm cache clean mcp to remove it. Cleanup refuses while an MCP process is using the runtime.
LPM CLI writes editor configuration atomically and preserves the existing file's permissions, container key, unrelated servers, and other settings. Re-running setup replaces only the named entry with the same command and arguments.
Authentication and custom registries
The launcher downloads the public MCP package anonymously, so editor startup does not inspect the LPM CLI credential store merely to refresh the runtime. The verified MCP server still receives LPM_TOKEN; when it is unset, the server reads the OS keychain credential created by lpm login for the effective registry URL. Keychain lookup is registry-scoped, so https://lpm.dev, local development registries, and custom registries do not accidentally share credentials.
The registry defaults to https://lpm.dev. To use another trusted registry, set LPM_REGISTRY_URL in the environment inherited by the editor or in that editor's MCP server environment configuration. The MCP server accepts HTTPS registries and HTTP loopback registries, including IPv4-mapped IPv6 loopback addresses. It has no equivalent of the CLI's --insecure exception for remote HTTP. lpm mcp setup does not copy the current shell's registry override into editor configuration.
After setup, restart the editor and ask the agent something like "find a JSON-schema validator on the LPM.dev Registry" — it'll route through the MCP tools to LPM.dev Registry search and quality endpoints rather than guessing from training data.
Flags
lpm mcp takes no specific flags besides the global flags. --json emits one structured document for setup, remove, and status; it is rejected for serve to keep stdout exclusively available to MCP JSON-RPC. Setup output includes package, package_spec, version_policy, command, and args alongside success, server, and configured; remove and status use removed_from and editors.
See also
lpm skills— separate from MCP; package-published and standalone agent skills (concept page)- Model Context Protocol — the upstream spec