Documentation

Connect Claude, ChatGPT, Copilot or any MCP client to your Priority ERP

What this connector does

LeonAI MCP for Priority is a Model Context Protocol server that lets an AI assistant read and write your Priority ERP data. MCP is an open standard, so the same server works with Claude, ChatGPT, GitHub Copilot and any other MCP client. You ask a question in English or Hebrew; the server works out which ERP tables answer it, queries them, and returns the result. You never write an OData query and never need to know a table name.

It is built for the people who already live in Priority — finance, sales, procurement, operations — and for the analyst who currently exports to Excel to answer a question the ERP could have answered directly.

What it is good at

  • Questions that span tables. "Gross margin by manufacturer, this year versus last" touches invoices, invoice lines, parts and the part family tree. The server resolves the joins; you ask the question once.
  • Getting the arithmetic right. Revenue in Priority is not the sum of a price column: discounts, quantities and exchange rates all take part. The server applies Priority's own formula, so the number matches what the ERP reports.
  • Hebrew data. Hebrew values are searched as written. There is no translation step that can quietly turn a customer name into something else.
  • Writing back, carefully. Orders, invoices, customers and remarks can be created and updated — always previewed before anything is committed.

What it deliberately does not do

  • It deletes no ERP records. No tool in the catalogue removes Priority data.
  • It does not move money. There is no payment, transfer or settlement tool.
  • It does not generate images, video or audio.
  • It does not read your conversation history, memory, or uploaded files. It sees only the arguments the assistant passes to a tool call.

How it works

Worth understanding before you connect it to a production ERP, because it determines where your data goes and what the model can see.

Your client connects over HTTPS with OAuth 2.1. The server identifies your tenant and user, offers the assistant only the tools your permissions and enabled modules allow, checks every argument against your installation's real schema, and answers from a per-tenant cache or from your Priority server using your own credentials. Large result sets are aggregated or exported rather than truncated silently.

What the assistant receives, and what it never receives

The assistant receivesIt never receives
The records and totals returned by the tool you invoked Your Priority username or password
Table and field names needed to explain its answer Your API keys or OAuth client secrets
Your tenant's active modules, so it routes to the right tool Any other tenant's data, under any circumstances

Your Priority credentials are encrypted at rest and used only by the server, on your behalf, to call your own ERP. They are never included in a tool result. See the Security page for the full control set.

Worked examples

You do not need to know Priority table or field names. Ask in English or Hebrew — the server resolves the tables, joins and date fields itself. The three examples below are traced end to end so you can see what actually happens between your question and the answer.

Example 1 — a revenue question

"Who were my top 10 customers by revenue last quarter?"

What happens:

  1. The assistant calls priority_customer_analytics with a date range covering the quarter.
  2. The server resolves your installation's invoice view, applies Priority's own revenue formula (discount, quantity and exchange rate included) and groups by customer.
  3. Currency codes are normalised, so שח and ₪ are not counted as two currencies.

What you get: ten customers with revenue, invoice count and share of total — and, because the ERP's own arithmetic was used, figures that reconcile against Priority's reports rather than approximating them.

Example 2 — a stock question in Hebrew

"מה מצב המלאי של פריט ABC-100 בכל המחסנים?"

What happens:

  1. The Hebrew is not translated. It is used as written to match Priority's Hebrew description fields.
  2. The assistant calls priority_inventory_analytics for part ABC-100.
  3. The server returns balances per warehouse from the current stock view.

What you get: a per-warehouse balance table. Ask a follow-up like "and what moved last month?" and it switches to priority_stock_movement_analytics without you naming a tool.

Example 3 — writing back

"Create a sales order for customer 12345 with 10 units of ABC-100"

What happens:

  1. The assistant calls priority_create_entity with confirm=false. Nothing is written. The server returns the exact payload it would send, with the customer and part resolved to real records so you can see it found the right ones.
  2. You read the preview and approve it.
  3. It calls again with confirm=true and the confirmation token from the preview. Only now does the order exist in Priority.

What you get: the created order number — and an audit row recording who asked, what was sent and what Priority returned. The two-phase gate is enforced on the server, so no instruction in the conversation can skip it. See Security for why that matters.

More things to ask

  • "Show me open purchase orders older than 30 days, with supplier names"
  • "What was the gross margin by manufacturer in 2026 versus 2025?"
  • "Which customers stopped ordering in the last six months?"
  • "Give me the trial balance for account 4000 from January to March"
  • "Open order SO24001234 and list its items with quantities and prices"
  • "Show me the remarks and attachments on invoice T9696"
  • "Export every 2026 invoice line for customer 12345 to Excel"
  • "Update the delivery date on order SO24001234 to next Thursday"

Before you begin

Everything on this page works against a standard Priority installation. Have these ready and setup takes minutes; the first two are the ones that usually need a Priority administrator.

You needDetailsWhere it comes from
A Priority ERP with its REST API enabled Priority Cloud or an on-premises installation reachable over HTTPS. The server talks to Priority's standard OData v4 API, so nothing has to be installed inside Priority. On-premises systems behind a firewall allow our fixed egress addresses. Your Priority administrator; the addresses to allow are listed in the permissions guide
An API user with a Personal Access Token A Priority user holding an API licence, and a PAT generated for that user in Priority's Personal Access Tokens form (PATOKENS). The token inherits exactly that user's permissions — nothing more — so every form it may reach must be open both to the API (FORMLIMITED) and to the user. Priority; the menu paths for both permission layers are in the permissions guide
Your Priority URL and company name The address you open Priority at, and the company (environment) code shown on its login screen. Installations with several companies register one and add the rest later — see Working with several companies. The Priority login screen
A LeonAI tenant Created by self-service signup (a 14-day trial, card required, subject to availability and the offer shown at activation) or from an invitation link sent by your organisation's administrator. Registration tests the URL, company and token live, and reports exactly which forms are still closed to the API. /signup, or your administrator
An MCP client Claude.ai, Claude Desktop, Claude Code, ChatGPT, GitHub Copilot, VS Code, Cursor, n8n, Make or any client that speaks MCP over streamable HTTP. See Setup Guide

There is nothing to encode. OAuth clients sign in through the browser, and key-based clients send the key as a plain Bearer header — no Base64 step and no user:password string to assemble.

Registration and the setup wizard probe your installation and record which modules and forms are available. The assistant is told the same thing on its first call, which is why it does not guess at a table your tenant does not have.

Setup Guide

1. Get Access

Sign up and verify your email to provision a tenant — it takes a few steps. Trial availability and the applicable card, price and renewal agreement are shown before activation. You'll receive an API key and tenant credentials.

Prefer to talk to someone first? Email care@leonai.io.

2. Connect your client

The server speaks MCP over streamable HTTP at https://priority-mcp.leonai.io/mcp. Pick the path that matches your client.

Claude.ai and Claude Desktop

Go to Settings → Connectors → Add custom connector, enter the URL above, and click Connect. Claude runs an OAuth 2.1 flow: you sign in, review the requested access, and approve. No API key is copied or pasted, and no configuration file is edited.

Organisation administrators can add the connector once for everyone from Admin settings → Connectors; each member still authenticates individually, so per-user permissions continue to apply.

Claude Code

claude mcp add --transport http priority-erp https://priority-mcp.leonai.io/mcp

Run /mcp inside Claude Code to complete the OAuth flow and confirm the connection is live.

ChatGPT

Add the same URL as a custom connector wherever your ChatGPT plan exposes connector settings. ChatGPT runs the identical OAuth 2.1 flow — it registers itself automatically (RFC 7591), so there is nothing to paste. Verified working against this server.

GitHub Copilot

Add the same URL through Copilot's own "add MCP server" flow, in VS Code or the CLI. Copilot is a native-app client: it registers dynamically and completes OAuth on a loopback redirect whose port changes between runs, which this server accepts per RFC 8252 §7.3. Verified working for organisation installs.

Any other MCP client

Nothing here is Claude-specific. This is a standard MCP server over streamable HTTP with a spec-compliant OAuth 2.1 authorization server, so a conformant client connects with the URL alone. If yours reaches the server but is refused before authentication, see Troubleshooting — access is allowlisted at the network edge, and we add clients on request.

Clients without OAuth

Clients without OAuth support can authenticate with an API key issued from your tenant admin portal:

Authorization: Bearer YOUR_API_KEY
X-User-ID: you@company.com

X-User-ID identifies which registered user is calling, so per-user scopes and module permissions apply. It is required when your tenant has user registration enabled, and the value must be the email address of a registered user. Treat an API key like a password: it carries your tenant's access, so store it in a secret manager and rotate it if exposed.

Config-file clients: Cursor, Windsurf, Antigravity, Claude Code project files

Clients that read a JSON configuration take the same URL, with the key in a header when the client has no OAuth support. Claude Code's .mcp.json and Cursor's .cursor/mcp.json use this shape:

{
  "mcpServers": {
    "priority-erp": {
      "type": "http",
      "url": "https://priority-mcp.leonai.io/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}

VS Code's mcp.json uses a servers block with the same type and url and signs in through the browser; Antigravity names the address serverUrl. Leave headers out entirely for an OAuth sign-in. Claude Code also takes the key on the command line:

claude mcp add --transport http priority-erp https://priority-mcp.leonai.io/mcp --header "Authorization: Bearer YOUR_API_KEY"

Stdio-only hosts: bridge with fastmcp-remote

Some MCP hosts only launch local stdio processes and have no notion of a remote HTTP server at all. fastmcp-remote bridges the two: it runs as a local process, opens a standard OAuth 2.1 connection to this server on your behalf — dynamic client registration, PKCE and the loopback redirect all matching what Claude Code and GitHub Copilot already use above — and exposes the result to the host over stdio.

{
  "mcpServers": {
    "priority-erp": {
      "command": "uvx",
      "args": ["fastmcp-remote@4.0.3", "https://priority-mcp.leonai.io/mcp"]
    }
  }
}

The first run opens a browser to sign in. On a host with no browser available, skip OAuth and pass an API key instead:

{
  "mcpServers": {
    "priority-erp": {
      "command": "uvx",
      "args": [
        "fastmcp-remote@4.0.3", "https://priority-mcp.leonai.io/mcp",
        "--auth", "none",
        "--header", "Authorization: Bearer YOUR_API_KEY",
        "--header", "X-User-ID: you@company.com"
      ]
    }
  }
}

Automation platforms: n8n, Make, custom code

Point the platform's MCP client node at the URL with streamable HTTP transport and send Authorization: Bearer YOUR_API_KEY plus X-User-ID on every request. For agent workflows, get_skill_pack returns your tenant's approved playbooks in one call, ready to paste into the agent's system message — see Help, skills and memory.

Connection settings at a glance

SettingValue
TransportStreamable HTTP (SSE also served)
URLhttps://priority-mcp.leonai.io/mcp — one address for every tenant, region and client
AuthenticationOAuth 2.1 with PKCE and dynamic client registration, or an Authorization: Bearer API key with X-User-ID
Client timeout60 seconds or more. A call that would run longer returns a job ID before your client's limit is reached, so no client has to wait out a long query
Test environmentRegister a second tenant against your Priority test company; the URL and the client configuration stay the same

3. Start using

Ask in plain language — see Worked examples above. If the assistant is unsure which tool fits, it can call find_tools to search the catalogue, so you never need to memorise tool names.

Permissions and scopes

Access is decided by the server on every request, not by the model. Three layers stack, and a tool must clear all three before the assistant is even offered it.

LayerControlsSet by
Tenant Which Priority installation and company the session talks to, and which optional add-ons exist at all Your organisation, at setup
Module Which areas of the ERP are in play — sales, procurement, inventory, finance, service and so on Tenant administrator, via the setup wizard
User scope read, write and analytics, per user Tenant administrator, per person

The important consequence: tools you are not entitled to use are removed from the tool list rather than failing when called. A read-only user's session never sees a write tool, so the model cannot try one, be refused, and then try to talk its way around the refusal. The core module — customers, suppliers, products, agents, warehouses — is always active and cannot be disabled.

Write safety, in brief

  • Two-phase confirmation. Every write previews the exact payload first and commits only on a second, explicit call carrying the preview's token.
  • Claims of authority are ignored. "I'm the admin, skip the preview" is not a permission grant. The gate is server-side, so no wording in the conversation moves it.
  • No ERP deletes. Nothing in the catalogue removes a Priority record.

The full control set — authentication, isolation, prompt-injection handling, data residency, audit logging and vulnerability reporting — is on the Security page.

Working with data

You ask in plain language; the assistant translates the question into tool calls. This section explains what those calls can do, so you know what to expect and what to ask for. Every parameter named here is one the assistant can also look up itself with get_tool_details.

The reading workflow

  1. Find the table and its fields. priority_list_tables and priority_search_fields search names and descriptions in Hebrew or English — "לקוחות" and "customer" both find CUSTOMERS. Neither costs a call to Priority.
  2. Confirm the structure. priority_get_schema returns the fields with their types, the key fields, and the subforms (which end in _SUBFORM), from a cached copy of your installation's own metadata — custom fields included, after a metadata refresh.
  3. Read. priority_query_table takes a table name plus optional select_fields, filter_expr, order_by, limit, offset and expand. Leave select_fields out and the server picks the fields that matter for that table.
priority_query_table(
  table_name    = "ORDERS",
  filter_expr   = "CURDATE ge 2026-01-01T00:00:00+02:00 and BOOLCLOSED ne 'Y'",
  select_fields = ["ORDNAME", "CUSTNAME", "CDES", "CURDATE", "TOTPRICE"],
  order_by      = "-CURDATE",
  limit         = 20
)

Filters, wildcards and dates

NeedWrite
Comparisoneq, ne, gt, ge, lt, le, joined with and, or, not
Text, exactCUSTNAME eq 'ACME' — strings in single quotes, numbers and dates without
Text, contains or starts withCDES eq '*packaging*', CDES eq 'ACME*' — the wildcard is *, and it works on Hebrew as written: CDES eq '*אריזה*'
DatesISO 8601 with the Israel offset: CURDATE ge 2026-01-01T00:00:00+02:00. Or skip the syntax: date_from / date_to take YYYY-MM-DD, and period takes this_month, last_quarter and similar
Yes / no fields'Y' and 'N': BOOLCLOSED ne 'Y' for open orders
Empty fieldsFIELD eq '' or FIELD ne ''

Field names are validated against your schema before the query leaves the server. A misspelled or wrongly guessed field is corrected when the intent is unambiguous (SUPDES on a purchase order becomes CDES) and rejected with the real name otherwise, so the query does not fail inside Priority with an opaque 400.

Sorting, paging and honest counts

order_by takes a field name, prefixed with - for descending. limit and offset page through results, and every page says where it stands: the response carries count, total_count, has_more and next_offset. Nothing is cut off silently — when a result would exceed the response cap you get the first rows, a note saying so, and a download link for the full set. Ask for an aggregate or an export when you want everything.

Subforms: order lines, contacts, payments

Priority stores line items, contacts and schedules as subforms of a parent record. Three ways to reach them, none of which queries a subform on its own:

  • Inline with the parent — expand="ORDERITEMS_SUBFORM($select=PARTNAME,TQUANT,PRICE)" on priority_query_table returns each order with its lines. Nesting reaches grandchild subforms.
  • For one record — priority_get_navigation_property takes the parent table, its key and the subform name, with its own filter, sort and paging. Grandchildren are addressed as TRANSORDER_D_SUBFORM(1)/SERNTRANS_SUBFORM.
  • As totals — priority_aggregate_items rolls lines up per parent or per group: quantity per order, revenue per part, in parallel batches, moving to a background job automatically when there are thousands of parents.

Totals and roll-ups

priority_query_table accepts aggregate (count(), sum(FIELD), avg, min, max), group_by and calculated_fields, so "orders per agent this month" is one call, computed on the server rather than by reading every row into the conversation. Revenue always uses Priority's own formula — see Worked examples.

One record by key

priority_get_entity_by_key fetches a single record by the key you know from the screen — ORDNAME for an order, CUSTNAME for a customer — with an optional expand. You never need Priority's hidden internal IDs. Composite keys are passed as an object, for example {"IVNUM": "T9696", "DEBIT": "D", "IVTYPE": "A"} for a central invoice, and priority_get_schema tells you which fields form the key.

Text and remarks

Remarks and text tabs are read with priority_get_text and written with priority_update_text. text_type selects the tab — remarks, internal, shipping, invoicing or ordering — and writing appends by default, so nothing is overwritten unless you ask for append=false. Text on an order line is addressed through its path: ORDERS('SO24001234')/ORDERITEMS_SUBFORM(1). The HTML Priority keeps internally is handled for you; you read and write plain text.

Attachments

priority_list_attachments lists the files on a record, shows images inline and returns short-lived download links for PDFs and other files. priority_attach_file uploads a PDF or image to a record, inline for small files or through the file picker for larger ones, with the same preview-then-confirm gate as every write.

Creating records

priority_create_entity takes the table name and a data object with only the fields you specify; Priority's own triggers fill defaults, and the server applies the defaults you have taught it (warehouse, currency). A parent and its lines are created in one call by including the subform as an array:

priority_create_entity(
  table_name = "ORDERS",
  data = {
    "CUSTNAME": "12345",
    "ORDERITEMS_SUBFORM": [
      { "PARTNAME": "ABC-100", "TQUANT": 10 },
      { "PARTNAME": "ABC-200", "TQUANT": 2 }
    ]
  },
  confirm = false
)

The first call is a preview: it validates every field, resolves the customer and parts to real records, and returns a confirmation token. Only the second call, with confirm=true and that token, writes. When a header with lines is created, the header and every line are reported separately: if the header saved but a line was rejected, the result says partial_failure and names the failed line and Priority's reason, so nothing is silently half-done. To add a line to an existing order, address the subform directly: table_name="ORDERS('SO24001234')/ORDERITEMS_SUBFORM".

Updating records

priority_update_entity takes the table, key_values and a data object holding only the fields to change. Keys are the visible ones ({"ORDNAME": "SO24001234"}) — hidden internal keys such as ORD or CUST are never required. The preview shows a before/after diff of exactly the fields that will change. Lines are updated by path: ORDERS('SO24001234')/ORDERITEMS_SUBFORM(1).

Several records at once

priority_batch_operations sends up to 100 creates, updates or reads to Priority in one $batch request. Later operations can reference earlier ones ($1/ORDERITEMS_SUBFORM), and each operation is reported on its own: if the third of ten fails, you are told which one, with Priority's message. There is no rollback — what succeeded stays, and a retry runs only what was reported as failed. call_tool_bulk does the same for any tool, five calls in parallel.

Exporting

priority_export_data writes Excel, CSV or JSON with the same filters, expand, grouping and subtotals as a query, for up to two million rows, and returns a download link. It is the right answer whenever the question is "give me the whole list".

Procedures and reports

Priority procedures are the actions on a form's menu — print a document, change a status, send to the next stage, run a report. Four tools cover them. For a report the assistant runs them in order; for a procedure it skips Discover:

  1. List — priority_list_procedures with a form name returns the procedures that form offers, as your Priority installation defines them, custom ones included.
  2. Discover — priority_discover_procedure reads a report's input fields without running it, optionally in the context of a specific record, so the assistant knows what to ask you for. It refuses a procedure, because opening one in Priority runs it. priority_discover_subform_procedure does the same for line-level reports.
  3. Preview — priority_run_procedure with confirm=false shows exactly what will run: form, procedure, the record it targets and the parameters, and returns a confirmation token bound to that exact call.
  4. Run — the same call with confirm=true and the token executes it. Documents a procedure produces come back as links.
priority_run_procedure(
  form_name      = "ORDERS",
  procedure_name = "WWWSHOWDOC",
  key_field      = "ORDNAME",
  key_value      = "SO24001234",
  confirm        = false
)

The record is identified by its visible key, the parameters are passed as a plain {field: value} object, and the two-phase gate is the same one every write goes through. Line-level procedures add subform_name and subform_line.

Step by step

When a procedure asks questions — a date range, a print format, a "close the order?" warning — priority_procedure_start returns the first question as a typed step and priority_procedure_continue answers it and returns the next. Every field carries its type, its current value, whether it is mandatory and Priority's own help text; you answer only the fields you change. Reports that run on a form start immediately; procedures — and any run started without a form — ask for the same two-phase confirmation as writes before anything runs. A report's output is downloaded for you and parsed into rows with priority_procedure_output, so the assistant can total it, not just link to it.

Not sure what a procedure is called? priority_search_procedures finds any procedure or report by name or title, in Hebrew or English, across the whole installation — no form needed — and priority_entity_help returns the help text Priority itself shows for a screen, a field, a procedure or a report. Both read Priority's own catalogue (EXEC, EFORM, EPROG, EREP, FORMCLMNSTITLE); the permissions guide lists these under optional forms.

Three different questions hide behind "search", and each has a tool. None of them needs anything configured inside Priority first.

You want to findToolNotes
A table, form or field — "where are supplier invoices?" priority_list_tables, priority_search_fields Searches names and descriptions in Hebrew or English; no translation step. Instant, from your installation's metadata.
A record by exact value — order SO24001234, customer 12345 priority_get_entity_by_key, priority_query_table Precise, structured, paged. Wildcards for "contains".
A record when you know a word, not a table — a phone number, an address, a name priority_search_data One keyword across many tables at once, with a per-table result limit; pass tables to narrow.
A record by meaning — "industrial packaging supplier in Haifa" priority_semantic_search_erp Ranks matches by meaning rather than exact text. Name a table or let it pick.
The right tool — "how do I get margin by manufacturer?" find_tools Searches the catalogue in Hebrew or English and returns the best fits with their parameters.

Search versus query

Use a search when you do not know which table holds the answer, or only have a fragment. Use priority_query_table once you do: it filters, sorts, pages and aggregates, and it is what the assistant reaches for after a search has told it where to look.

Paging

Query and subform results page with limit and offset, and report has_more and next_offset. Cross-table search takes a limit_per_table. The assistant pages for you when a question needs more than one page, and switches to an export when it needs all of them.

Help, skills and memory

Built-in help

priority_help answers syntax and how-to questions without a call to Priority: date formats, filter operators, the revenue formula, key tables, error codes, performance rules, parent-child relationships and the add-on tool families. get_tool_details returns any tool's full parameter list, constraints and examples. Both are free, and the assistant uses them on its own when a call fails with a parameter error.

Tenant skills: your playbooks

A skill is a step-by-step procedure written for your organisation — how the month-end report is built, which warehouses to exclude, the fiscal conventions that apply — that the assistant follows whenever the task comes up. Skills are enabled per tenant by an administrator.

  • load_skill lists your skills, or loads one by name. The assistant sees the index on its first call and loads a skill when the task matches.
  • save_skill proposes a new skill or a change to an existing one, as a draft. A draft never takes effect on its own: an administrator reviews and approves it, and every approved version is kept so a change can be rolled back.
  • get_skill_pack returns all approved skills in one text, for automation platforms that inject a system message once at the start of a workflow.

The assistant proposes a skill when a multi-step task has just succeeded and is worth repeating. You can also ask for one directly: "save how we did this as a skill".

Per-user memory

priority_remember stores a fact or preference for you — your default warehouse, a customer name mapped to its code, "always show amounts in ILS" — and priority_forget removes it. Memories persist across conversations and are loaded on the first call of every session; stored defaults are applied automatically to writes. priority_get_user_context reloads them mid-conversation.

Working with several companies

One Priority installation often holds several companies. If your administrator has enabled multi-company for your tenant, the assistant sees the companies you are entitled to, with a default, and you simply name the company in your request:

  • "Open orders in Oralum" — the call targets that company.
  • "Total sales this month across all companies" — priority_query_table queries every company you selected and merges the result, each row labelled with its company.
  • Writes — create, update, attach, run a procedure — always go to exactly one company, and the assistant asks which if you did not say.

priority_list_environments lists the companies with their code, name and default flag. Under the hood a company is selected with the environments parameter on the tool call; the assistant fills it from your wording. Administrators choose which companies each user may reach, and single-company tenants never see any of this.

Tool reference

The tool reference — each tool your account is served, with the exact description the assistant receives — is inside the tenant portal, under ERP connection › Tool catalogue. 66 tools included for a standard tenant, 127 with every add-on enabled; add-on tools appear there once the add-on is enabled.

You never need to memorise them. The assistant picks the tool, and can call find_tools to search the catalogue when it is unsure. Directory reviewers can request the complete list from care@leonai.io.

Limits and performance

LimitValue
Requests per tenant100 per minute (default; raise on request)
Batch write operations100 per call
Long-running analysisMoves to a background job returning a job ID to poll
Client timeout to configure60 seconds or more; the server hands back a job ID before any client's limit is reached
WhatsApp add-on100 messages per tenant per hour
Outlook add-on100 operations per user per hour

What to expect on speed

Frequently-queried tables are kept in a per-tenant cache that refreshes on a schedule, so most questions answer in well under a second. A query that misses the cache goes to your Priority server and takes as long as your ERP takes — typically a few seconds, longer for wide date ranges over large transaction tables.

If a request is going to run long, it is moved to a background job and you get a job ID instead of a timeout. The assistant polls it with priority_get_background_result and reports back when it finishes.

Optional add-ons

These are off by default and are not part of the standard connector. Their tools are not merely disabled — they are absent from the tool list entirely — until a tenant administrator enables the add-on for your tenant. Enabling one is a deliberate act by your organisation, requested through care@leonai.io or set in the tenant admin portal.

Add-onWhat it addsWhere the data goes
App builder Build and save small interactive dashboards over your ERP data Stays within our infrastructure
Portal pages Publish read-only web pages backed by ERP queries Stays within our infrastructure
Outlook Mail, calendar and contacts alongside ERP context Microsoft Graph — leaves Israel
WhatsApp Send messages and read chats alongside ERP context WhatsApp/Meta — leaves Israel. With AI features on, voice messages are transcribed by Google Cloud Speech-to-Text in the United States
AI features Generative AI over your ERP content — natural-language query help and semantic search Google Vertex AI — text generation leaves Israel, search embeddings stay in Tel Aviv; off by default, explicit opt-in

Add-ons that move data outside Israel are listed as sub-processors in the Privacy Policy and the DPA. Enabling one changes where your data goes, so it is treated as a consent decision, not a settings toggle.

Supported Priority Modules

Sales Procurement Inventory Finance AR Finance AP Quotes Receipts Shipping Service Journal Production

Modules are activated per-tenant. The Core module (customers, suppliers, products, agents, warehouses) is always available.

Troubleshooting

Connecting

SymptomCause and fix
"Couldn't reach the MCP server" Check the URL is exactly https://priority-mcp.leonai.io/mcp — a missing or extra path segment will not connect. Then check /health returns healthy; if it does, the problem is network or DNS between your client and us.
401 after it had been working Your access token expired and the refresh did not succeed. Disconnect and reconnect the connector to run a fresh OAuth flow. If it recurs within a day, tell us — that is not expected.
403 User identification required Your tenant has user registration enabled and the call arrived without an identified user. On an API-key connection, send X-User-ID with a registered user's email address. On OAuth this resolves itself — the token identifies the user.
Connects, but no tools appear Your tenant is not activated yet, or the user has no scopes assigned. Both are fixed in the tenant admin portal.
403 before you are ever asked to sign in Access is allowlisted at the network edge, so a client whose servers we have not listed is refused before authentication. Claude, ChatGPT and GitHub Copilot are already allowed, as is any client connecting from Israel. For anything else, email care@leonai.io with the client name and we will add it — this is a configuration step, not a limitation of the connector.

Results that look wrong

SymptomCause and fix
Empty result for data you know exists Most often the date range — many queries default to a recent window, so ask explicitly for the period you mean. Next most often, the relevant module is not activated for your tenant.
A table or field "does not exist" Custom fields added in your Priority installation need a metadata refresh before the server will accept them. Ask your administrator to refresh the tenant's metadata, or contact us.
Revenue does not match a Priority report Check you are comparing the same thing: the server reports net revenue using Priority's formula, including discount and exchange rate. A report summing a gross price column will differ, and the difference is the discount.
The answer was truncated Responses are capped. Narrow the question, ask for an aggregate instead of rows, or ask for an export — priority_export_data writes the full set to a file.

Writes

SymptomCause and fix
Write is refused outright Your user lacks the write scope for that module. This is set per user by your administrator.
"Confirmation required" on every attempt Working as designed: the preview call must be followed by a second call carrying the confirmation token. If the token has expired, run the preview again.
Priority rejects the record Your ERP's own business rules — mandatory fields, blocked customer, closed period. The message is passed through from Priority; the fix is in Priority.

Still stuck

Email care@leonai.io with what you asked, what you expected and roughly when. Every call is logged with a request ID, so a timestamp is usually enough for us to find it. Security reports: see Security.

Release notes

Highlights only. The tool reference in the tenant portal is regenerated from the running server on every deployment, so it is always the authoritative list.

October 2026

Version 5.0.0 · 362 changes, 12 breaking

  • New priority_read_result: when an answer is too large for one reply, read it page by page inside the conversation. Free, and it makes no request to Priority.
  • Sales analytics says what its revenue counts: every answer carries revenue_definition and the exact filters it used, and the new include_drafts option counts draft invoices too.
  • Long reads no longer lose rows: a page Priority refuses as too large is read again in smaller pages, and a short page in the middle of the data no longer ends the read.
  • Dashboards never present a partial answer as complete: an amount Priority does not return is reported as unreadable, never as 0, and a total is never a 30-day slice called the whole history.
  • Low-stock alerts read every stock row and every movement of their window. On a busy company they used to stop at 10,000 rows.
  • Multi-company installations: every company gets its turn in the scheduled cache refresh, and an account can be limited to writing only in the companies it names.
  • When your Priority server is down, a long request stops within a few minutes instead of retrying for half an hour.

Changes that may need action on your side

  • Code mode: a failing call_tool() now raises. Wrap a call whose failure the script should survive in try/except and read str(e).
  • AR/AP aging now returns what is still open, in a new shape: read owed / net and total_open instead of amount and total_revenue. For the old invoice figures call analysis_type='invoice_status'.
  • Query completeness: total_records appears only when a read ran to the end, and has_more can be null (not confirmed). Read returned_records for the rows you got and treat null as "there may be more".

9 more breaking changes affect individual tools. Write to care@leonai.io for the full list with migration steps.

September 2026

Versions 3.0.0 – 4.1.0 · 370 changes, 1 breaking

  • The self-service trial now requires a verified credit card: ₪0 today, then the monthly plan you chose (net + VAT) is charged automatically after 14 complete days unless you cancel first. Reminders 8, 4 and 1 day before the first charge; online cancellation at any time. See the versioned trial terms.
  • Procedures produce Word documents and return their tables and text, not only a download. A preview shows a procedure's first-step fields before you start it, and procedure search works on every installation.
  • Semantic search finds records by customer or company name, Hebrew names included, on every account and with no index to build.
  • Writes can be confirmed from Cursor, n8n and other clients that open a new connection per call, and an approved update no longer overwrites a change someone made after the preview.
  • Large subforms (order lines, invoice lines, price lists) answer from the cache again instead of a live read.
  • Live service status in the footer of every page and in the portal, with a banner during an incident or maintenance.
  • This documentation gained guides for prerequisites, every MCP client's configuration, reading and writing data, procedures, search, skills and memory and multi-company use.
  • Multi-company tenants: company selection per request, cross-company merge in priority_query_table, and per-user company entitlements.

Changes that may need action on your side

  • Hosted apps: app links now require login. Administrators grant viewers explicitly and list the fields an app button may change.

August 2026

  • Tenant skills: load_skill, save_skill and get_skill_pack, with administrator approval and version history.
  • Enterprise audit add-on: priority_audit_query answers "who did this" over the tool audit log.
  • App builder add-on: preview_app, versioned apps with rollback.
  • Bilingual public site; this page in Hebrew.

July 2026

  • Self-service signup with a 14-day trial, plans and usage alerts in the tenant portal.