- Multi-file architecture with API client, comprehensive types, 13 tool domains - 87 total tools covering customers, jobs, invoices, estimates, equipment, technicians, scheduling, inventory, payments, reporting, locations, service agreements, tasks - 16 dark-themed React MCP apps (Dashboard, Customers, Jobs, Scheduling, Invoices, Estimates, Technicians, Equipment, Inventory, Payments, Service Agreements, Reports, Tasks, Calendar, Map View, Price Book) - Full TypeScript support with zero compilation errors - Comprehensive README with API coverage details - Bearer token authentication with rate limiting and error handling
Lightspeed MCP Server
A comprehensive Model Context Protocol (MCP) server for Lightspeed POS and eCommerce platform integration. This server provides extensive tools for managing retail and restaurant operations including products, inventory, customers, sales, orders, employees, and more.
Overview
Lightspeed is a cloud-based POS and eCommerce platform used by retailers and restaurants worldwide. This MCP server provides AI assistants with direct access to Lightspeed's API, enabling automated store management, inventory control, sales analysis, and customer relationship management.
Features
🛍️ Product Management
- 60+ MCP Tools covering all aspects of retail/restaurant operations
- Full CRUD operations for products, inventory, customers, sales, and orders
- Advanced search and filtering capabilities
- Bulk operations support
📊 Analytics & Reporting
- Real-time sales dashboards
- Inventory valuation and stock reports
- Customer analytics and segmentation
- Employee performance tracking
- Top products and revenue analysis
💼 Business Operations
- Purchase order management
- Supplier relationship management
- Discount and promotion tools
- Loyalty program integration
- Multi-location support
🎨 16 React Applications
Beautiful, dark-themed UI applications for:
- Product browsing and management
- Inventory dashboard and tracking
- Customer relationship management
- Sales analytics and reporting
- Purchase order processing
- Employee performance monitoring
- Category hierarchymanagement
- Discount creation and management
- Loyalty program dashboard
- Analytics suite with visualizations
- POS simulator for testing
- Quick sale interface
- Stock transfer between locations
- Price management tools
- Supplier portal
- Tax calculation utilities
Installation
npm install @mcpengine/lightspeed-mcp-server
Or install from source:
git clone https://github.com/mcpengine/mcpengine
cd mcpengine/servers/lightspeed
npm install
npm run build
Configuration
Environment Variables
Create a .env file or export these environment variables:
# Required
LIGHTSPEED_ACCOUNT_ID=123456 # Your Lightspeed account ID
LIGHTSPEED_API_KEY=your_api_key_here # Your Lightspeed API key
# Optional
LIGHTSPEED_API_SECRET=secret # API secret (if required)
LIGHTSPEED_BASE_URL=https://api.lightspeedapp.com/API/V3 # Custom API URL
LIGHTSPEED_TYPE=retail # "retail" or "restaurant"
Getting Lightspeed API Credentials
- Log into your Lightspeed account
- Navigate to Settings → API Management
- Create a new API key
- Copy your Account ID and API Key
- Set the appropriate permissions for your use case
Usage
As MCP Server
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"lightspeed": {
"command": "lightspeed-mcp",
"env": {
"LIGHTSPEED_ACCOUNT_ID": "123456",
"LIGHTSPEED_API_KEY": "your_api_key_here"
}
}
}
}
Standalone
# Set environment variables
export LIGHTSPEED_ACCOUNT_ID=123456
export LIGHTSPEED_API_KEY=your_api_key_here
# Run the server
lightspeed-mcp
Development Mode
npm run dev
Available Tools
Products (7 tools)
lightspeed_list_products- List all products with pagination and filteringlightspeed_get_product- Get single product detailslightspeed_create_product- Create new productlightspeed_update_product- Update existing productlightspeed_delete_product- Delete productlightspeed_archive_product- Archive product (soft delete)lightspeed_search_products_by_sku- Search by SKU
Inventory (6 tools)
lightspeed_get_product_inventory- Get inventory levels across locationslightspeed_update_inventory- Set inventory quantitylightspeed_adjust_inventory- Adjust inventory by relative amountlightspeed_set_reorder_point- Configure low stock alertslightspeed_check_low_stock- Find products below reorder pointlightspeed_inventory_transfer- Transfer stock between locations
Customers (7 tools)
lightspeed_list_customers- List all customerslightspeed_get_customer- Get customer detailslightspeed_create_customer- Add new customerlightspeed_update_customer- Update customer informationlightspeed_delete_customer- Remove customerlightspeed_search_customers- Search by name, email, phonelightspeed_get_customer_by_email- Find customer by email
Sales & Transactions (8 tools)
lightspeed_list_sales- List sales with date range filteringlightspeed_get_sale- Get sale details with line itemslightspeed_create_sale- Create new salelightspeed_update_sale- Update salelightspeed_void_sale- Void transactionlightspeed_get_sales_by_customer- Customer purchase historylightspeed_get_sales_by_employee- Employee sales performancelightspeed_calculate_daily_sales- Daily sales totals
Orders (7 tools)
lightspeed_list_orders- List purchase orderslightspeed_get_order- Get order detailslightspeed_create_order- Create purchase orderlightspeed_update_order- Update orderlightspeed_delete_order- Delete orderlightspeed_receive_order- Mark order as receivedlightspeed_cancel_order- Cancel purchase order
Employees (6 tools)
lightspeed_list_employees- List all employeeslightspeed_get_employee- Get employee detailslightspeed_create_employee- Add new employeelightspeed_update_employee- Update employeelightspeed_delete_employee- Remove employeelightspeed_search_employees- Search employees
Categories (6 tools)
lightspeed_list_categories- List all categorieslightspeed_get_category- Get category detailslightspeed_create_category- Create new categorylightspeed_update_category- Update categorylightspeed_delete_category- Delete categorylightspeed_get_category_tree- Get category hierarchy
Suppliers (6 tools)
lightspeed_list_suppliers- List all supplierslightspeed_get_supplier- Get supplier detailslightspeed_create_supplier- Add new supplierlightspeed_update_supplier- Update supplierlightspeed_delete_supplier- Remove supplierlightspeed_search_suppliers- Search suppliers
Discounts (6 tools)
lightspeed_list_discounts- List all discountslightspeed_get_discount- Get discount detailslightspeed_create_discount- Create percentage or fixed discountlightspeed_update_discount- Update discountlightspeed_delete_discount- Remove discountlightspeed_get_active_discounts- Get currently active discounts
Loyalty Programs (5 tools)
lightspeed_get_customer_loyalty- Get customer loyalty pointslightspeed_add_loyalty_points- Add points to customerlightspeed_redeem_loyalty_points- Redeem customer pointslightspeed_calculate_loyalty_points- Calculate points for purchaselightspeed_get_top_loyalty_customers- Find top loyalty members
Reporting & Analytics (5 tools)
lightspeed_sales_report- Comprehensive sales report with metricslightspeed_inventory_report- Inventory valuation and stock levelslightspeed_customer_report- Customer acquisition and retentionlightspeed_employee_performance- Employee sales performancelightspeed_top_selling_products- Best selling products analysis
Shops & Configuration (7 tools)
lightspeed_list_shops- List all shop locationslightspeed_get_shop- Get shop detailslightspeed_list_registers- List POS registerslightspeed_get_manufacturers- List manufacturerslightspeed_create_manufacturer- Add manufacturerlightspeed_get_tax_categories- List tax categorieslightspeed_get_payment_types- List payment types
Total: 66 MCP Tools
React Applications
All applications feature a modern dark theme (bg-gray-900) and responsive design:
- Product Browser - Search and browse product catalog
- Inventory Dashboard - Real-time stock levels and alerts
- Customer Manager - CRM and customer database
- Sales Dashboard - Sales metrics and analytics
- Order Manager - Purchase order tracking
- Employee Tracker - Employee management and performance
- Category Editor - Manage category hierarchy
- Discount Creator - Create and manage promotions
- Loyalty Dashboard - Loyalty program overview
- Analytics Suite - Advanced analytics and visualizations
- POS Simulator - Test POS transactions
- Quick Sale - Rapid sale entry interface
- Stock Transfer - Inter-location inventory transfers
- Price Manager - Bulk price management
- Supplier Portal - Supplier relationship management
- Tax Calculator - Tax calculation utilities
Access apps at: dist/ui/{app-name}/index.html after building.
API Coverage
This server supports both Lightspeed Retail (X-Series) and Restaurant (R-Series) platforms:
Retail X-Series
- Products (Items)
- Inventory (ItemShops)
- Customers
- Sales
- Purchase Orders
- Employees
- Categories
- Suppliers (Vendors)
- Discounts
- Shops & Registers
Restaurant R-Series
Compatible with most endpoints; specific R-Series features coming soon.
Development
Project Structure
lightspeed/
├── src/
│ ├── clients/
│ │ └── lightspeed.ts # API client
│ ├── types/
│ │ └── index.ts # TypeScript types
│ ├── tools/
│ │ ├── products.ts # Product tools
│ │ ├── inventory.ts # Inventory tools
│ │ ├── customers.ts # Customer tools
│ │ ├── sales.ts # Sales tools
│ │ ├── orders.ts # Order tools
│ │ ├── employees.ts # Employee tools
│ │ ├── categories.ts # Category tools
│ │ ├── suppliers.ts # Supplier tools
│ │ ├── discounts.ts # Discount tools
│ │ ├── loyalty.ts # Loyalty tools
│ │ ├── reporting.ts # Reporting tools
│ │ └── shops.ts # Shop tools
│ ├── ui/
│ │ └── react-app/ # 16 React applications
│ ├── server.ts # MCP server setup
│ └── main.ts # Entry point
├── dist/ # Compiled output
├── package.json
├── tsconfig.json
└── README.md
Building
npm run build
This compiles TypeScript and builds all React applications.
Testing
# Test with MCP Inspector
npx @modelcontextprotocol/inspector lightspeed-mcp
# Or use the MCP CLI
mcp dev lightspeed-mcp
Use Cases
Inventory Management
"Check which products are low on stock and create purchase orders for them"
Customer Analytics
"Show me the top 10 customers by total spend this month"
Sales Reporting
"Generate a sales report for last week broken down by employee"
Product Management
"Create a new product in the Electronics category with a 20% markup"
Multi-Location Operations
"Transfer 50 units of SKU-12345 from Store A to Store B"
Promotion Management
"Create a 15% discount for orders over $100 valid for the next 7 days"
Error Handling
All tools return a consistent response format:
{
success: true,
data: { /* result */ }
}
// or
{
success: false,
error: "Error message",
details: { /* additional info */ }
}
Rate Limiting
Lightspeed API has rate limits. This server respects those limits:
- Default: 5 requests/second
- Burst: 10 requests/second
- Daily: 10,000 requests
Security
- Never commit API keys to version control
- Use environment variables for credentials
- Restrict API permissions to minimum required
- Enable IP whitelisting in Lightspeed if possible
- Rotate API keys regularly
Troubleshooting
"Missing required environment variables"
Ensure LIGHTSPEED_ACCOUNT_ID and LIGHTSPEED_API_KEY are set.
"API request failed"
- Verify API credentials are correct
- Check account ID matches your Lightspeed account
- Ensure API key has necessary permissions
- Check API rate limits
"Tool not found"
Update to the latest version and rebuild:
npm update @mcpengine/lightspeed-mcp-server
npm run build
Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
License
MIT License - see LICENSE file for details
Support
- Issues: https://github.com/mcpengine/mcpengine/issues
- Docs: https://mcpengine.dev/servers/lightspeed
- Discord: https://discord.gg/mcpengine
Changelog
v1.0.0 (2024)
- Initial release
- 66 MCP tools covering all major Lightspeed entities
- 16 React applications with dark theme
- Full TypeScript support
- Comprehensive error handling
- Multi-location support
- Retail and Restaurant platform compatibility
Related Projects
- MCP Engine - MCP server factory
- Lightspeed API Docs - Official API documentation
- Model Context Protocol - MCP specification
Built with ❤️ by MCPEngine
For more MCP servers, visit mcpengine.dev