Elementary POS MCP
Provides tools for interacting with the Elementary POS public API, enabling management of bills, orders, receipts, stock, items, customers, suppliers, taxes, categories, and webhooks.
Click on "Deploy 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., "@Elementary POS MCPShow me the current actual stock for all items."
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.
elementary-pos-mcp
Servidor MCP (Model Context Protocol) para la Public API de Elementary POS. Expone facturas, pedidos, recibos, stock, artículos, clientes, proveedores, impuestos, categorías y webhooks como herramientas MCP.
Stack: TypeScript ESM, @modelcontextprotocol/server v2, zod v4, tsx, Node 22.
Arquitectura
src/
index.ts # Entry stdio (+ delega a http.ts según MCP_TRANSPORT)
http.ts # Transporte Streamable HTTP (stateless), /health, /, /mcp + CORS
server.ts # createServer(): registra los 10 módulos de tools
config.ts # Validación env con zod, resolución de API key
lib/
api-client.ts # Cliente fetch con X-Api-Key, timeout AbortController, errores tipados
errors.ts # ElementaryPosApiError / ElementaryPosConfigError
schemas/ # Validación zod por dominio (bill, order, receipt, stock, item, customer, supplier, webhook, common)
tools/ # Registro de tools (helpers.ts + 1 fichero por dominio)
examples/
claude-code/.mcp.json
cursor/mcp.json
Dockerfile # Multi-stage Node 22 alpine, usuario no-root, CMD dist/http.jsFlujo: MCP client -> createServer(config) -> register*Tools -> ElementaryPosApiClient -> https://api.elementarypos.com/v1/* con cabecera X-Api-Key.
Autenticación por llamada (prioridad): apiKey param de la tool > header x-api-key / Authorization: Bearer (modo remoto) > env X_API_KEY / ELEMENTARY_POS_API_KEY (modo stdio local).
Related MCP server: MCP Universal EC E-Invoice Server
Herramientas (32)
Dominio | Tool | Tipo | Endpoint Elementary |
Bills |
| read |
|
Bills |
| read |
|
Categories |
| read |
|
Customers |
| read |
|
Customers |
| read |
|
Customers |
| write |
|
Customers |
| write/idempotente |
|
Customers |
| write/destructiva |
|
Items |
| read |
|
Items |
| write |
|
Items |
| write/idempotente |
|
Items |
| write/destructiva |
|
Orders |
| read |
|
Orders |
| write |
|
Orders |
| write |
|
Receipts |
| read |
|
Receipts |
| read |
|
Receipts |
| read |
|
Receipts |
| stub | Devuelve aviso: API binaria no expuesta en build JSON-only |
Stock |
| read |
|
Stock |
| read |
|
Stock |
| write/idempotente |
|
Stock |
| write/idempotente |
|
Suppliers |
| read |
|
Suppliers |
| read |
|
Suppliers |
| write |
|
Suppliers |
| write/idempotente |
|
Suppliers |
| write/destructiva |
|
Tax |
| read |
|
Webhook |
| read |
|
Webhook |
| write/idempotente |
|
Webhook |
| write/destructiva |
|
Notas: elementary_create_order crea bill nuevo si se omite billId. En stock, cantidad negativa = venta, positiva = entrada.
Configuración
Variables (src/config.ts, ver .env.example):
Var | Defecto | Descripción |
| — | Fallback local stdio. En remoto no usar .env, usar header |
|
| Base API |
|
| Timeout fetch |
|
|
|
|
| Ruta MCP |
|
| Servidor HTTP (Docker expone 3001) |
Puesta en marcha
pnpm install
pnpm dev # stdio según MCP_TRANSPORT (tsx src/index.ts)
pnpm dev:http # HTTP directo (tsx src/http.ts)
pnpm typecheck && pnpm build
pnpm start # node dist/index.js (stdio)
pnpm start:http # node dist/http.js (HTTP)Docker:
docker build -t elementary-pos-mcp .
docker run -p 3001:3001 elementary-pos-mcp
curl http://localhost:3001/healthEndpoints HTTP: GET / (info), GET /health, POST /mcp (protocolo MCP). CORS abierto con x-api-key, mcp-session-id.
Integración clientes
Stdio local (Cursor examples/cursor/mcp.json, Claude Code examples/claude-code/.mcp.json): ajustar /ABSOLUTE/PATH/.../dist/index.js y ELEMENTARY_POS_API_KEY.
Remoto (opencode.json): pasar API key por headers, no por env:
{
"mcpServers": {
"elementary-pos": {
"type": "streamable-http",
"url": "https://tu-host/mcp",
"headers": { "x-api-key": "pak-..." }
}
}
}Errores
ElementaryPosApiError incluye status HTTP + payload. Timeout → AbortError con mensaje timed out after {ms}ms. Sin key → error que indica las 3 vías (param, header, env).
This server cannot be deployed
Maintenance
Related MCP Connectors
Malaysian SME accounting, e-Invoice and payroll for your AI. 64 tools; writes are approved drafts.
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Directory of APIs, merchants, and tools AI agents can actually use.
Build, validate, deploy — HTTP APIs, cron jobs, webhooks and MCP tools — from your AI client.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage KiotViet retail and F\&B operations including products, orders, customers, invoices, and inventory through the Public API. Features 36 integrated tools with automatic token refresh, middleware chain support, and configurable presets for different access levels.3-
- AlicenseBqualityDmaintenanceEnables AI agents to issue, void, query, and manage Taiwan e-invoices via 27 MCP tools, wrapping the Universal EC POS Web Service.27MIT
- AlicenseAqualityBmaintenanceExposes the Loyverse API as MCP tools to manage stores, products, inventory, customers, receipts, and more from AI assistants.54MIT
- FlicenseCqualityDmaintenanceMCP server for the BILLZ POS/Retail API 2.0, enabling AI agents to perform analytics and full retail operations including sales, products, customers, reports, and inventory management.18-