Package Types
LPM isn't just for UI components. The type field in lpm.config.json declares what kind of developer tool your package is, and the CLI adapts its install behavior accordingly.
{
"type": "mcp-server"
}
If no lpm.config.json exists or type is omitted, the package defaults to "source".
Available Types
| Type | Install behavior | Example |
|---|---|---|
source | Copies source files into project directory | UI components, templates, utilities |
mcp-server | Configures MCP server in editor settings | AI tool servers for Claude, Cursor |
vscode-extension | Installs to VS Code extensions directory | Editor themes, linters, formatters |
cursor-rules | Copies rules to .cursor/rules/ | AI coding rules and prompts |
github-action | Copies workflow/action files to .github/ | CI/CD actions and workflows |
other | Copies files to specified destinations | Anything that doesn't fit above |
Source
The default type. Source packages deliver code directly into your project - you own and can modify the files.
lpm add @lpm.dev/acme.ui-kit
Source packages support the full lpm.config.json feature set: interactive config prompts, conditional file includes, conditional dependencies, and smart import rewriting. See Source Configuration for details.
MCP Server
MCP (Model Context Protocol) server packages are installed by configuring your editor's MCP settings rather than copying files.
{
"type": "mcp-server",
"mcpConfig": {
"command": "node",
"args": ["server.js"],
"env": {
"API_KEY": { "prompt": "Enter your API key", "required": true }
}
}
}
When a user runs lpm add, the CLI:
- Downloads the package
- Prompts for any required environment variables (like API keys)
- Writes the MCP server entry into the editor's configuration file (Claude Desktop, Cursor, etc.)
The env field supports prompt definitions - each key with a prompt string becomes an interactive question during install.
Cursor Rules
Cursor rules packages install AI coding rules into your project's .cursor/rules/ directory.
{
"type": "cursor-rules",
"files": [
{ "src": "rules/**", "dest": ".cursor/rules/" }
]
}
These rules guide Cursor's AI when writing code in your project - coding standards, framework patterns, project-specific conventions.
GitHub Action
GitHub Action packages install workflow files and composite actions into your .github/ directory.
{
"type": "github-action",
"files": [
{ "src": "action.yml", "dest": ".github/actions/deploy-aws/" },
{ "src": "workflow.yml", "dest": ".github/workflows/" }
]
}
This makes it easy to share CI/CD pipelines, deployment workflows, and reusable actions across teams and projects.
VS Code Extension
VS Code extension packages install into the VS Code extensions directory.
{
"type": "vscode-extension"
}
Other
For developer tools that don't fit the categories above. Uses the standard files array to define where content goes.
{
"type": "other",
"files": [
{ "src": "config/**", "dest": ".config/my-tool/" }
]
}
How Type Affects the Package
Beyond install behavior, the type field influences:
- Browse & search - users can filter packages by type on the directory page
- AI analysis - the AI-generated package summary is tailored to the package type
- Quality checks - type-irrelevant checks are skipped (e.g., tree-shakability doesn't apply to MCP servers)
Setting the Type
Add a lpm.config.json file next to your package.json:
my-package/
├── package.json
├── lpm.config.json ← set type here
└── ...
Then publish as usual:
lpm publish
The CLI reads lpm.config.json automatically during publish and install.