Repository avatar
Databases
v0.1.0
active

sql-account-mcp

io.github.z9systems/sql-account-mcp

Read-only SQL Account (SQL Accounting) data: customers, stock, invoices and payments.

Documentation

SQL Account MCP

Ask Claude, ChatGPT or any MCP client about your SQL Account (SQL Accounting) data in plain words:

"How much has Tanner & Co. been invoiced this month?" "What's on invoice IV-00012?" "How many WB-5G bottles do we have?" "Show the payments we received on 25 November."

This is a read-only Model Context Protocol server. It uses the official SQL Account REST API with your own API keys. It can look things up; it cannot create, change or delete anything.

Unofficial. Not made or endorsed by E Stream MSC. "SQL Account" is their trademark.

Tools

ToolWhat it does
list_customers / get_customerCustomers from Maintain Customer, by code or company name
list_stock_items / get_stock_itemStock items, with UOM and price lines
list_sales_invoices / get_sales_invoiceSales invoices by customer, number or date, with item lines
list_purchase_invoices / get_purchase_invoicePurchase invoices by supplier, number or date, with item lines
list_customer_paymentsPayments received from customers
list_agentsSales agents
query_recordsAny of: customer, agent, stockitem, salesinvoice, purchaseinvoice, customerpayment, paymentvoucher, journalentry, stockreceived, stocktransfer, stockadjustment, with exact-match filters

Filters are exact matches on SQL Account field names (code, docno, docdate as YYYY-MM-DD, and other header fields). The API returns at most 50 records per call; the tools page with offset.

What you need

  1. SQL Account 5.2025.1038.875 or newer, with the SQL Account API Service set up (SQL Account's own guide: setup, on-premise). E Stream charges a setup fee for the API.
  2. An API user with an access key and secret key: in SQL Account, Tools > Maintain User, create a user such as APIUser, then More > API Secret Key > Generate. The secret key is shown once. Give this user only the rights it needs.
  3. Node.js 18.17 or newer.

Set up

Add this to your MCP client. For Claude Desktop, edit claude_desktop_config.json:

{
  "mcpServers": {
    "sql-account": {
      "command": "npx",
      "args": ["-y", "sql-account-mcp"],
      "env": {
        "SQLACC_ACCESS_KEY": "your access key",
        "SQLACC_SECRET_KEY": "your secret key"
      }
    }
  }
}

Claude Code:

claude mcp add sql-account -e SQLACC_ACCESS_KEY=... -e SQLACC_SECRET_KEY=... -- npx -y sql-account-mcp

Cursor, Windsurf and other clients use the same command, arguments and environment variables.

Docker:

docker build -t sql-account-mcp https://github.com/z9systems/sql-account-mcp.git
docker run -i --rm -e SQLACC_ACCESS_KEY=... -e SQLACC_SECRET_KEY=... sql-account-mcp

Settings

VariableDefault
SQLACC_ACCESS_KEYrequired
SQLACC_SECRET_KEYrequired
SQLACC_BASE_URLhttps://api.sql.mychange only if SQL Account gives you another address
SQLACC_REGIONap-southeast-1
SQLACC_SERVICEexecute-api
SQLACC_SESSION_TOKENonly for temporary credentials
SQLACC_TIMEOUT_MS20000

Safety

  • Only HTTP GET requests are sent. There are no tools that write.
  • Requests are signed with AWS Signature Version 4, as SQL Account's API requires. Your keys stay on your computer and are sent only to the SQL Account API.
  • Filter field names are checked before a request is made.
  • Use a dedicated API user. Once it has a secret key it can no longer sign in to SQL Account itself.

Test

npm install
npm test

The test starts a stand-in for the SQL Account API that checks every request's signature (with the independent aws4 library), runs the MCP server over stdio and calls every tool.

Status: tested against that stand-in. If anything differs on your SQL Account version, please open an issue with the error message (never your keys).

Want it set up for you?

Z9 Systems connects AI to SQL Account, AutoCount, Xero, HubSpot and other systems: stock questions on WhatsApp, purchase orders turned into sales orders, payment reminders, and more, with a person approving every key step.

Licence

MIT

NPM
sql-account-mcp
Install Command
npm install sql-account-mcp