ls_get_user
Get authenticated user
Get the authenticated user's information including name, email, and avatar.
Takes no parameters.

io.github.YawLabsPublished by GitHub account YawLabsv1.1.1Updated Nov 7, 2026
LemonSqueezy MCP server for managing your store from AI assistants
LemonSqueezy store management over the LemonSqueezy API: lets an assistant read and change stores, customers, orders, subscriptions, prices, discounts and…
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Follow the launch instructions in the repository.
One click adds this to your local Yaw MCP config so it's available in every Yaw Terminal session. Or install manually below.
MCP server for the LemonSqueezy API. Manage your store, products, customers, subscriptions, discounts, license keys, and more from any MCP-compatible AI assistant.
Requires Node.js 22 or later (engines.node is >=22).
Or one-click install via Smithery:
Smithery prompts for your env vars (API key, optional guardrails) and writes the config into your client for you.
Once configured, you can ask your AI assistant store-management questions in plain English and it routes them through the MCP tools:
Guardrails (refund cap, rate limit, store allowlist) catch the obvious mistakes before they reach LemonSqueezy. See Configuration for the env vars that turn them on.
Set your LemonSqueezy API key as an environment variable:
Get your API key from your LemonSqueezy dashboard.
A multi-stage Dockerfile is included at the repo root. The runtime image is a single bundled file on node:22-alpine running as the non-root node user, with no port exposed (stdio transport).
A matching Containerfile is provided for Podman users. It is generated from Dockerfile via npm run gen:containerfile. release.sh runs npm run check:containerfile in step 1, so a release fails if the two have drifted. This repo has no CI, so nothing checks a pull request for drift: run it yourself after editing Dockerfile.
Add to your MCP config:
Add to claude_desktop_config.json:
The Add to Yaw MCP button at the top adds the server without a key. Store the key in Yaw MCP's encrypted vault rather than as a plain env value:
It prompts for the value without echoing it (or reads it from piped stdin) and writes only a ${secret:...} reference into ~/.yaw-mcp/bundles.json. The same works for LEMONSQUEEZY_TEST_API_KEY and LEMONSQUEEZY_SINK_ADMIN_TOKEN.
Yaw MCP also treats LEMONSQUEEZY_API_KEY_COMMAND as a credential, because its name contains KEY: yaw-mcp doctor flags a literal value as plaintext:, and the value is masked in captured stderr. That is expected. The variable holds a command line, not a key, so the flag is harmless, and you can store the command as a secret the same way to silence it.
ls_get_user — Get the authenticated userls_get_store — Get a store by IDls_list_stores — List all stores (not gated by LEMONSQUEEZY_ALLOWED_STORE_IDS: returns every store the API key can see)ls_get_customer — Get a customer by IDls_list_customers — List customers (filter by store, email)ls_create_customer — Create a customerls_update_customer — Update a customerls_archive_customer — Archive a customerls_get_product — Get a product by IDls_list_products — List products (filter by store)ls_get_variant — Get a variant by IDls_list_variants — List variants (filter by product)ls_get_price — Get a price by IDls_list_prices — List prices (filter by variant)Both annotate every price record with effective_unit_price, the cents actually charged per unit, and effective_unit_price_note, which says where that number came from; unit_price_is_not_charged or unit_price_is_per_package is added where it applies. Read effective_unit_price rather than unit_price, which is vestigial on tiered (volume / graduated) pricing, or a variant's price. The subscription-item reads apply the same annotation to prices embedded via include=price.
ls_get_file — Get a file by IDls_list_files — List files (filter by variant)ls_get_order — Get an order by IDls_list_orders — List orders (filter by store, email)ls_generate_order_invoice — Generate a PDF invoicels_refund_order — Issue a refundls_get_order_item — Get an order item by IDls_list_order_items — List order items (filter by order, product, variant)ls_get_subscription — Get a subscription by IDls_list_subscriptions — List subscriptions (filter by store, status, product, etc.)ls_update_subscription — Update (plan switch, pause, billing anchor, trial)ls_cancel_subscription — Cancel a subscriptionls_get_subscription_invoice — Get a subscription invoice by IDls_list_subscription_invoices — List subscription invoices (filter by store, subscription, status)ls_generate_subscription_invoice — Generate a PDF invoicels_refund_subscription_invoice — Issue a refundls_get_subscription_item — Get a subscription item by IDls_list_subscription_items — List subscription items (filter by subscription, price)ls_update_subscription_item — Update quantityls_get_subscription_item_usage — Get current billing period usagels_get_usage_record — Get a usage record by IDls_list_usage_records — List usage records (filter by subscription item)ls_create_usage_record — Report metered usage (increment or set)ls_get_discount — Get a discount by IDls_list_discounts — List discounts (filter by store)ls_create_discount — Create a discount codels_delete_discount — Delete a discountls_get_discount_redemption — Get a discount redemption by IDls_list_discount_redemptions — List redemptions (filter by discount, order)ls_get_license_key — Get a license key by IDls_list_license_keys — List license keys (filter by store, order, product)ls_update_license_key — Update activation limit, expiry, or disabled statusls_get_license_key_instance — Get a license key activation by IDls_list_license_key_instances — List activations (filter by license key)ls_get_checkout — Get a checkout by IDls_list_checkouts — List checkouts (filter by store, variant)ls_create_checkout — Create a checkout URL (custom pricing, prefill, discounts)ls_get_webhook — Get a webhook by IDls_list_webhooks — List webhooks (filter by store)ls_create_webhook — Create a webhookls_update_webhook — Update a webhookls_delete_webhook — Delete a webhookls_activate_license — Activate a license key (no API key required)ls_validate_license — Validate a license key (no API key required)ls_deactivate_license — Deactivate a license key instance (no API key required). Destructive on every call: rate-limited and audited, with the license key masked in the audit entryls_get_affiliate — Get an affiliate by ID (commission rate, status, earnings)ls_list_affiliates — List affiliates (filter by user email). Not gated by LEMONSQUEEZY_ALLOWED_STORE_IDS: returns affiliates from every store the API key can seeBridge to a separate @yawlabs/lemonsqueezy-webhook-sink process so the agent can reconcile against webhooks that actually fired. Tools are always registered; if LEMONSQUEEZY_SINK_URL / LEMONSQUEEZY_SINK_ADMIN_TOKEN are unset, calls return a clear "not configured" error.
ls_sink_events_list — List webhook events the sink has received (filter by since / type / limit)ls_sink_event_mark_processed — Mark a sink event as processed by your consumer (idempotent)ls_sink_stats — Get total events, unprocessed count, and last-received timestampls_list_* tool, filters on every one but ls_list_stores, and relationship inclusion (include) on every ls_get_* / ls_list_* tool except ls_get_user and ls_get_subscription_item_usagenpx startupls_sink_* tools make a single attempt): a 429 is retried for every method, including POSTs such as refunds and License API calls, after waiting for the server's Retry-After (1s if it is missing or unparseable). This relies on a 429 meaning the request was rejected before LemonSqueezy acted on it. If Retry-After is over 30s, or the wait would pass the overall deadline, the 429 is returned instead. 5xx responses, timeouts and network errors are retried only for idempotent methods (GET, DELETE), with exponential backoff and jitter; a POST or PATCH that hits one is not retried. Up to 4 attempts, 30s per attempt, and no new attempt or wait is started after 90sLEMONSQUEEZY_DISABLE_CLASSES), and per-authority-class rate limits (LEMONSQUEEZY_RATE_LIMIT_PER_CLASS)lemonsqueezy://audit-log exposes the last 1000 destructive-call entries as application/x-ndjson for clients without stderr accesserror, audit, all)All configuration is via environment variables. The management-API tools need one of LEMONSQUEEZY_API_KEY_COMMAND, LEMONSQUEEZY_TEST_API_KEY or LEMONSQUEEZY_API_KEY (checked in that order); the three License API tools and the ls_sink_* tools need none of them. Everything else is opt-in.
Each line: {ts, event, tool?, method?, path?, status, latency_ms, request_id?, error?, audit?, inputs?}. Stdout is reserved for the MCP protocol — never log there.
HTTP errors include the upstream X-Request-Id when present, so support tickets to LemonSqueezy can reference the exact call. When an error body is JSON with no message the server recognizes, it is surfaced whole, in both the error text and the log line, after the same redaction as audited inputs (see Resources). A non-JSON error body is passed through as-is.
The strongest access control LemonSqueezy itself exposes is the API key boundary. A LemonSqueezy API key authorizes its full account — every store, and every tool except the three License API tools (see below) and the three ls_sink_* bridge tools, which do not use it — and the only way to deny a class of authority through LemonSqueezy is to not give the API key to the agent in the first place. LemonSqueezy's team-membership UI scopes which humans can do which actions in the dashboard, but the public API key inherits the full authority of the account it was issued under; there's no "this key can read but not refund" toggle. So the authoritative boundary, as far as the upstream API is concerned, is which API key the agent has.
That means the env vars below are the primary in-process control surface for anything LemonSqueezy can't gate by itself — per-class rate ceilings (RATE_LIMIT_PER_CLASS), deploy-time class disables (DISABLE_CLASSES), refund caps (MAX_REFUND_AMOUNT_CENTS), and the audit log. They are belt-and-braces in the sense that an operator who can change the server's env can remove them; they are load-bearing in the sense that LemonSqueezy has no equivalent. If you need an agent that genuinely cannot reach a store or a class of action, the durable answer is a separate LemonSqueezy account whose key is never handed to that agent. That answer does not cover the License API tools (see below).
Every tool is tagged with an authority class — a label for the kind of business authority a caller needs to invoke it. The class is separate from the binary destructive/read-only annotation: a customer-record read and a product list are both reads, but only one returns PII; a checkout creation and a refund are both writes, but only one moves money.
That is every tool's class. src/tools/tools.test.ts pins the same map, and moving a tool to another class is a MAJOR change under SEMVER.md.
Note: pii gates only the five customer tools above. It does not keep customer data out of an agent's reach: read-class tools still return customer names and emails incidentally (orders, subscriptions and license keys carry them), ls_list_orders and ls_list_subscriptions accept a userEmail filter, and the order, subscription and license-key get/list tools accept include=customer, which side-loads the customer record. The class is reserved for tools whose primary purpose is the customer record, so LEMONSQUEEZY_DISABLE_CLASSES=pii blocks those tools, not customer data. To keep customer data away from an agent, issue its API key from a separate LemonSqueezy account that doesn't host customer records you care about.
The License API tools are outside the API-key boundary. ls_activate_license, ls_validate_license and ls_deactivate_license authenticate with the license key the caller passes, not the API key, so they work on any LemonSqueezy account's license keys, whichever API key the server holds. A separate LemonSqueezy account does not fence them off, and LEMONSQUEEZY_ALLOWED_STORE_IDS does not gate them. The controls that do reach them, per tool:
ls_deactivate_license (class key): LEMONSQUEEZY_DISABLE_CLASSES=key, LEMONSQUEEZY_RATE_LIMIT_PER_CLASS=key:N, and LEMONSQUEEZY_DESTRUCTIVE_RATE_LIMIT, which treats every call as destructive. Every call is also audited, with the license key masked (see Resources).ls_activate_license (class key): the same two class controls. Activation is additive, so it is not destructive, and the destructive rate limit and the audit log do not see it.ls_validate_license (class read): only LEMONSQUEEZY_DISABLE_CLASSES=read or LEMONSQUEEZY_RATE_LIMIT_PER_CLASS=read:N, and both of those also hit every other read. The read-only lock-down below leaves it reachable.Both key controls also cover ls_update_license_key, the management-API tool in the same class.
The two opt-in env vars that consume this taxonomy:
LEMONSQUEEZY_RATE_LIMIT_PER_CLASS — caps the call rate per class. LemonSqueezy permissions cannot express "max 2 refunds per hour"; this is the only place that policy can live. This is the load-bearing one for runaway-agent prevention.LEMONSQUEEZY_DISABLE_CLASSES — blocks a class outright. Useful when fast deploy-time toggles matter — flipping DISABLE_CLASSES=pii,mutate,money,recurring,key,webhook to lock an analytics deployment into pure reads is a one-line config change (every read tool stays reachable, ls_validate_license included). An operator who can change the server's env can also remove this gate, so for an authoritative deny use a separate LemonSqueezy account whose API key the agent never sees; that does not bound the License API tools.Both are opt-in; with neither set, every class is allowed and unlimited.
The server exposes one MCP Resource for clients that prefer structural retrieval over parsing stderr:
For unattended/agentic use against a live store, we recommend:
LEMONSQUEEZY_ALLOWED_STORE_IDS to the same set as a belt-and-braces in-process gate on the tools that take a storeId. Account separation does not bound the three License API tools, which authenticate with a license key rather than the API key (see Authority classes).LEMONSQUEEZY_MAX_REFUND_AMOUNT_CENTS to a per-call cap well below any single-refund expectation.LEMONSQUEEZY_DESTRUCTIVE_RATE_LIMIT to a small number (e.g. 5/min) as a runaway-agent circuit breaker. For finer control, add LEMONSQUEEZY_RATE_LIMIT_PER_CLASS=money:2/h,recurring:5/h,key:10/m so each authority class has its own ceiling. If the agent also reports metered usage, size the recurring figure for that too: usage reports count against it.read), set LEMONSQUEEZY_DISABLE_CLASSES to the classes you want refused. The server rejects them before the API call is built. For an irrevocable deny, also issue the agent's API key from a separate LemonSqueezy account (the License API tools excepted).LEMONSQUEEZY_LOG=audit and ship stderr to your log aggregator. The audit level keeps every destructive-call entry plus errors but drops successful reads so log volume stays bounded over weeks of operation. Alert on status: "guardrail_block" or elevated error rates per tool. Use LEMONSQUEEZY_LOG=all while debugging.LEMONSQUEEZY_API_KEY_COMMAND against a vault-backed secret so credentials can rotate without restarting the server process. The API client invalidates its in-process key cache automatically on a 401/403, so a rotated upstream key picks up on the next request rather than waiting on the 1h TTL.What the server does not do and you must own at the caller level:
See SEMVER.md for the versioning policy.
This repo has no CI: nothing re-runs lint, types or tests on a pull request, so run them locally. npm run test:integration writes throwaway ci-test- resources to a real store.
Containerfile is generated from Dockerfile. After editing Dockerfile:
oam.js runs this server unmodified. Verified against oam 0.9.0: full MCP handshake, all 64 tools, the lemonsqueezy://audit-log resource, working fetch, and guardrail rejections with error text identical to Node. On the published oam 0.19.1 the MCP handshake, all 64 tools (the same 64 as on Node), a tool call, and the audit-log resource have been re-verified through the launcher, with and without the sandbox below.
oam 0.19.1 is the minimum. The launcher picks the newest oam it can find at or above it, never serves on an older one, and falls back to Node when there is none (LEMONSQUEEZY_MCP_RUNTIME=oam turns that into a hard error). A floor matters here: releases before 0.9.0 ran child_process.execFile arguments through a shell, which was reachable whenever LEMONSQUEEZY_API_KEY_COMMAND is configured -- that feature runs the key command with execFile, deliberately without a shell, and on those releases its arguments were re-split by one anyway.
The published lemonsqueezy-mcp command (bin/lemonsqueezy-mcp.mjs, which is what npx runs) chooses its runtime from these variables:
Set LEMONSQUEEZY_MCP_SANDBOX=1 to run under oam's --permission model: network restricted to api.lemonsqueezy.com:443 (plus the host and port of LEMONSQUEEZY_SINK_URL when set -- the port its URL names, or 80 / 443 for http: / https:), filesystem denied outright, and child-process denied unless LEMONSQUEEZY_API_KEY_COMMAND is configured. The grants are port-scoped because from oam 0.18.0 a host:port entry admits fetch to that port (up to 0.17.1 it admitted no HTTP request, which is why the grant used to name bare hosts).
With LEMONSQUEEZY_API_KEY_COMMAND configured, two more things change, both from oam 0.18.0:
--allow-env grants, and on Windows even the ones a child normally inherits (SYSTEMROOT, TEMP, USERPROFILE, ...) are filtered the same way. So the grant also names APPDATA, HOME, HOMEDRIVE, HOMEPATH, LANG, LOCALAPPDATA, SYSTEMDRIVE, SYSTEMROOT, TEMP, TMP, TMPDIR, USERPROFILE and WINDIR, which vault CLIs and PowerShell need. Measured on oam 0.18.0: without them powershell -NoProfile -Command ... failed with "Internal Windows PowerShell error"; with them it, cmd /c ... and sh -c ... key commands all returned a key and the API answered on 443.--permission / --allow-* flags to the child's NODE_OPTIONS, as Node does for its own children, and Node 22 refuses --allow-net there (node: --allow-net= is not allowed in NODE_OPTIONS, exit 9). Clear it first: sh -c 'unset NODE_OPTIONS; exec node get-key.js', or on Windows cmd /c "set NODE_OPTIONS=&& node get-key.js" (both measured working). The launcher prints this advice on stderr when the key command is a bare node. Setting NODE_OPTIONS=--permission yourself does not help: the child would run under Node's permission model with no read grant for its own script.When the launcher, running on oam, hands the server to Node (LEMONSQUEEZY_MCP_RUNTIME=node, or an oam below the floor), it takes --permission and --allow-* out of an inherited NODE_OPTIONS first and names what it dropped on stderr: Node cannot apply oam's net and env grants, and with them it would exit 9 before serving.
--permission is a process-level flag, so the launcher always starts a fresh oam for it -- even when a client already launches the command under oam 0.19.1+. That is a preference, not a guarantee: if no usable oam can be started, LEMONSQUEEZY_MCP_RUNTIME=auto still serves the server without --permission, and LEMONSQUEEZY_MCP_RUNTIME=oam exits with an error instead.
It is opt-in rather than default because a wrong grant does not fail loudly. oam denies a non-granted environment variable by making it absent from process.env rather than throwing, so an under-granted LEMONSQUEEZY_API_KEY reads as "unauthenticated" rather than "denied". The env allow-list in the launcher is derived from what the shipped bundle actually reads -- if you add a new process.env lookup, extend that list with it.
Note the -- separator if you pass arguments to the server rather than to oam: oam run dist/index.js -- version.
The published command prefers oam; it does not require it. oam is not distributed on npm, so npx @yawlabs/lemonsqueezy-mcp has to keep working without it, and it does: discovery is file-existence checks only, never a subprocess, and the fallback runs the server inside the Node process npm already started. With oam installed, though, the command boots Node, runs --version on every oam binary it found to pick the newest, and only then boots oam, so it is always slower than pointing your client at oam directly with the config above. LEMONSQUEEZY_MCP_RUNTIME=node skips oam entirely. An MCP client cold-starts this server once per session, so startup is the cost that actually gets paid -- and it has not been measured for this repo on a current oam. Measure on your own hardware before concluding anything.
Two places oam does win for this repo, both opt-in and neither touching the npm package:
npm run check:oam — type-checks via oam check (tsgo, TypeScript 7 native). Measured 2878ms against 4406ms for tsc --noEmit, same clean result. npx tsc --noEmit remains the portable default and is what the pre-commit checklist calls for.npm run build:binary:oam — builds the standalone binary via oam compile (scripts/build-binary-oam.mjs). Measured 57.14 MB. Writes to bin/<platform>-<arch>/, which scripts/stage-release-asset.mjs then stages as a release asset. If you redistribute that binary it embeds oam's runtime, so ship oam's LICENSE, NOTICE and THIRD_PARTY_LICENSES.md with it.The source stays runtime-agnostic on purpose: no oam: imports anywhere, and tests stay on node:test. That is what keeps the Node fallback real rather than nominal — an oam:test or oam:-prefixed import would make "falls back to Node" false the moment it landed. Any oam invocation writes a bytecode cache to oam/ in the working directory; that path is gitignored.
Releases run locally, from a clean checkout of main, with release.sh. This repo has no GitHub Actions workflows (.github/ holds only CODEOWNERS), so pushing a tag by itself publishes nothing. release.sh keeps a CI mode for a tag-triggered release workflow, the intended end state, but nothing invokes it today.
Before cutting a release, write the ## [Unreleased] entry in CHANGELOG.md by hand, and run npm run test:integration against a test-mode store if src/api.ts or a tool handler changed (it needs LEMONSQUEEZY_TEST_API_KEY and LEMONSQUEEZY_TEST_STORE_ID, and exits 1 without them). The unit suite mocks fetch, so it cannot see changes in the upstream API. Then:
Before step 1, release.sh checks that gh is installed and authenticated and that you are on main, and refuses a dirty working tree unless it is resuming a run whose version bump already landed. Unless X.Y.Z is already on npm, it also runs npm whoami and stops if that fails, so a dead or missing npm token ends the run before step 4 pushes the tag. npm whoami proves the token is live, not that it is an automation token: a web-login session passes it and then fails step 5 with EOTP.
It then runs eight steps on the workstation:
npm run lint, npm run check:containerfile (fails if Containerfile has drifted from Dockerfile), and scripts/check-oam-floor.mjs, which fails if the oam floor (OAM_MIN) is quoted differently anywhere in the launcher, README or launcher test, or is behind the latest oam release (LEMONSQUEEZY_MCP_ALLOW_STALE_OAM=1 releases on the old floor deliberately; an unreachable GitHub API is reported and does not fail it)npm test (which builds first), then npm run check:compliance: @yawlabs/mcp-compliance, pinned to the version line Yaw MCP grades with, grades the built server through the launcher on Node. A failed required check or a grade below LEMONSQUEEZY_MCP_MIN_COMPLIANCE (default A) fails the release; skipped checks and the suite's warnings are printed as WARNING lines. If the suite cannot run at all it says so and the release carries on, unless LEMONSQUEEZY_MCP_COMPLIANCE_STRICT=1package.json and package-lock.json, and sync server.json to it## [Unreleased] in CHANGELOG.md into ## [X.Y.Z] (when [Unreleased] is empty, write that section from the commit subjects since the previous tag instead, with a warning), commit, create the annotated tag vX.Y.Z, and push main with the tagnpm publish --access public## [X.Y.Z] section of CHANGELOG.mdnpx -y @yawlabs/[email protected] --version (up to 60 attempts 10 seconds apart), then publish server.json to the Official MCP Registry with mcp-publisherpackage.json and the tagRe-running after a partial failure is safe. ./release.sh X.Y.Z detects the version bump, commit, tag, npm publish and GitHub release that already landed and skips them; lint, test, the push and the npx smoke test run again. The MCP Registry publish in step 7 is not skipped, so a re-run after it has succeeded fails there on the duplicate version.
A workstation publish carries no npm provenance attestation: release.sh passes --provenance only in CI mode.
One-time setup on each machine:
An npm automation token for a publisher of @yawlabs/lemonsqueezy-mcp, in ~/.npmrc (npmjs.com -> Access Tokens -> Generate -> Automation):
Never run npm login --auth-type=web. It overwrites the automation token with a 2FA-bound web session, and the next publish fails with EOTP.
gh auth login. The pre-flight requires it, and step 6 creates the release with it. Step 7 logs mcp-publisher in with its token (gh auth token) unless MCP_REGISTRY_TOKEN is set; either way the registry grants the io.github.YawLabs/* namespace only to a YawLabs org Owner whose token can read org roles (read:org does; so do repo, user, write:org and admin:org). It reads the role at login but refuses only at publish, so a token that cannot read it still logs in and the publish gets a 403. mcp-publisher is downloaded to ~/.local/bin on first use; set MCP_PUBLISHER to use another copy.
jq, curl and tar on PATH. Step 3 edits server.json with jq. Step 7 downloads mcp-publisher with curl and tar on first use, unless MCP_PUBLISHER points at an existing copy. It also polls npm with curl, and skips that wait with a warning if curl is missing.
Rights to push to main and create v* tags. The repository rulesets require a pull request for main and restrict v* tag creation, only organization admins bypass them, and step 4 pushes both directly.
MIT
Source: README.md at commit 424a41a
Get authenticated user
Get the authenticated user's information including name, email, and avatar.
Takes no parameters.
Get store
Get a specific store by ID, including name, slug, currency, and sales statistics.
includestoreIdrequiredList stores
List all stores for the authenticated user. Results are paginated — check meta.page in the response for currentPage, lastPage, and total. Cross-store note: LEMONSQUEEZY_ALLOWED_STORE_IDS does NOT gate this tool -- it has no storeId field and no parent ID filter to scope by, so it returns every store the API key can see, including stores outside the allowlist. Pair with a scoped LemonSqueezy API key for true cross-store enforcement -- the API key's visibility is the true boundary.
includepageSizepageNumberGet customer
Get a specific customer by ID, including name, email, city, country, MRR, total revenue, and customer portal URL.
includecustomerIdrequiredList customers
List all customers, optionally filtered by store or email. Results are paginated — check meta.page in the response for currentPage, lastPage, and total.
emailincludestoreIdpageSizepageNumberCreate customer
Create a new customer in a store.
citynamerequiredemailrequiredregioncountrystoreIdrequiredUpdate customer
Update an existing customer's name, email, city, region, country, or status. The only supported status value is 'archived'; setting it here is the same operation as ls_archive_customer and is treated as destructive (rate-limited and audited). Other field edits are not.
citynameemailregionstatuscountrycustomerIdrequiredArchive customer
Archive a customer. Sets their status to 'archived'. This is reversible by updating their status back.
customerIdrequiredGet product
Get a specific product by ID, including name, description, price, and status.
includeproductIdrequiredList products
List all products, optionally filtered by store. Results are paginated — check meta.page in the response for currentPage, lastPage, and total.
includestoreIdpageSizepageNumberGet variant
Get a specific product variant by ID, including billing interval and trial settings. WARNING: do NOT read `price` as the amount charged. For usage-based, per-seat or otherwise tiered variants it is vestigial and commonly reads the same value across products that bill very differently. The authoritative per-unit price lives on the variant's PRICE resource -- call ls_list_prices with this variantId, take the newest record by `created_at`, and read its `effective_unit_price`.
includevariantIdrequiredList variants
List all variants, optionally filtered by product. Results are paginated — check meta.page in the response for currentPage, lastPage, and total. WARNING: do NOT read `price` as the amount charged -- for usage-based, per-seat or otherwise tiered variants it is vestigial and commonly reads the same value across products that bill very differently. The authoritative per-unit price lives on each variant's PRICE resource: call ls_list_prices with the variantId, take the newest record by `created_at`, and read its `effective_unit_price`. Cross-store note: when LEMONSQUEEZY_ALLOWED_STORE_IDS is set, this tool requires at least one of: productId. Even with that set, Pair with a scoped LemonSqueezy API key for true cross-store enforcement -- the API key's visibility is the true boundary.
includepageSizeproductIdpageNumberGet price
Get a specific price by ID, including amount, currency, and billing interval. Every record is annotated with `effective_unit_price` (cents actually charged per unit) and `effective_unit_price_note`. READ THAT, not `unit_price`: on a tiered scheme (volume/graduated) `unit_price` is vestigial and is NOT the charged amount -- the real per-unit price lives in `tiers[]`, and such records also carry `unit_price_is_not_charged: true`. On `package` pricing `unit_price` IS charged, but it buys a block of `package_size` units, so `effective_unit_price` reports the per-unit figure and the record carries `unit_price_is_per_package: true`.
includepriceIdrequiredList prices
List all prices, optionally filtered by variant. Results are paginated — check meta.page in the response for currentPage, lastPage, and total. Every record is annotated with `effective_unit_price` (cents actually charged per unit) and `effective_unit_price_note`. READ THAT, not `unit_price`: on a tiered scheme (volume/graduated) `unit_price` is vestigial and is NOT the charged amount -- the real per-unit price lives in `tiers[]`, and such records also carry `unit_price_is_not_charged: true`. On `package` pricing `unit_price` IS charged, but it buys a block of `package_size` units, so `effective_unit_price` reports the per-unit figure and the record carries `unit_price_is_per_package: true`. NOTE that several price records can exist per variant; the CURRENT one is the newest by `created_at` (results are sorted newest-first). Cross-store note: when LEMONSQUEEZY_ALLOWED_STORE_IDS is set, this tool requires at least one of: variantId. Even with that set, Pair with a scoped LemonSqueezy API key for true cross-store enforcement -- the API key's visibility is the true boundary.
includepageSizevariantIdpageNumberGet file
Get a specific file by ID, including name, size, download URL, and associated variant.
fileIdrequiredincludeList files
List all files, optionally filtered by variant. Results are paginated — check meta.page in the response for currentPage, lastPage, and total. Cross-store note: when LEMONSQUEEZY_ALLOWED_STORE_IDS is set, this tool requires at least one of: variantId. Even with that set, Pair with a scoped LemonSqueezy API key for true cross-store enforcement -- the API key's visibility is the true boundary.
includepageSizevariantIdpageNumberGet order
Get a specific order by ID, including status, total, currency, customer info, and payment details.
includeorderIdrequiredList orders
List all orders, optionally filtered by store or user email. Results are paginated — check meta.page in the response for currentPage, lastPage, and total.
includestoreIdpageSizeuserEmailpageNumberGenerate order invoice
Generate a PDF invoice for an order. Returns a download URL for the invoice.
citynamenotesstatelocaleaddresscountryorderIdrequiredzipCodeRefund order
Issue a refund for an order. This is irreversible — the refund amount is in cents (e.g. 1000 = $10.00).
amountrequiredorderIdrequiredGet order item
Get a specific order item by ID, including product name, variant, price, and quantity.
includeorderItemIdrequiredList order items
List all order items, optionally filtered by order or product. Results are paginated — check meta.page in the response for currentPage, lastPage, and total. Cross-store note: when LEMONSQUEEZY_ALLOWED_STORE_IDS is set, this tool requires at least one of: orderId, productId, variantId. Even with that set, Pair with a scoped LemonSqueezy API key for true cross-store enforcement -- the API key's visibility is the true boundary.
includeorderIdpageSizeproductIdvariantIdpageNumberGet subscription
Get a specific subscription by ID, including status, billing interval, renewal date, and customer info.
includesubscriptionIdrequiredList subscriptions
List all subscriptions, optionally filtered by store, order, product, variant, or status. Results are paginated — check meta.page in the response for currentPage, lastPage, and total.
statusincludeorderIdstoreIdpageSizeproductIduserEmailvariantIdpageNumberorderItemIdUpdate subscription
Update a subscription. Can change the variant (plan switch), pause/unpause, set billing anchor, or update invoice details. Pausing (`pause: 'void'` or `'free'`), switching plan (`variantId`), changing the billing anchor (`billingAnchor`), invoicing immediately (`invoiceImmediately: true`), or changing the trial end (`trialEndsAt`) changes what the customer pays or when, and is treated as destructive (rate-limited and audited); resuming (`pause: 'resume'`), un-cancelling (`cancelled: false`), `invoiceImmediately: false` and `disableProrations` are not. Use ls_cancel_subscription for cancellation.
pausecancelledvariantIdtrialEndsAtbillingAnchorsubscriptionIdrequireddisableProrationsinvoiceImmediatelyCancel subscription
Cancel a subscription. The subscription remains active until the end of the current billing period, then expires.
subscriptionIdrequiredGet subscription invoice
Get a specific subscription invoice by ID, including status, total, billing reason, and payment details.
includesubscriptionInvoiceIdrequiredList subscription invoices
List all subscription invoices, optionally filtered by store, subscription, or status. Results are paginated — check meta.page in the response for currentPage, lastPage, and total.
statusincludestoreIdpageSizerefundedpageNumbersubscriptionIdGenerate subscription invoice
Generate a PDF invoice for a subscription invoice. Returns a download URL.
citynamenotesstatelocaleaddresscountryzipCodesubscriptionInvoiceIdrequiredRefund subscription invoice
Issue a refund for a subscription invoice. This is irreversible — the refund amount is in cents (e.g. 1000 = $10.00).
amountrequiredsubscriptionInvoiceIdrequiredGet subscription item
Get a specific subscription item by ID, including quantity, pricing, and associated subscription. Pass `include=price` for the price record behind it; embedded price records are annotated with `effective_unit_price` (cents actually charged per unit) -- read that, not the record's `unit_price`, which is vestigial on tiered pricing and per-package on package pricing.
includesubscriptionItemIdrequiredList subscription items
List all subscription items, optionally filtered by subscription or price. Results are paginated — check meta.page in the response for currentPage, lastPage, and total. Pass `include=price` for the price records behind them; embedded price records are annotated with `effective_unit_price` (cents actually charged per unit) -- read that, not a record's `unit_price`, which is vestigial on tiered pricing and per-package on package pricing. Cross-store note: when LEMONSQUEEZY_ALLOWED_STORE_IDS is set, this tool requires at least one of: subscriptionId, priceId. Even with that set, Pair with a scoped LemonSqueezy API key for true cross-store enforcement -- the API key's visibility is the true boundary.
includepriceIdpageSizepageNumbersubscriptionIdUpdate subscription item
Update a subscription item's quantity. Used for seat-based or quantity-based billing.
quantityrequiredsubscriptionItemIdrequiredGet subscription item usage
Get the current usage for a metered subscription item within the current billing period.
subscriptionItemIdrequiredGet usage record
Get a specific usage record by ID, including quantity and action type.
includeusageRecordIdrequiredList usage records
List all usage records, optionally filtered by subscription item. Results are paginated — check meta.page in the response for currentPage, lastPage, and total. Cross-store note: when LEMONSQUEEZY_ALLOWED_STORE_IDS is set, this tool requires at least one of: subscriptionItemId. Even with that set, Pair with a scoped LemonSqueezy API key for true cross-store enforcement -- the API key's visibility is the true boundary.
includepageSizepageNumbersubscriptionItemIdCreate usage record
Report usage for a metered subscription item. Use 'increment' action to add to the current usage, or 'set' to replace it.
actionquantityrequiredsubscriptionItemIdrequiredGet discount
Get a specific discount by ID, including code, amount, type, and usage limits.
includediscountIdrequiredList discounts
List all discounts, optionally filtered by store. Results are paginated — check meta.page in the response for currentPage, lastPage, and total.
includestoreIdpageSizepageNumberCreate discount
Create a new discount code. Supports percentage or fixed amount discounts with optional duration and usage limits.
coderequirednamerequiredamountrequiredstoreIdrequireddurationstartsAtexpiresAtamountTyperequiredvariantIdsmaxRedemptionsdurationInMonthsisLimitedToProductsDelete discount
Permanently delete a discount. This is irreversible.
discountIdrequiredGet discount redemption
Get a specific discount redemption by ID, showing when and where a discount was used.
includediscountRedemptionIdrequiredList discount redemptions
List all discount redemptions, optionally filtered by discount or order. Results are paginated — check meta.page in the response for currentPage, lastPage, and total. Cross-store note: when LEMONSQUEEZY_ALLOWED_STORE_IDS is set, this tool requires at least one of: discountId, orderId. Even with that set, Pair with a scoped LemonSqueezy API key for true cross-store enforcement -- the API key's visibility is the true boundary.
includeorderIdpageSizediscountIdpageNumberGet license key
Get a specific license key by ID, including key value, status, activation limit, and expiry date.
includelicenseKeyIdrequiredList license keys
List all license keys, optionally filtered by store, order, or product. Results are paginated — check meta.page in the response for currentPage, lastPage, and total.
includeorderIdstoreIdpageSizeproductIdpageNumberorderItemIdUpdate license key
Update a license key's activation limit, expiry date, or disabled status. Setting `disabled: true`, changing `activationLimit`, or changing `expiresAt` can revoke customer access and is treated as destructive (rate-limited and audited); `disabled: false` alone is not.
disabledexpiresAtlicenseKeyIdrequiredactivationLimitGet license key instance
Get a specific license key instance (activation) by ID, including instance name and creation date.
includelicenseKeyInstanceIdrequiredList license key instances
List all license key instances (activations), optionally filtered by license key. Results are paginated — check meta.page in the response for currentPage, lastPage, and total. Cross-store note: when LEMONSQUEEZY_ALLOWED_STORE_IDS is set, this tool requires at least one of: licenseKeyId. Even with that set, Pair with a scoped LemonSqueezy API key for true cross-store enforcement -- the API key's visibility is the true boundary.
includepageSizepageNumberlicenseKeyIdGet checkout
Get a specific checkout by ID, including URL, expiry, and custom data.
includecheckoutIdrequiredList checkouts
List all checkouts, optionally filtered by store or variant. Results are paginated — check meta.page in the response for currentPage, lastPage, and total.
includestoreIdpageSizevariantIdpageNumberCreate checkout
Create a new checkout URL for a product variant. Returns a URL where the customer can complete their purchase. Supports custom pricing, prefilled customer data, and checkout customization.
nameemailstoreIdrequiredexpiresAttaxNumbervariantIdrequiredcustomDatacustomPricediscountCodeenabledVariantsbillingAddressZipbillingAddressCountryGet webhook
Get a specific webhook by ID, including URL, events, and last sent timestamp.
includewebhookIdrequiredList webhooks
List all webhooks, optionally filtered by store. Results are paginated — check meta.page in the response for currentPage, lastPage, and total.
includestoreIdpageSizepageNumberCreate webhook
Create a new webhook to receive event notifications. The signing secret is returned only once — save it immediately.
urlrequiredeventsrequiredsecretrequiredstoreIdrequiredUpdate webhook
Update an existing webhook's URL, events, or secret. Setting `secret` rotates the signing secret and breaks signature verification on the receiver until they update their copy -- this is treated as destructive (rate-limited and audited).
urleventssecretwebhookIdrequiredDelete webhook
Permanently delete a webhook. This is irreversible.
webhookIdrequiredActivate license
Activate a license key for an instance. Does not require an API key — uses the license key itself for auth.
licenseKeyrequiredinstanceNamerequiredValidate license
Validate a license key or specific instance. Does not require an API key — uses the license key itself for auth.
instanceIdlicenseKeyrequiredDeactivate license
Deactivate a license key instance, revoking that instance's access. Destructive: rate-limited and audited, with the license key masked in the audit entry. Does not require an API key — uses the license key itself for auth.
instanceIdrequiredlicenseKeyrequiredGet affiliate
Get a specific affiliate by ID, including commission rate, status, and earnings.
includeaffiliateIdrequiredList affiliates
List all affiliates for the authenticated user's stores, optionally filtered by user email. Results are paginated — check meta.page in the response for currentPage, lastPage, and total. Cross-store note: LEMONSQUEEZY_ALLOWED_STORE_IDS does NOT gate this tool -- it has no storeId field and no parent ID filter to scope by, so it returns affiliates tied to every store the API key can see, including non-allowed ones. Pair with a scoped LemonSqueezy API key for true cross-store enforcement -- the API key's visibility is the true boundary.
includepageSizeuserEmailpageNumberList sink webhook events
List webhook events the sink has received, optionally filtered. Use `since` (received_at timestamp, exclusive) to checkpoint. Requires the sink at LEMONSQUEEZY_SINK_URL with LEMONSQUEEZY_SINK_ADMIN_TOKEN.
typelimitsinceMark sink event processed
Mark a sink event as processed by your consumer. Idempotent.
idrequiredGet sink stats
Get sink totals: total events, unprocessed count, last-received timestamp.
Takes no parameters.
90% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
npx -y @yawlabs/lemonsqueezy-mcp@latestnpx -y @smithery/cli install @yawlabs/lemonsqueezy-mcp --client claudeYou: How much did we make from the "Pro Annual" plan last month?Claude: [calls ls_list_subscriptions, ls_get_variant, ls_list_subscription_invoices] Pro Annual brought in $14,280 across 84 active subscriptions in April. Three of those were upgrades from monthly; none churned.
You: Refund order #LS-1234 in full.Claude: [calls ls_get_order to fetch the total, then ls_refund_order with amount = total] Refunded $99.00 against order LS-1234. The customer's card will see the credit in 5-10 business days.
You: Disable license key abc-123 for the customer who reported abuse.Claude: [calls ls_list_license_keys to find the ID, then ls_update_license_key with disabled: true] License key disabled. Their existing activations will fail validation on the next check.export LEMONSQUEEZY_API_KEY="your-api-key"docker build -t yawlabs/lemonsqueezy-mcp .docker run --rm -i -e LEMONSQUEEZY_API_KEY="your-api-key" yawlabs/lemonsqueezy-mcp{ "mcpServers": { "lemonsqueezy": { "command": "npx", "args": ["-y", "@yawlabs/lemonsqueezy-mcp@latest"], "env": { "LEMONSQUEEZY_API_KEY": "your-api-key" } } }}{ "mcpServers": { "lemonsqueezy": { "command": "npx", "args": ["-y", "@yawlabs/lemonsqueezy-mcp@latest"], "env": { "LEMONSQUEEZY_API_KEY": "your-api-key" } } }}yaw-mcp set lemonsqueezy env.LEMONSQUEEZY_API_KEY --secretnpm installnpm run lintnpm test # full unit + handler suite (builds first)npm run test:integration # live suite; exits 1 unless LEMONSQUEEZY_TEST_API_KEY + LEMONSQUEEZY_TEST_STORE_ID are setnpm run gen:containerfile # regenerate Containerfilenpm run check:containerfile # release.sh step 1 runs this too; non-zero exit means the two have drifted{ "mcpServers": { "lemonsqueezy": { "command": "oam", "args": ["run", "/path/to/lemonsqueezy-mcp/dist/index.js"], "env": { "LEMONSQUEEZY_API_KEY": "..." } } }}./release.sh X.Y.Z@yawlabs:registry=https://registry.npmjs.org///registry.npmjs.org/:_authToken=npm_YOURTOKEN