Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SmartKasa MCP Servershow me today's sales report for the Kyiv store"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SmartKasa MCP Server
Production-ready Model Context Protocol (MCP) server for SmartKasa POS API
Overview
SmartKasa MCP Server enables AI assistants (Claude, GPT, etc.) to interact with SmartKasa - Ukrainian POS system with fiscal compliance. Through natural language, you can manage:
🏪 Shops - Create, update, manage retail locations
📦 Products - Full inventory management with categories
🧾 Receipts - Sales transactions and fiscal operations
👥 Employees - Staff management with roles
📊 Reports - Z-reports and sales statistics
💳 Terminals - POS terminal configuration
Features
✅ 58 API tools covering all SmartKasa endpoints
✅ HTTP/2 with connection pooling for high performance
✅ Automatic token refresh with exponential backoff
✅ Rate limiting protection with smart retries
✅ Secure credential handling - memory-only storage
✅ Multi-user support via process isolation
✅ Structured logging for debugging
✅ Two transport modes: stdio (local) and SSE (remote server)
✅ Docker support for easy deployment
How MCP Works
⚠️ Important: You do NOT need to manually run this server!
MCP uses stdio transport by default - your LLM client (Claude Desktop, Cursor, etc.) automatically starts the server as a child process and communicates via stdin/stdout.
You only configure the path - the client handles everything else.
Quick Start
1. Installation
2. Get SmartKasa Credentials
You need three things from SmartKasa:
API Key - Get from SmartKasa dashboard or support
Phone Number - Your registered phone (e.g.,
380501234567)Password - Your account password
3. Configure Your LLM Client
See Client Configuration section below for your specific client.
Client Configuration
Claude Desktop (macOS)
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
Claude Desktop (Windows)
Edit %APPDATA%\Claude\claude_desktop_config.json:
Claude Desktop (Linux)
Edit ~/.config/Claude/claude_desktop_config.json:
VS Code with Continue Extension
Add to ~/.continue/config.json:
Cursor IDE
Add to Cursor settings (Cmd/Ctrl + , → search "MCP"):
Cline (VS Code Extension)
Configure in Cline settings panel:
Server Name:
smartkasaCommand:
/path/to/venv/bin/pythonArguments:
/path/to/smartkasa-mcp-server/smartkasa-mcp-server.py
Usage Guide
First Time Setup
If you didn't configure environment variables, set credentials via chat:
Example Conversations
List all products:
Create a new product:
Get sales report:
Check inventory:
Manage employees:
Available Tools (58 total)
Authentication (4 tools)
Tool | Description |
| Set API key, phone, password |
| Authenticate and get token |
| Check auth status and expiry |
| Logout and clear session |
Terminals (4 tools)
Tool | Description |
| List all POS terminals |
| Get terminal by ID |
| Update terminal config |
| Delete terminal |
Shops (6 tools)
Tool | Description |
| List all shops |
| Get shop by ID |
| Create new shop |
| Update shop |
| Delete shop |
| List shop employees |
Employees (5 tools)
Tool | Description |
| List all employees |
| Get employee by ID |
| Create employee |
| Update employee |
| Delete employee |
Categories (6 tools)
Tool | Description |
| List categories |
| Create category |
| Update category |
| Delete category |
| Batch create |
| Batch delete |
Products (8 tools)
Tool | Description |
| Search/list products |
| Get product by UUID |
| Create product |
| Update product |
| Delete product |
| Batch create |
| Batch delete |
Inventory Cards (5 tools)
Tool | Description |
| List inventory cards |
| Get card by ID |
| Create card |
| Update stock |
| Delete card |
Receipts (7 tools)
Tool | Description |
| List receipts |
| Get receipt by UUID |
| Create receipt |
| Update receipt |
| Delete receipt |
| Batch create |
| Batch delete |
Reports (2 tools)
Tool | Description |
| Get Z-reports |
| Sales statistics |
Other Tools
smartkasa_unit_types_list- Unit typessmartkasa_subgroups_*- Product subgroups (4 tools)smartkasa_import_*- Product import (3 tools)smartkasa_shifts_*- Fiscal shifts (2 tools)smartkasa_transactions_get- Payment transactions
Security
Credential Storage
🔐 Credentials are stored in memory only and are never written to disk by the server.
The security model:
Each MCP client spawns a separate process for this server
Process memory is isolated - credentials cannot leak between users
When the process ends, all credentials are cleared
Tokens auto-expire (typically 12 hours for access, 30 days for refresh)
Environment Variables
Variable | Description |
| Your SmartKasa API key |
| Phone number (e.g., 380501234567) |
| Account password |
| Logging level (DEBUG/INFO/WARNING/ERROR) |
| API URL (default: https://core.smartkasa.ua) |
Multi-User Architecture
How It Works
Key points:
Each user's LLM client spawns its own MCP server process
Credentials are isolated in process memory
No session conflicts between users
Process termination = automatic cleanup
Session Persistence
⚠️ Sessions do NOT persist across:
Application restarts
System reboots
Process crashes
To maintain access:
Configure credentials in environment variables
Server auto-authenticates on startup if env vars are set
Or re-set credentials via
smartkasa_set_credentialstool
Troubleshooting
Common Issues
"Import mcp could not be resolved"
"Authentication failed: 401"
Verify API key is correct
Check phone number format (no + prefix, just 380...)
Verify password
"Connection timeout"
Check internet connection
Verify https://core.smartkasa.ua is accessible
Try increasing
SMARTKASA_REQUEST_TIMEOUT
"Rate limited"
Server automatically handles this with retry
Reduce request frequency if persistent
Debug Mode
Enable verbose logging:
Or in config:
Development
Running Tests
Local Development
Remote Deployment (Server Mode)
For hosting on a server, use SSE (Server-Sent Events) transport instead of stdio.
Deployment Options
Platform | Suitability | Notes |
Docker + VPS | ✅ Best | Full control, persistent connections |
Coolify | ✅ Excellent | Easy Docker deployment |
Railway | ✅ Good | Supports long-running processes |
Fly.io | ✅ Good | Global edge deployment |
Render | ✅ Good | Free tier available |
AWS ECS/Fargate | ✅ Good | Enterprise-grade |
Vercel | ❌ No | Serverless, no persistent connections |
Cloudflare Workers | ❌ No | No long-running processes |
AWS Lambda | ❌ No | Timeout limits, no SSE |
Option 1: Docker (Recommended)
Option 2: Docker Compose
Create .env file:
Run:
Option 3: Coolify
Create new service in Coolify
Select "Docker Compose" or "Dockerfile"
Point to your repository
Add environment variables in Coolify UI
Deploy
Option 4: Direct Python (with systemd)
Create /etc/systemd/system/smartkasa-mcp.service:
Enable and start:
Option 5: Process Manager (PM2)
HTTPS with Reverse Proxy
For production, put behind nginx/Caddy with HTTPS:
Caddy (automatic HTTPS):
Nginx:
Connecting to Remote MCP Server
Claude Desktop (Remote SSE)
Edit config to use SSE transport:
VS Code with Continue (Remote)
Health Check Endpoint
Your remote server exposes /health endpoint:
License
MIT License - see LICENSE file.
SmartKasa MCP Server (Українська)
Production-ready MCP сервер для SmartKasa POS API
Огляд
SmartKasa MCP Server дозволяє AI-асистентам (Claude, GPT тощо) працювати з SmartKasa - українською касовою системою з фіскалізацією. Через звичайну мову ви можете керувати:
🏪 Магазинами - створення, оновлення, керування точками продажу
📦 Товарами - повне управління складом з категоріями
🧾 Чеками - продажі та фіскальні операції
👥 Працівниками - управління персоналом з ролями
📊 Звітами - Z-звіти та статистика продажів
💳 Терміналами - конфігурація POS терміналів
Швидкий старт
1. Встановлення
2. Отримайте дані для SmartKasa
Вам потрібні:
API Key - отримайте в особистому кабінеті SmartKasa або через підтримку
Номер телефону - ваш зареєстрований номер (наприклад,
380501234567)Пароль - пароль вашого облікового запису
3. Налаштуйте ваш LLM клієнт
Claude Desktop (macOS)
Редагуйте ~/Library/Application Support/Claude/claude_desktop_config.json:
Claude Desktop (Windows)
Редагуйте %APPDATA%\Claude\claude_desktop_config.json:
Приклади використання
Перша авторизація (якщо не налаштовані env vars):
Показати всі товари:
Створити новий товар:
Звіт по продажах:
Перевірити залишки:
Безпека
Зберігання даних
🔐 Дані зберігаються тільки в пам'яті і ніколи не записуються на диск сервером.
Модель безпеки:
Кожен LLM клієнт запускає окремий процес сервера
Пам'ять процесів ізольована - дані не можуть витікати між користувачами
Коли процес завершується, всі дані очищаються
Токени автоматично закінчуються (зазвичай 12 годин для access, 30 днів для refresh)
Мультикористувацька архітектура
Як це працює
Кожен LLM клієнт користувача запускає власний процес MCP сервера
Дані авторизації ізольовані в пам'яті процесу
Немає конфліктів сесій між користувачами
Завершення процесу = автоматичне очищення
Збереження сесій
⚠️ Сесії НЕ зберігаються після:
Перезапуску додатка
Перезавантаження системи
Аварійного завершення процесу
Для збереження доступу:
Налаштуйте дані у змінних оточення
Сервер автоматично авторизується при запуску
Або повторно задайте дані через
smartkasa_set_credentials
Усунення проблем
"Authentication failed: 401"
Перевірте правильність API ключа
Перевірте формат номера (без +, просто 380...)
Перевірте пароль
"Connection timeout"
Перевірте з'єднання з інтернетом
Перевірте доступність https://core.smartkasa.ua
Режим налагодження
Віддалений розгортання (Серверний режим)
Для хостингу на сервері використовуйте SSE (Server-Sent Events) transport.
Як це працює
При локальному використанні (stdio) - LLM клієнт сам запускає сервер.
При віддаленому (SSE) - сервер працює постійно, клієнти підключаються по HTTP.
Варіанти розгортання
Платформа | Придатність | Примітки |
Docker + VPS | ✅ Найкраще | Повний контроль |
Coolify | ✅ Відмінно | Легке Docker розгортання |
Railway | ✅ Добре | Підтримує long-running |
Fly.io | ✅ Добре | Global edge |
Vercel | ❌ Ні | Serverless, немає SSE |
Lambda | ❌ Ні | Timeout, немає SSE |
Docker
Docker Compose
Systemd (Linux сервер)
Створіть /etc/systemd/system/smartkasa-mcp.service:
Підключення до віддаленого сервера
У конфігу Claude Desktop:
Скріншоти
Робота зі SmartKasa API через Claude Desktop з локально запущеним MCP








Ліцензія
MIT License - дивіться файл LICENSE.
Зроблено з ❤️ для української спільноти розробників