caisse-enregistreuse-mcp-server
[](https://smithery.ai/servers/paracetamol951/kash)
# ๐งพ Kash MCP Server
[](LICENSE)
[](https://mcp.kash.click)
[](https://github.com/paracetamol951/caisse-enregistreuse-mcp-server/stargazers)
[](https://www.npmjs.com/package/caisse-enregistreuse-mcp-server)
[](https://www.youtube.com/watch?v=PpkrUfEy4ns)
**Kash MCP Server** is the official [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for **[Kash](https://kash.click)** โ a free, cloud-based POS, invoicing, CRM and webshop platform trusted by thousands of merchants since 2011.
Connect your Kash account to **Claude, ChatGPT, n8n**, or any MCP-compatible AI โ and manage your entire business through natural conversation.
> ๐ข Hosted server: [https://mcp.kash.click](https://mcp.kash.click)
> ๐ Full documentation: [kash.click/cash-register-software](https://kash.click/cash-register-software/)
---
## โจ What you can do
Just talk. No menus, no clicks.
```
"Record a sale of 2 coffees and 1 croissant at table 84"
"Show me this week's revenue report"
"Add a new item called Summer Tart at โฌ4.50 in the Pastries department"
"Who are my best customers this month?"
"Create a Kash account for my restaurant"
"Record the card payment for order #1042"
"Add a Large size option to the Size variation"
```
---
## ๐ Features
The tool list below describes the local STDIO server. The hosted HTTP connector uses the Kash website for sign-in and permission consent. The async operations guide below lists the new tools available through both transports.
### ๐ Account & Authentication โ no config required
- **Create** a new Kash account directly from the conversation
- **List** accounts linked to an email to check if one already exists
- **Login via OTP** โ a one-time password is sent to your email, no password needed
- **Logout** to clear the session at any time
### ๐งพ Sales & Orders
- **Record sales** with catalog items, department lines, or free lines
- **Edit orders** โ add items, assign a client, record payments, validate as invoice
- **List orders** by date range, validated or unvalidated, filtered by delivery method
- **Get order details** โ full breakdown of items, client, payments and totals
#### Recording sales and payments safely
`order_create` and `order_edit` require a client-generated `idempotencyKey` in both STDIO and OAuth. This is a change to the STDIO contract. Use a UUID or a 16โ128 character key made of letters, digits, `.`, `_`, `~` or `-`. Save the key and arguments before calling the tool. After a timeout, retry with the same key and arguments in the same shop and transport. For OAuth, use the same OAuth client and Kash profile. Use a distinct key for each operation, including each separate payment on an existing order.
`order_create` saves an unpaid quote when `payment` is omitted or `0`. For `order_edit`, use `-2` for a pending quote, `-1` to validate an unpaid invoice, or `0` to edit without collecting. A positive ID from `data_list_payments_modes` records a payment. Set `paymentAmount` to the amount actually collected for a partial payment, such as `"12.50"`. Omission with a positive mode uses the worker's default amount. An explicit zero with a positive mode is rejected by both tools.
The tools return `orderID` when Kash provides it and `replayed: true` when the PHP journal returns a saved result. Failures set `isError` and provide a structured `code` for the recovery cases below.
| Code | Recovery |
| --- | --- |
| `idempotency_conflict` | The key is tied to different parameters. Check the original operation before proceeding. |
| `idempotency_unresolved` | The original operation may still be running or need review. Check the order and its payments. Any retry must use the same key and arguments. |
| `idempotency_unavailable` | Kash reports that this attempt never started. Retry with the same key and arguments. |
| `validation_failed` | Check the sale arguments and selected resources. If an earlier attempt timed out, review its status before changing the submission. |
| `network_outcome_unknown` or `unexpected_response` | The sale outcome is uncertain. Retry only with the same key and arguments, and verify the order and its payments before a new operation. |
### ๐ Reports
- **Sales report** โ HTML summary for any period: a specific day, month, or full year (defaults to yesterday)
### ๐ฆ Catalog Management
- **Items (PLU)**: add, edit, delete โ with price, department, VAT, barcode, stock, variations...
- **Departments**: add, edit, delete โ with VAT, price, group, variations...
- **Department groups**: add, edit, delete โ to organize your catalog
- **VAT rates**: add, edit, delete
- **Variations**: add, edit, delete (e.g. "Size", "Color")
- **Variation choices**: add, edit, delete (e.g. "S", "M", "L" for "Size") with optional price delta
### ๐ฅ Customer Management (CRM)
- **Add, edit, delete** customers with full contact info, company details, VAT number, barcode, loyalty data, private notes, blacklist status...
### ๐ Data & Lists
Retrieve any reference data from your shop:
| Tool | Data |
|---|---|
| `data.list.products` | Items / articles |
| `data.list.departments` | Departments / categories |
| `data_list_department_groups` | Department groups |
| `data_list_vats` | VAT rates |
| `data_list_clients` | Customers |
| `data_list_variations` | Variation types |
| `data_list_payments` | Payment methods |
| `data_list_cashboxes` | Cashboxes |
| `data_list_delivery_men` | Delivery methods |
| `data_list_delivery_zones` | Delivery zones |
| `data_list_relay_points` | Relay / pickup points |
| `data_list_discounts` | Discounts & supplements |
| `data.list.users` | Staff / users |
| `data_list_tables` | Tables (restaurant mode) |
| `data.list.orders` | Orders by date range |
---
## ๐ Available Tools (46)
| Category | Tools |
|---|---|
| **Account** | `account.list`, `account.create` |
| **Auth** | `auth.request.otp`, `auth.login.with_otp`, `auth.logout` |
| **Sales** | `order_create`, `order_edit`, `order_detail`, `data_list_orders`, `data_list_pending_orders` |
| **Reports** | `report.get` |
| **Items** | `plu_add`, `plu_edit`, `plu_delete`, `data.list.products` |
| **Departments** | `dept_add`, `dept_edit`, `dept_delete`, `data.list.departments` |
| **Dept groups** | `dept_group_add`, `dept_group_edit`, `dept_group_delete`, `data_list_department_groups` |
| **VAT** | `vat_add`, `vat_edit`, `vat_delete`, `data_list_vats` |
| **Variations** | `variation_add`, `variation_edit`, `variation_delete`, `data_list_variations` |
| **Variation choices** | `variation_choice_add`, `variation_choice_edit`, `variation_choice_delete` |
| **Customers** | `client_add`, `client_edit`, `client_delete`, `data_list_clients` |
| **Data** | `data_list_payments`, `data_list_cashboxes`, `data_list_delivery_men`, `data_list_delivery_zones`, `data_list_relay_points`, `data_list_discounts`, `data.list.users`, `data_list_tables` |
| **Utility** | `ping` |
---
## โ๏ธ Prerequisites
You need a [Kash / free-cash-register.net](https://kash.click) account.
**Don't have one?** You can create it directly from the conversation using `account.create`, or register at [kash.click/free-pos-software](https://kash.click/free-pos-software/).
**Already have one?** Retrieve your `APIKEY` and `SHOPID` in the software under **Setup โ Webservices** or connect using oAuth.
---
## ๐ Option 1 โ Hosted server (recommended)
The easiest way: connect directly to the hosted MCP server at `https://mcp.kash.click/mcp`.
The hosted connector uses OAuth authorization code with PKCE. Sign in on Kash, select an eligible shop and choose which requested permissions to grant. Read and write permissions are independent, and write permissions are unchecked by default.
Mailbox permissions are separate. `mailbox.read` covers messages, folders and links to download attachments in a signed-in Kash session. `mailbox.write` covers folders and message states. `mailbox.send` lets the connector prepare a new email or reply. Review the recipient and text, then approve the send in your browser on Kash. To check the outcome, call the same tool again with the original arguments and request key.
### Claude.ai
In **Settings โ Integrations**, add a new connector:
| Field | Value |
|---|---|
| Name | `Kash` |
| MCP Server URL | `https://mcp.kash.click/mcp` |
| Authentication | `OAuth` |
### ChatGPT
In **Settings โ Connectors โ Create Connector**:
| Field | Value |
|---|---|
| Name | `Kash POS` |
| MCP Server URL | `https://mcp.kash.click/mcp` |
| Authentication | `OAuth` |
### Smithery
Available on [smithery.ai](https://smithery.ai/servers/paracetamol951/kash) โ search for **Kash**.
---
## ๐ป Option 2 โ Self-hosted (STDIO)
Run the server locally for Claude Desktop or any STDIO-based MCP client.
### Quick start via npx
```bash
npx caisse-enregistreuse-mcp-server --shopid=YOUR_SHOPID --apikey=YOUR_APIKEY
```
### Claude Desktop configuration
Edit `claude_desktop_config.json`:
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"kash": {
"command": "npx",
"args": [
"caisse-enregistreuse-mcp-server",
"--shopid=YOUR_SHOPID",
"--apikey=YOUR_APIKEY"
]
}
}
}
```
Or using environment variables:
```json
{
"mcpServers": {
"kash": {
"command": "node",
"args": ["PATH_TO_BUILD/build/stdio.js"],
"cwd": "PATH_TO_BUILD",
"env": {
"SHOPID": "YOUR_SHOPID",
"APIKEY": "YOUR_APIKEY"
}
}
}
}
```
### Install from source
```bash
# 1) Clone
git clone https://github.com/paracetamol951/caisse-enregistreuse-mcp-server.git
cd caisse-enregistreuse-mcp-server
# 2) Install dependencies
npm install
# 3) Create .env
echo "SHOPID=YOUR_SHOPID" > .env
echo "APIKEY=YOUR_APIKEY" >> .env
# 4) Build
npm run build
# 5) Run
node build/stdio.js
```
### Docker (HTTP mode)
Set `MCP_KASH_OAUTH_ISSUER`, `MCP_KASH_OAUTH_RESOURCE` and `MCP_KASH_OAUTH_SERVICE_TOKEN` in the server environment, then run `npm run start:http` after building. Enable OAuth on the PHP issuer, apply its permissions migration, and pre-register the OAuth client for the integration.
---
## ๐ Authentication flow
### Hosted server (OAuth)
Link the registered OAuth client with the exact callback URL and its client credentials. Kash handles sign-in, consent, token renewal and revocation.
The connector exposes tools for products, stock, categories, variants, VAT, customers, sales, orders, reports, and shop settings. OAuth offers separate read and write scopes for the catalog, customers, sales and settings, plus a read scope for reports. Existing catalog connections keep `catalog.read` and can grant additional permissions through a new consent flow. Review or revoke permissions in Kash under **Web Services โ Connected apps**.
### Legacy STDIO in-conversation authentication (OTP)
You can also authenticate directly within the conversation โ no password required:
```
1. auth_request_otp(email) โ keep the returned challengeId
2. auth_login_with_otp(email, otp, challengeId) โ initialise the session
3. auth_logout() โ clear the session when done
```
If you don't have an account yet:
```
1. account.list(email) โ check existing accounts
2. account.create(email, title) โ create + session auto-initialized โ
```
### STDIO / self-hosted
Pass credentials via CLI args or environment variables โ `SHOPID` and `APIKEY`.
Use a managed Kash API key as `APIKEY` for the Partner API v1 reads. The same MCP tools keep working with an existing legacy key. The hosted OAuth connector uses the shop and read permissions granted when connecting.
The MCP server uses `/api/partner/v1` for JSON directory lists, pending orders, shop settings, HTML sales reports, and OAuth catalog and mailbox reads. MCP list tools gather all pages to preserve their `data` response. OAuth mailbox attachments still open through the signed-in Kash browser session.
Explicit CSV and HTML list exports, the detailed local product export, legacy order queries and signed order PDF links, couriers, and mutations without an equivalent keep their existing routes. For self-hosted upgrades, update the Kash API before updating the MCP server.
See [cart quotes](doc/cart-quotes.md) for `calculate_cart` in OAuth and STDIO, including the separate managed key used by STDIO.
See [loyalty and gift cards](doc/loyalty-gift-cards.md) for loyalty rules, balances, cart estimates and recorded gift card movements in OAuth and STDIO.
See [promo codes and personal vouchers](doc/discount-vouchers.md) for checks, cart estimates, issuance permissions and retry rules in OAuth and STDIO.
See [sales summaries and invoice documents](doc/partner-reads.md) for `sales_summary` and `list_invoice_documents`, including the read permissions and STDIO setup.
See [asynchronous sales exports and catalog imports](doc/async-operations.md) for the five operation tools and their permissions in OAuth and STDIO.
---
## ๐ก API endpoints
| Endpoint | Description |
|---|---|
| `POST https://mcp.kash.click/mcp` | MCP JSON-RPC endpoint |
| `GET https://mcp.kash.click/.well-known/oauth-protected-resource/mcp` | MCP protected resource metadata |
| `GET https://kash.click/.well-known/oauth-authorization-server` | Kash OAuth discovery |
---
## ๐ Internationalization
Tool titles and descriptions are available in **English** and **French**, resolved automatically from the `Accept-Language` header or the `MCP_LANG` environment variable.
Locale files: `locales/en/common.json`, `locales/fr/common.json`
---
## Demo credentials
If you want to try the tool without creating an account, you can use the following credentials
Login: Demo15
Password : demodemo
---
## ๐ป Compatible clients
| Client | Mode |
|---|---|
| Claude.ai | HTTP / OAuth |
| Claude Desktop | STDIO |
| ChatGPT | HTTP / OAuth |
| n8n | HTTP |
| Flowise / LangChain | HTTP |
| Smithery | HTTP / OAuth |
| Any MCP client | STDIO or HTTP |
---
## ๐ช Supported business types
When creating an account with `account.create`, use `configType` to pre-load a dataset tailored to your business:
`Bar` ยท `Bakery` ยท `Restaurant` ยท `Fast-food` ยท `Cafe` ยท `Coffee-shop` ยท `Pizzeria` ยท `Brewery` ยท `Food-truck` ยท `Snack` ยท `Florist` ยท `Retail` ยท `Pharmacy` ยท `Supermarket` ยท `Clothing-store` ยท `Ecommerce` ยท `Services` ยท `Beauty-institute` ยท `Coiffeur` ยท `Market` ยท `Library` ยท `Camping` ยท and more...
---
## ๐ Links
- ๐ **Website**: [kash.click](https://kash.click)
- ๐ **Documentation**: [kash.click/cash-register-software](https://kash.click/cash-register-software/)
- ๐ง **API Reference**: [kash.click/cash-register-software/mcp](https://kash.click/cash-register-software/mcp/)
- ๐ **Register for free**: [kash.click/free-pos-software](https://kash.click/free-pos-software/)
---
## ๐ License
ยฉ 2025 Net-assembly. [GNU General Public License v3.0](LICENSE)
TDQS
Scored across 17 tools
Most tools have clearly distinct purposes focused on listing different data entities (cashboxes, clients, products, etc.), with minimal overlap. However, 'data_list_orders' and 'order_detail' could potentially be confused for similar order-related queries, though their descriptions clarify one lists orders and the other retrieves details for a specific order. The 'ping' and 'sale_create' tools are distinct utility and action tools, respectively.
The naming follows a consistent 'data_list_' prefix for 14 out of 17 tools, which is predictable and readable. However, there are minor deviations: 'order_detail' uses a different pattern (noun_verb) and 'ping' and 'sale_create' use simple verb-based names, breaking the consistency slightly. The overall pattern is still clear and mostly uniform.
With 17 tools, the count is slightly high but reasonable for a point-of-sale system covering multiple data entities (e.g., cashboxes, clients, products, orders). It provides comprehensive listing capabilities, though it might feel a bit heavy. The scope aligns well with the server's purpose, and each tool serves a specific function without obvious redundancy.
The tool set offers extensive listing capabilities for various data entities, which is good for retrieval operations. However, there are notable gaps: it lacks create, update, or delete tools for most entities (e.g., clients, products), except for 'sale_create' which handles sales creation. This limits full CRUD coverage, potentially causing agents to hit dead ends when needing to modify data beyond sales.