@khmuhtadin/pi-lemonsqueezy-mcp

Pi extension that bridges pi to the LemonSqueezy MCP server for store management.

Packages

Package details

extension

Install @khmuhtadin/pi-lemonsqueezy-mcp from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@khmuhtadin/pi-lemonsqueezy-mcp
Package
@khmuhtadin/pi-lemonsqueezy-mcp
Version
0.1.0
Published
Jun 28, 2026
Downloads
98/mo · 7/wk
Author
khmuhtadin
License
MIT
Types
extension
Size
17.6 KB
Dependencies
1 dependency · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi LemonSqueezy MCP Extension

A pi package that bridges pi to the LemonSqueezy MCP server by YawLabs.

It spawns the @yawlabs/lemonsqueezy-mcp server via stdio and exposes a generic bridge for calling all 64 LemonSqueezy API tools — products, orders, subscriptions, customers, discounts, license keys, checkouts, webhooks, and more.

Installation

From npm:

pi install npm:@khmuhtadin/pi-lemonsqueezy-mcp

From git:

pi install git:github.com/khmuhtadin/pi-lemonsqueezy-mcp

For local development:

pi install /absolute/path/to/pi-lemonsqueezy-mcp

Setup

Set your LemonSqueezy API key before starting pi:

export LEMONSQUEEZY_API_KEY="your-api-key"

Get your API key from LemonSqueezy Settings → API.

Registered tools

  • lemonsqueezy_mcp_list_tools — list all 64 tools exposed by the LemonSqueezy MCP server.
  • lemonsqueezy_mcp_call_tool — call any LemonSqueezy MCP tool by name with JSON arguments.

Example prompt:

How many active subscriptions do I have?

The LLM will first call lemonsqueezy_mcp_list_tools, discover ls_list_subscriptions, then call lemonsqueezy_mcp_call_tool with the right parameters.

Slash commands

  • /lemonsqueezy-mcp-status — check connection and tool count.
  • /lemonsqueezy-mcp-register [tool1,tool2|*] — register selected MCP tools as native pi tools with ls_ prefix.

Environment variables

Variable Purpose Default
LEMONSQUEEZY_API_KEY LemonSqueezy API token (required)
LEMONSQUEEZY_MCP_BIN Command to run npx
LEMONSQUEEZY_MCP_ARGS Space-separated arguments -y @yawlabs/lemonsqueezy-mcp@latest
LEMONSQUEEZY_MCP_TIMEOUT_MS Request timeout 30000

All LEMONSQUEEZY_* env vars (except the three above) are forwarded to the child MCP server, so guardrails like LEMONSQUEEZY_ALLOWED_STORE_IDS, LEMONSQUEEZY_MAX_REFUND_AMOUNT_CENTS, and LEMONSQUEEZY_DISABLE_CLASSES work automatically.

See the upstream README for the full guardrail configuration reference.

Tools available (64)

Users & Stores: ls_get_user, ls_get_store, ls_list_stores

Customers: ls_get_customer, ls_list_customers, ls_create_customer, ls_update_customer, ls_archive_customer

Products & Variants: ls_get_product, ls_list_products, ls_get_variant, ls_list_variants

Prices & Files: ls_get_price, ls_list_prices, ls_get_file, ls_list_files

Orders: ls_get_order, ls_list_orders, ls_generate_order_invoice, ls_refund_order

Order Items: ls_get_order_item, ls_list_order_items

Subscriptions: ls_get_subscription, ls_list_subscriptions, ls_update_subscription, ls_cancel_subscription

Subscription Invoices: ls_get_subscription_invoice, ls_list_subscription_invoices, ls_generate_subscription_invoice, ls_refund_subscription_invoice

Subscription Items: ls_get_subscription_item, ls_list_subscription_items, ls_update_subscription_item, ls_get_subscription_item_usage

Usage Records: ls_get_usage_record, ls_list_usage_records, ls_create_usage_record

Discounts: ls_get_discount, ls_list_discounts, ls_create_discount, ls_delete_discount

Discount Redemptions: ls_get_discount_redemption, ls_list_discount_redemptions

License Keys: ls_get_license_key, ls_list_license_keys, ls_update_license_key

License Key Instances: ls_get_license_key_instance, ls_list_license_key_instances

Checkouts: ls_get_checkout, ls_list_checkouts, ls_create_checkout

Webhooks: ls_get_webhook, ls_list_webhooks, ls_create_webhook, ls_update_webhook, ls_delete_webhook

License API: ls_activate_license, ls_validate_license, ls_deactivate_license

Affiliates: ls_get_affiliate, ls_list_affiliates

Webhook Sink: ls_sink_events_list, ls_sink_event_mark_processed, ls_sink_stats

Guardrails

The upstream server supports opt-in guardrails via env vars:

export LEMONSQUEEZY_ALLOWED_STORE_IDS="store_abc,store_xyz"  # restrict store access
export LEMONSQUEEZY_MAX_REFUND_AMOUNT_CENTS="10000"           # cap refunds at $100
export LEMONSQUEEZY_DISABLE_CLASSES="money,recurring"         # block dangerous operations

These are forwarded automatically by this extension. See the upstream docs for authority classes.

License

MIT