home / mcp / smartkasa mcp server
Provides an MCP server to connect AI assistants with SmartKasa POS, enabling product, shop, receipt, and report management via natural language.
Configuration
View docs{
"mcpServers": {
"1212bogdan-smartkasa-mcp-server": {
"url": "https://mcp.yourdomain.com/sse",
"headers": {
"SMARTKASA_PHONE": "380501234567",
"SMARTKASA_API_KEY": "sk_live_xxxxx",
"SMARTKASA_BASE_URL": "https://core.smartkasa.ua",
"SMARTKASA_PASSWORD": "my_password",
"SMARTKASA_LOG_LEVEL": "DEBUG"
}
}
}
}You can connect AI copilots to SmartKasa using a dedicated MCP server that exposes SmartKasa endpoints to natural language interactions. This server handles authentication, routing, and high‑level actions such as managing shops, products, receipts, employees, reports, and terminals, while keeping credentials secure and isolated per client.
You use an MCP client (Claude Desktop, VS Code, Cursor, or other compatible tools) to communicate with the SmartKasa MCP Server. The client can start a local stdio MCP server as a child process or connect to a remote SSE server. You will authenticate once for your session and then issue natural language commands to perform tasks like listing products, creating shops, generating receipts, or viewing reports. Each user’s credentials are kept in a separate process to prevent cross‑session access, and tokens expire automatically for security.
# 1. Clone the repository
git clone https://github.com/1212bogdan/smartkasa-mcp-server.git
cd smartkasa-mcp-server
# 2. Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txtPrepare credentials in environment variables or through the client after startup. You will need an API key, your SmartKasa phone number, and your password to authenticate with SmartKasa.
Configuration, security, and usage notes are provided below to help you run, secure, and connect to the MCP server in local or remote environments.
Credentials and transport options are shown in explicit configuration examples. You can run the server locally with stdio or deploy it for remote access via SSE. Ensure you provide the required environment variables when starting the server.
Security is built around in-memory credential storage, per‑process isolation, and auto‑expiring tokens. Sessions do not persist across restarts, so re‑establish credentials if needed.
If you run into issues, enable debug logging to get more detail for troubleshooting.
Remote deployment and health checks are supported via an SSE endpoint and a health route to confirm status.
Set API key, phone, and password for the MCP session
Authenticate and obtain an access token for SmartKasa APIs
Check current authentication status and token expiry
Logout and clear the current session
List all POS terminals
Get a terminal by ID
Update terminal configuration
Delete a terminal
List all shops
Get a shop by ID
Create a new shop
Update a shop
Delete a shop
List employees associated with a shop
List all employees
Get employee by ID
Create employee
Update employee
Delete employee
List categories
Create category
Update category
Delete category
Batch create categories
Batch delete categories
Search/list products
Get product by UUID
Create product
Update product
Delete product
Batch create products
Batch delete products
List inventory cards
Get card by ID
Create inventory card
Update stock for a card
Delete card
List receipts
Get receipt by UUID
Create receipt
Update receipt
Delete receipt
Batch create receipts
Batch delete receipts
Get Z-reports
Sales statistics
List unit types
Product subgroup operations (4 tools)
Product import operations (3 tools)
Fiscal shifts operations (2 tools)
Payment transactions