Skip to main content
Glama

Lemon Squeezy MCP Server

Demo GIF showing the MCP server in action

πŸ“– About

Give your AI assistant direct access to your payment and subscription data.

This server acts as a bridge between your AI assistant (like VS Code, Claude Desktop, or any MCP-compatible client) and your Lemon Squeezy account. Instead of manually logging into dashboards, searching for orders, and copy-pasting details, you can simply ask your AI questions like:

  • "What was the last sale?"

  • "Is subscription #12345 still active?"

  • "Find all customers named 'Alice'"

Your AI will query the data securely and give you an instant answer, right in your code editor.


Related MCP server: MCP Pool

🌱 Beginner Level: Getting Started

Who is this for? You are new to CLI tools or just want to get this running quickly with minimal fuss.

1. Prerequisites

Before you start, make sure you have these two things installed on your computer:

  • Node.js (Version 18 or higher): This is the software that runs the server. Download Node.js here.

  • A Lemon Squeezy Account: You need an account to get the data. Sign up here.

2. Get Your API Key

Think of this as your password for the server.

  1. Log in to your Lemon Squeezy Dashboard.

  2. Go to Settings -> API.

  3. Click Create API Key.

  4. Copy the key (it starts with ls_...). Keep this safe!

3. Quick Installation

Open your terminal (Command Prompt on Windows, Terminal on Mac) and run these commands one by one:

# 1. Download the project
git clone https://github.com/IntrepidServicesLLC/lemonsqueezy-mcp-server.git
cd lemonsqueezy-mcp-server

# 2. Install the necessary files
npm install

# 3. Build the server
npm run build

4. Connect to Your AI Editor

The exact steps depend on which AI editor you're using. Here are the most common:

One-copy-paste setup (Claude Desktop / Cursor / npx):
Add this to your MCP config file (e.g. claude_desktop_config.json or Cursor MCP settings). Replace YOUR_KEY_HERE with your Lemon Squeezy API key.

"mcpServers": {
  "lemonsqueezy": {
    "command": "npx",
    "args": ["-y", "lemonsqueezy-mcp-server"],
    "env": {
      "LEMONSQUEEZY_API_KEY": "YOUR_KEY_HERE"
    }
  }
}

(Requires the package to be published on npm. For local development, use the path-based config below.)

For VS Code (local path):

  1. Open VS Code Settings

  2. Go to Extensions β†’ MCP

  3. Add a new MCP server with:

    • Command: node

    • Args: ["/absolute/path/to/lemonsqueezy-mcp-server/dist/index.js"]

    • Env: {"LEMONSQUEEZY_API_KEY": "your_api_key_here"}

For Claude Desktop (local path):

  1. Edit ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

  2. Add the same configuration as above (command node, args with full path to dist/index.js)

  3. Restart Claude Desktop

For Other MCP Clients: Refer to your client's documentation for adding MCP servers. The server runs via node /path/to/dist/index.js with the LEMONSQUEEZY_API_KEY environment variable set.

After configuring, restart your AI editor and try asking: "Show me my last 5 orders."

Trusted local and guarded access

The dist/index.js stdio setup above is for a trusted local merchant operator. It exposes the full legacy catalog, including tools that can change Lemon Squeezy data. Do not use that entry point as a customer-facing or delegated agent connector.

For delegated, read-only access, a trusted host must create the separate guarded server with createGuardedServer(provider, expectedEnvironment). The host supplies and verifies a scoped grant outside MCP tool arguments. The guarded server exposes only get_billing_summary and get_subscription_status when the grant permits them. See guarded connector setup, the exact tool catalog, and support and security reporting.

For self-hosted remote callers, use the separate authenticated Streamable HTTP entry point and the remote guarded setup and runnable example. The example includes an offline MCP client smoke test and an optional local check with your own Lemon Squeezy test-mode key. Its fixture is not a hosted identity or grant service.


πŸš€ Medium User Level: Basic Usage & Configuration

Who is this for? You are comfortable with config files, environment variables, and want to customize how the server works.

Philosophy: "Sensible Defaults"

This server is designed to work out of the box with just one required setting: your LEMONSQUEEZY_API_KEY. Everything else is optional and has pre-configured defaults that work for 90% of users.

Configuration Options

You can configure the server using Environment Variables in your MCP settings or a .env file.

Variable

Description

Default

LEMONSQUEEZY_API_KEY

Required. Your live API key.

-

LEMONSQUEEZY_TEST_API_KEY

Optional. Use for testing without affecting real data.

-

ENABLE_RESOURCES

Set to true to let the AI see "active context" like failed payments automatically.

false

POLL_FAILED_PAYMENTS

Set to true to check for failed payments every few minutes.

false

Common Tasks

1. Using Test Mode If you want to develop without touching real money, generate a "Test API Key" in Lemon Squeezy and use LEMONSQUEEZY_TEST_API_KEY. The server will automatically prioritize the live key if both are present, so remove the live key to force test mode.

2. Enabling Salesforce Integration (Bonus) Want to sync customers to your CRM? Add these variables:

  • SALESFORCE_USERNAME

  • SALESFORCE_PASSWORD

  • SALESFORCE_TOKEN (Security Token)

The tools for Salesforce (like sync_customer_to_crm) will automatically appear in your AI's toolkit.

Troubleshooting

  • "Command not found": Ensure you ran npm run build after installing.

  • "Authentication Error": Double-check your API key. Did you copy an extra space?

  • Logs: The server outputs logs to the "MCP Log" window in your editor. Check there for specific error messages.


πŸ› οΈ Advanced User Level: Technical Documentation

Who is this for? Developers, Architects, and DevOps engineers looking for deep technical details, architecture diagrams, security compliance, and deployment strategies.

Containers: This repo has both a Containerfile and a Dockerfile with the same build. The Dockerfile exists so registries (e.g. Smithery) and CI that look for the filename Dockerfile can discover and build the image. You can build with Podman or Docker; see CONTAINERS.md for why both exist and how to build.

For a comprehensive breakdown of the system architecture, code modules, security protocols, and enterprise deployment guides, please refer to the:

πŸ‘‰ Technical Solution Design Document (TSD)

The TSD covers:

  • System Architecture & Diagrams

  • Module Interflows & Data Paths

  • Security & Compliance (AWS Secrets Manager, etc.)

  • Deployment (Docker/OCI Containers)

  • Risk Mitigation Strategies

Available Tools

53 tools
analyze_churn_riskB

Identify users with active subscriptions who haven't logged in recently (>28 days).

Inputs: no named parameters.

archive_customerC

Archive a customer (soft delete).

Inputs: customerId (required).

cancel_subscriptionC

Cancel a subscription.

Inputs: subscriptionId (required).

canonize_decisionB

Record a business decision with a snapshot of current active user metrics.

Inputs: decision (required), rationale (required), expectedOutcome (required), category.

create_checkoutC

Create a new checkout session for a product variant.

Inputs: storeId (required), variantId (required), customPrice, productOptions, +4 more.

create_customerC

Create a new customer in a store.

Inputs: storeId (required), name (required), email (required), city, +2 more.

create_discountC

Create a new discount code.

Inputs: storeId (required), name (required), code (required), amount (required), +3 more.

create_usage_recordC

Create a new usage record for a subscription item (for usage-based billing).

Inputs: subscriptionItemId (required), quantity (required), action (required).

create_webhookC

Create a new webhook.

Inputs: storeId (required), url (required), events (required), secret.

delete_discountC

Delete a discount.

Inputs: discountId (required).

delete_webhookC

Delete a webhook.

Inputs: webhookId (required).

generate_order_invoiceC

Generate an invoice for an order.

Inputs: orderId (required), name, email, address, +4 more.

generate_subscription_invoiceC

Generate an invoice for a subscription.

Inputs: subscriptionInvoiceId (required).

get_customerC

Get details of a specific customer by ID.

Inputs: customerId (required).

get_discountB

Get details of a specific discount by ID.

Inputs: discountId (required).

get_fileC

Get details of a specific file by ID.

Inputs: fileId (required).

get_financial_metricsC

Calculate comprehensive financial metrics including revenue (total, by period, growth rates), MRR/ARR, subscription metrics, order statistics, and customer metrics. Supports date range filtering.

Inputs: storeId, startDate, endDate.

get_license_keyC

Get details of a specific license key by ID.

Inputs: licenseKeyId (required).

get_orderA

Retrieve details of a specific Lemon Squeezy order by ID. Use this to verify payment status, order total, and customer information.

Inputs: orderId (required).

get_order_itemC

Get details of a specific order item by ID.

Inputs: orderItemId (required).

get_productB

Get details of a specific product by ID.

Inputs: productId (required).

get_storeC

Get details of a specific store by ID.

Inputs: storeId (required).

get_subscriptionB

Check the status of a subscription. Use this to verify if credits should be active, subscription status, renewal dates, and billing information.

Inputs: subscriptionId (required).

get_subscription_invoiceC

Get details of a specific subscription invoice by ID.

Inputs: subscriptionInvoiceId (required).

get_subscription_itemC

Get details of a specific subscription item by ID.

Inputs: subscriptionItemId (required).

get_subscription_item_usageC

Get current usage statistics for a subscription item (useful for usage-based billing).

Inputs: subscriptionItemId (required).

get_usage_recordC

Get details of a specific usage record by ID.

Inputs: usageRecordId (required).

get_variantC

Get details of a specific product variant by ID.

Inputs: variantId (required).

get_webhookC

Get details of a specific webhook by ID.

Inputs: webhookId (required).

issue_order_refundC

Issue a refund for an order.

Inputs: orderId (required), amount (required).

issue_subscription_invoice_refundC

Issue a refund for a subscription invoice.

Inputs: subscriptionInvoiceId (required), amount (required).

list_customersC

List customers with optional filtering. Useful for finding customer information, subscription status, and order history.

Inputs: email, page.

list_discountsC

List all discounts, optionally filtered by store.

Inputs: storeId, page.

list_filesC

List files, optionally filtered by product or variant.

Inputs: productId, variantId, page.

list_license_keysB

List license keys, optionally filtered by store or order.

Inputs: storeId, orderId, page.

list_order_itemsC

List order items, optionally filtered by order.

Inputs: orderId, page.

list_ordersB

List all orders with optional filtering. Useful for finding recent payments, the last successful payment, or browsing order history. Returns orders sorted by most recent first.

Inputs: page, storeId.

list_productsB

List all products, optionally filtered by store.

Inputs: storeId, page.

list_storesC

List all stores in your Lemon Squeezy account.

Inputs: page.

list_subscription_invoicesC

List subscription invoices, optionally filtered by subscription.

Inputs: subscriptionId, page.

list_subscription_itemsC

List subscription items, optionally filtered by subscription.

Inputs: subscriptionId, page.

list_subscriptionsC

List all subscriptions, optionally filtered by store or customer.

Inputs: storeId, page.

list_usage_recordsC

List usage records, optionally filtered by subscription item.

Inputs: subscriptionItemId, page.

list_variantsB

List all product variants, optionally filtered by product or store.

Inputs: productId, page.

list_webhooksC

List all webhooks, optionally filtered by store.

Inputs: storeId, page.

predict_churn_riskA

Predict churn risk for active subscriptions by analyzing payment history, subscription age, status, and activity patterns. Returns risk scores (0-100) and risk levels (low/medium/high/critical) with detailed factors.

Inputs: storeId, minRiskScore, limit.

search_ordersB

Search for orders by email or customer email. Useful for finding a payment when you only have a user's email address. Returns all orders matching the email.

Inputs: userEmail (required).

search_transactions_naturalC

Search transactions using natural language (e.g., 'refunds from yesterday', 'subscriptions this week'). Cross-references Lemon Squeezy and Firestore.

Inputs: query (required).

sync_customer_to_crmA

Sync a customer to Salesforce CRM. Checks if a Lead with the email exists, and if not, creates a new Lead with source 'AI Agent'. Returns the Lead ID.

Inputs: email (required), name (required), revenue, company, +1 more.

update_customerC

Update an existing customer's information.

Inputs: customerId (required), name, email, city, +2 more.

update_license_keyC

Update a license key (e.g., activate, deactivate, update status).

Inputs: licenseKeyId (required), status.

update_subscriptionC

Update a subscription (e.g., change plan, update billing details).

Inputs: subscriptionId (required), variantId, productId, billingAnchor.

update_webhookC

Update an existing webhook.

Inputs: webhookId (required), url, events, secret.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 53 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting specific resources and actions, such as get_customer vs. list_customers or create_discount vs. delete_discount. However, some tools like get_financial_metrics and predict_churn_risk could overlap in analyzing subscription health, and search_orders vs. list_orders might cause confusion if an agent misinterprets filtering needs. Overall, descriptions help clarify, but minor ambiguities exist.

    Naming Consistency5/5

    Tool names follow a highly consistent verb_noun pattern throughout, such as create_customer, list_subscriptions, update_webhook, and get_order. There are no deviations in style (all snake_case) or verb usage, making the set predictable and easy for an agent to parse and understand.

    Tool Count2/5

    With 53 tools, the count is excessive for a typical MCP server, even for a comprehensive e-commerce platform like Lemon Squeezy. This many tools can overwhelm agents, increase complexity, and likely includes redundant or overly granular operations that could be consolidated. A well-scoped server typically has 3-15 tools, so this is a significant mismatch.

    Completeness5/5

    The tool set provides complete CRUD/lifecycle coverage for the Lemon Squeezy domain, including customers, subscriptions, orders, products, discounts, webhooks, and more. It covers creation, retrieval, listing, updating, deletion, and specialized operations like analytics, refunds, and integrations, with no obvious gaps that would hinder agent workflows.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      An MCP server implementation that integrates Claude/VS Code with Salesforce, enabling natural language interactions with your Salesforce data and metadata.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      A curated collection of Model Context Protocol (MCP) servers for popular SaaS platforms β€” Stripe, Sentry, Notion, Linear, Datadog, Vercel, PagerDuty, HubSpot, Intercom, Shopify, Google Workspace
      28
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Persistent memory MCP server for Claude Code, Cursor, and GitHub Copilot. Semantic search, Git sync, project-based, Persistent memory MCP server for Claude Code, Cursor, and GitHub Copilot. Semantic search, Git sync, project-based organization, and team collaboration via Model Context Protocol.
      15
      345 npm
      2
      MIT