mcp-lemonsqueezy
Lemon Squeezy Server
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
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_resource` endpoint
- 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 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
๐ฆ Order & Customer Tools
- `list_orders`: List all orders
- `get_order`: Get details of an order
- `list_customers`: List all customers
- `get_customer`: Fetch customer details
๐ณ Subscription & License Tools
- `list_subscriptions`: List subscriptions
- `get_subscription`: Get a subscription
- `list_license_keys`: List license keys
- `get_license_key`: Fetch license key info
๐ Checkout & Webhook Tools
- `create_checkout`: Create a fully customized checkout session
- `create_webhook`: Register a new webhook
- `list_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 claudeInstall 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_keyClaude Desktop
Add the server configuration to your Claude Desktop config:
Windows: C:\Users\\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": ""
}
}
}
}Usage
Start the server
uv run src/mcp_lemonsqueezy/server.pyExample 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.pyBuilding
1. Update dependencies:
uv compile pyproject.toml2. Build package:
uv buildContributing
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.
Frequently asked questions
What is mcp-lemonsqueezy?
mcp-lemonsqueezy is Lemon Squeezy Server
How do I install mcp-lemonsqueezy?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-lemonsqueezy open source?
Yes โ it is hosted on GitHub at https://github.com/atharvagupta2003/mcp-lemonsqueezy and has 10 stars.
Related MCP tools
Cognee is the open-source AI memory platform for agents. Give your AI agents persistent long-term memory across sessions with a self-hosted knowledge graph engine.
Automate browser based workflows with AI
Hindsight: Agent Memory That Learns
A privacy-first app that strips AI watermarks from content you own.
Agent framework and applications built upon Qwen>=3.0, featuring Function Calling, MCP, Code Interpreter, RAG, Chrome extension, etc.
The power of Claude Code / GeminiCLI / CodexCLI + [Gemini / OpenAI / OpenRouter / Azure / Grok / Ollama / Custom Model / All Of The Above] working as one.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP