# MCP servers (/docs/reference/mcp-servers)



```bash
lpm mcp <action> [name]
```

Manages [MCP](https://modelcontextprotocol.io) (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 [#examples]

```bash
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 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 [#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. |
| `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 [#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](/docs/project-setup#local-configuration-size-limits).

## What gets written [#what-gets-written]

```json
{
  "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 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 [#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 [#see-also]

* [`lpm skills`](/docs/packages/skills) — separate from MCP; package-published and standalone agent skills ([concept page](/docs/reference/ai-agent-skills))
* [Model Context Protocol](https://modelcontextprotocol.io) — the upstream spec
