
mcp lemonsqueezy
一个支持订阅、订单管理等功能的 Lemon Squeezy 服务端实现。
Repository Info
About This Server
一个支持订阅、订单管理等功能的 Lemon Squeezy 服务端实现。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Lemon Squeezy Server
A Model Context Protocol (MCP) server implementation that integrates with Lemon Squeezy for handling subscriptions, checkouts, products, and more. This server provides a structured interface to programmatically manage your Lemon Squeezy store with audit logging and tool-based control.
Demo
!lemonsqueezy_demo
Requirements
- Python 3.8+
- MCP SDK 0.1.0+
- aiohttp
- python-dotenv
Components
Resources
The server provides an MCP-compatible resource for operation auditing:
- Stores logs of all tool-based Lemon Squeezy operations
- Exposes audit log via
read_resourceendpoint - Helpful for debugging and audit traceability
Tools
Implements a full set of Lemon Squeezy operations via MCP tools:
🔍 Store & Product Tools
get_user: Get current Lemon Squeezy user infolist_stores: List all storesget_store: Fetch a specific storelist_products: List productsget_product: Get product detailsget_product_variants: List variants for a product
📦 Order & Customer Tools
list_orders: List all ordersget_order: Get details of an orderlist_customers: List all customersget_customer: Fetch customer details
💳 Subscription & License Tools
list_subscriptions: List subscriptionsget_subscription: Get a subscriptionlist_license_keys: List license keysget_license_key: Fetch license key info
🛒 Checkout & Webhook Tools
create_checkout: Create a fully customized checkout sessioncreate_webhook: Register a new webhooklist_webhooks: List all webhooks (filterable by store)
Features
- Subscription & Checkout Management
- Webhook Creation & Listing
- Audit Logging of All Actions
- MCP-Compatible Tool & Resource Integration
- Error Feedback and Logging
Installation
Installing via Smithery
To install LemonSqueezy Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @atharvagupta2003/mcp-lemonsqueezy --client claude
Install dependencies
python -m venv venv
source venv/bin/activate # On macOS/Linux
venv\Scripts\activate # On Windows
pip install -e .
Configuration
Set up the environment variables in a .env file:
LEMON_SQUEEZY_API_KEY=your_lemonsqueezy_api_key
Claude Desktop
Add the server configuration to your Claude Desktop config:
Windows: C:\Users<username>\AppData\Roaming\Claude\claude_desktop_config.json
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"lemonsqueezy": {
"command": "/Users/hp/.local/bin/uv",
"description": "Operations with lemonsqueezy payment platform",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/src/mcp_lemonsqueezy",
"run",
"--with",
"fastmcp",
"server.py"
],
"env": {
"LEMONSQUEEZY_API_KEY": "<YOUR-API-KEY>"
}
}
}
}
Usage
Start the server
uv run src/mcp_lemonsqueezy/server.py
Example MCP Commands
Get Current User
{
"tool": "get_user",
"arguments": {}
}
List All Stores
{
"tool": "list_stores",
"arguments": {}
}
Get a Store by ID
{
"tool": "get_store",
"arguments": {
"store_id": "164870"
}
}
Error Handling
The server provides clear error messages for common scenarios:
- 401 Unauthorized: Missing or invalid API key
- 422 Unprocessable Entity: Invalid fields like missing variant/store ID
- 400 Bad Request: Invalid JSON API structure
Development
Testing
Run the MCP Inspector for interactive testing:
npx @modelcontextprotocol/inspector uv run --with fastmcp /ABSOLUTE/PATH/TO/PARENT/FOLDER/src/mcp_lemonsqueezy/server.py
Building
- Update dependencies:
uv compile pyproject.toml
- Build package:
uv build
Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Quick Start
Clone the repository
git clone https://github.com/atharvagupta2003/mcp-lemonsqueezyInstall dependencies
cd mcp-lemonsqueezy
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.