home / mcp / lemon squeezy server

Lemon Squeezy Server

MCP server that manages Lemon Squeezy subscriptions, checkouts, products, orders, and more with audit logging.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "atharvagupta2003-mcp-lemonsqueezy": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "fastmcp",
        "server.py",
        "--directory",
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/src/mcp_lemonsqueezy"
      ],
      "env": {
        "LEMONSQUEEZY_API_KEY": "<YOUR-API-KEY>"
      }
    }
  }
}

You can host a MCP server that interfaces with Lemon Squeezy to manage subscriptions, checkouts, products, and more. This server provides a structured, auditable way to perform Lemon Squeezy operations via MCP tools and resources, with built-in logging and easy integration into MCP clients.

How to use

You interact with the Lemon Squeezy MCP Server by using an MCP client to issue tool calls. You can retrieve user information, list and inspect stores and products, manage orders and customers, handle subscriptions and licenses, and create or register checkouts and webhooks. Each operation is exposed as a discrete tool you can call with the required arguments, and all actions are logged for auditing and debugging.

How to install

Prerequisites you need before installing are Python 3.8 or newer, the MCP SDK 0.1.0 or newer, aiohttp, and python-dotenv. You will also use a runtime environment to run the MCP server locally and an MCP client to interact with it.

Step 1 — Install dependencies and set up the environment locally.

Step 2 — Configure your environment with your Lemon Squeezy API key.

Step 3 — Run the MCP server using the provided runtime command.

Configuration and runtime setup

The Lemon Squeezy MCP Server is intended to run via a runtime that supports MCP stdio integration. You provide the runtime command, arguments, and any required environment variables to execute the server. A typical configuration passes the API key as an environment variable and points the server to its MCP entry script.

Usage patterns and examples

Start the server in your development environment, then issue tool requests through your MCP client to perform operations like listing stores, fetching product details, creating checkouts, or registering webhooks. All actions are executed through the MCP tool interface and logged for auditing.

Security and auditing

The server keeps an audit trail of all tool-based Lemon Squeezy operations. Ensure your API key is kept secure and only exposed to trusted MCP clients. Use the audit resource to read logs and verify actions taken through the MCP interface.

Troubleshooting

If you encounter authentication errors, verify your LEMON_SQUEEZY_API_KEY is correctly set in the environment. For JSON or API structure errors, check that your tool requests include the required fields and valid identifiers. Review the audit logs to trace failing calls.

Available tools

get_user

Get current Lemon Squeezy user info

list_stores

List all stores

get_store

Fetch a specific store

list_products

List products

get_product

Get product details

get_product_variants

List variants for a product

list_orders

List all orders

get_order

Get details of an order

list_customers

List all customers

get_customer

Fetch customer details

list_subscriptions

List subscriptions

get_subscription

Get a subscription

list_license_keys

List license keys

get_license_key

Fetch license key info

create_checkout

Create a fully customized checkout session

create_webhook

Register a new webhook

list_webhooks

List all webhooks (filterable by store)