npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lp-crm-api

v0.1.1

Published

Read-only LP-CRM API client and MCP server

Readme

lp-crm-api

npm version License Node.js TypeScript MCP Read only

Read-only TypeScript client and MCP server for LP-CRM.

This package exposes only LP-CRM read endpoints. It is intended for AI assistants and internal tools that need to inspect orders, statuses, categories, and products without writing anything back to the CRM.

Features

  • Typed LP-CRM client for form-encoded API requests.
  • MCP stdio server with read-only tools.
  • No write endpoints.
  • Node.js 18+ and native fetch.
  • Unit tests for request formatting, error handling, MCP routing, and read-only tool exposure.

Supported Endpoints

| LP-CRM endpoint | MCP tool | | --- | --- | | getStatuses.html | lpcrm_get_statuses | | getOrdersIdByStatus.html | lpcrm_get_order_ids_by_status | | getOrdersByID.html | lpcrm_get_orders_by_id | | getCategories.html | lpcrm_get_categories | | getProductsByCategory.html | lpcrm_get_products_by_category | | getProduct.html | lpcrm_get_products_by_id | | getOrdersIdByUser.html | lpcrm_get_order_ids_by_user |

Installation

Use directly with npx:

npx -y lp-crm-api

Or install globally:

npm install -g lp-crm-api
lp-crm-mcp

Configuration

| Variable | Required | Description | | --- | --- | --- | | LPCRM_BASE_URL | Yes | LP-CRM cabinet URL, for example https://example.lp-crm.biz | | LPCRM_API_KEY | Yes | Outgoing/read API key | | LPCRM_MIN_REQUEST_INTERVAL_MS | No | Minimum delay between LP-CRM requests from one MCP process; default is 1000 | | LPCRM_MAX_RETRIES | No | Number of retries for LP-CRM HTTP 429 responses; default is 2 | | LPCRM_RETRY_DELAY_MS | No | Retry delay when LP-CRM omits Retry-After; default is 2000 | | LOG_LEVEL | No | debug, info, warn, or error; default is info |

The API key is sent as the LP-CRM key form parameter. Do not commit real keys into your repository.

The MCP server serializes LP-CRM requests from one process. If LP-CRM returns HTTP 429, the client retries after Retry-After when present, otherwise after LPCRM_RETRY_DELAY_MS.

MCP Configuration

With npx:

{
  "mcpServers": {
    "lp-crm": {
      "command": "npx",
      "args": ["-y", "lp-crm-api"],
      "env": {
        "LPCRM_BASE_URL": "https://your-account.lp-crm.biz",
        "LPCRM_API_KEY": "your-read-key"
      }
    }
  }
}

With a local checkout:

{
  "mcpServers": {
    "lp-crm": {
      "command": "node",
      "args": ["/home/deniswhois/projects/lp-crm-api/dist/cli/index.js"],
      "env": {
        "LPCRM_BASE_URL": "https://your-account.lp-crm.biz",
        "LPCRM_API_KEY": "your-read-key"
      }
    }
  }
}

Client Usage

import { createLpCrmClient } from 'lp-crm-api';

const client = createLpCrmClient({
  baseUrl: process.env.LPCRM_BASE_URL!,
  apiKey: process.env.LPCRM_API_KEY!,
});

const statuses = await client.getStatuses();
const orderIds = await client.getOrderIdsByStatus({ status: 3 });
const orders = await client.getOrdersById(orderIds.data?.slice(0, 10) ?? []);

Direct client instances use the same retry and rate-limit defaults as the MCP server. Pass minRequestIntervalMs, maxRetries, or retryDelayMs to tune them; 0 disables the corresponding delay or retry count.

Tools

lpcrm_get_statuses

Get LP-CRM order statuses.

lpcrm_get_order_ids_by_status

Get order IDs by status.

Input:

{
  "status": "3",
  "dateStart": "2026-04-23",
  "dateEnd": "2026-04-30"
}

lpcrm_get_orders_by_id

Get order details by one or more order IDs. LP-CRM accepts up to 100 IDs per request.

Input:

{
  "orderIds": ["15198557827"]
}

lpcrm_get_categories

Get the LP-CRM product category tree.

lpcrm_get_products_by_category

Get products by category ID.

Input:

{
  "categoryId": 1
}

lpcrm_get_products_by_id

Get product details by one or more product IDs.

Input:

{
  "productIds": [1, 2],
  "statusIgnore": true
}

statusIgnore: true sends status_ignore=1; false sends status_ignore=0.

lpcrm_get_order_ids_by_user

Get order IDs by LP-CRM user login.

Input:

{
  "user": "admin",
  "dateStart": "2026-04-23",
  "dateEnd": "2026-04-30"
}

Development

npm install
npm test
npm run type-check
npm run build

Run the MCP server locally:

LPCRM_BASE_URL=https://example.lp-crm.biz LPCRM_API_KEY=... npm run dev

Live Verification

The current implementation was checked against a test LP-CRM cabinet:

  • getStatuses.html: ok
  • getOrdersIdByStatus.html: ok
  • getOrdersByID.html: ok
  • getCategories.html: ok
  • getProductsByCategory.html: endpoint reachable; the tested cabinet returned "no products in category"
  • getProduct.html: ok
  • getOrdersIdByUser.html: ok