luxare-retail-mcp

luxare-retail-mcp

An MCP server that exposes Diaspark retail reporting APIs for searching customers, sales history, and inventory through tools compatible with Claude Desktop and Claude Code.

Category
访问服务器

README

luxare-retail-mcp

An MCP (Model Context Protocol) server that exposes three Diaspark (diasparkonline.com) reporting/lookup APIs as tools an MCP-compatible client (e.g. Claude Desktop, Claude Code) can call.

Tools

Tool Endpoint Purpose
list_customers POST /terminal/terminal/list_customers_all Search the customer list by name, city, email, phone, etc.
sales_history_report POST /pos/point_of_sale_report/sales_receipt_with_item_report Sales receipt / item sales history report over a date range.
inventory_search POST /inventory/inventory_report/on_hand_report_by_style On-hand inventory report, filterable by SKU, serial #, brand, category, vendor, store, location, etc.

All requests are sent as Content-Type: application/xml POST bodies. No authentication is required against the demo environment currently configured (https://diasparkdemo.rw.diasparkonline.com).

How it works

Each Diaspark endpoint expects a large, mostly-static XML payload (see src/templates.ts, copied verbatim from the sample requests). Rather than generating XML from scratch, each tool takes a known-good template and only overwrites the specific <tag> values relevant to the fields you pass in — every other default/hidden field the API depends on is left untouched.

  • list_customers — nearly every field maps 1:1 to a tag (first_name, last_name, city, ...).
  • sales_history_report — exposes company_id, user_id, document_id, start_date (→ dt1), end_date (→ dt2), plus a raw_overrides object for any other criteria field (str1-str60, all1-all30, dec1-dec10, multiselect1-30, etc).
  • inventory_search — exposes friendly names (sku, serial, brand, category, vendor, store, location, department, subcategory, group, group_code, classification, collection, designer, vendor_style, rmsa, upc) that are mapped to the underlying strN/strN+1 "from/to" tag pairs (derived from the report's column definitions), plus raw_overrides for anything else.

Passing a friendly inventory field sets both the "from" and "to" tag to that value, i.e. an exact-match filter. If a filter doesn't seem to take effect, the report may also require its corresponding allN "select all" checkbox flag to be turned off — pass that via raw_overrides (e.g. { "all5": "N" }). The full column-to-tag mapping is documented in the original OnHandStockReportBySerialCriteriaStru.xml column definitions file if you need to extend this further.

applyOverrides (in src/xmlUtils.ts) throws if you reference a tag name that doesn't exist anywhere in the template, so typos in raw_overrides fail loudly instead of being silently ignored.

Setup

npm install
npm run build

Configuration

By default the server targets the demo environment:

https://diasparkdemo.rw.diasparkonline.com

To point at a different environment (e.g. production), set the DIASPARK_BASE_URL environment variable.

Claude Desktop / Claude Code MCP config

Add to your MCP config file (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "luxare-retail": {
      "command": "node",
      "args": ["/absolute/path/to/luxare-retail-mcp/build/index.js"],
      "env": {
        "DIASPARK_BASE_URL": "https://diasparkdemo.rw.diasparkonline.com"
      }
    }
  }
}

Restart Claude Desktop / Claude Code after editing the config.

Running as a remote HTTP server

The tools are defined once in src/server.ts and exposed over two entrypoints:

  • src/index.ts (npm start) — stdio transport, for a local MCP client (Claude Desktop/Code) that spawns the process directly, as above.
  • src/http.ts (npm run start:http) — MCP Streamable HTTP transport, for a remote client connecting over the network. Listens on PORT (defaults to 3000), exposes a health check at / and the MCP endpoint at POST /mcp.

Deploying to Render

This repo includes a render.yaml Blueprint that deploys the HTTP entrypoint as a Node web service:

  • Build: npm install && npm run build
  • Start: npm run start:http
  • Health check: /
  • DIASPARK_BASE_URL defaults to the demo environment; override it in the Render dashboard for a different environment.

In the Render dashboard, use New > Blueprint and point it at this repo/branch — Render will read render.yaml and provision the service. Once deployed, remote MCP clients connect to https://<your-service>.onrender.com/mcp.

Adding more endpoints

To add another Diaspark API as a tool:

  1. Add its sample request body as a new exported template string in src/templates.ts.
  2. Add a new server.tool(...) block in src/index.ts, listing the fields you want to expose as friendly parameters (map them to the underlying tag names), plus a raw_overrides escape hatch.
  3. npm run build and restart your MCP client.

Example tool calls

// list_customers
{ "first_name": "david", "company_id": 3 }

// sales_history_report
{ "company_id": 7, "start_date": "2026/07/01", "end_date": "2026/07/10" }

// inventory_search
{ "company_id": 7, "sku": "ABC123" }

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选