sap-b1-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SAPB1_MOCK | No | Set to true or 1 to use the bundled fixtures instead of SAP | |
| SAPB1_MAX_ROWS | No | Maximum rows any tool may return. Default 50, hard cap 500 | 50 |
| SAPB1_PASSWORD | No | Password of that user. Never logged, redacted from errors | |
| SAPB1_USERNAME | No | Dedicated read-only SAP Business One user | |
| SAPB1_LOG_LEVEL | No | Log level: debug, info (default), warn, error, or silent. Logs go to stderr | info |
| SAPB1_ALLOW_HTTP | No | Set to true to allow a plain http:// URL. Only for a local test system | false |
| SAPB1_COMPANY_DB | No | Company database / schema name | |
| SAPB1_TIMEOUT_MS | No | Per-request timeout in milliseconds | 30000 |
| SAPB1_ALLOW_SELF_SIGNED | No | Set to true to accept a self-signed TLS certificate. Off by default | false |
| SAPB1_SERVICE_LAYER_URL | No | Service Layer base URL, e.g. https://b1server:50000/b1s/v1 | |
| SAPB1_SAVED_QUERIES_FILE | No | Path to your saved-queries JSON file |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Read-only access to one SAP Business One company via Service Layer. All tools only read data; there are no tools that create, change or delete anything. Codes (CardCode, ItemCode) are exact. Use the search_* tools to find codes first.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_business_partnerA | Fetch one business partner (customer, supplier or lead) by its exact CardCode. |
| search_business_partnersA | Search business partners whose CardCode or CardName contains the text. Optionally filter by type. |
| get_customer_balanceA | Account balance, open orders balance, open deliveries balance and credit limit for one business partner. |
| get_itemA | Fetch one item master record by its exact ItemCode. |
| search_itemsA | Search items whose ItemCode or ItemName contains the text. |
| get_stock_by_warehouseB | In-stock, committed, ordered and available quantity per warehouse for one item (from ItemWarehouseInfoCollection). |
| get_open_sales_ordersA | Open (not closed, not cancelled) sales orders, optionally for one customer, newest first. |
| get_open_invoicesA | Open A/R invoices with the unpaid balance (DocTotal - PaidToDate), optionally for one customer or only overdue ones. |
| run_saved_queryA | Run a query that an administrator pre-registered in the saved-queries config file. No free SQL or free filters are accepted. Available: customers_over_balance: Customers whose account balance is above a threshold, highest first; invoices_due_before: Open A/R invoices due before a date; sales_by_month: Net A/R sales per month for a year (needs SQLQueries entry KN_SALES_BY_MONTH created by your admin) |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
The get_by_exact_key vs search_by_text split is clean and consistent across business partners and items, and the transactional tools (open orders, open invoices, stock by warehouse) target distinct resources. The only fuzziness is between run_saved_query's pre-built queries (customers_over_balance, invoices_due_before) and the single-record tools get_customer_balance/get_open_invoices, which an agent could pick wrongly, though the descriptions differentiate them.
All names are snake_case with a leading verb (get_, search_, run_), and the pattern maps predictably to intent: get_ = exact-key fetch, search_ = text lookup, get_open_* = filtered document lists. No mixed conventions or vague verbs.
Nine tools is well within the sweet spot and each covers a distinct read pattern (master data, balances, stock, open documents, canned reports). Nothing looks padded or redundant.
The server is coherently read-only, but the document surface stops at list level: there is no tool to fetch a single sales order or invoice with its line details, no price-list/item-warehouse-adjacent lookups beyond the one stock call, and no purchase-side coverage. run_saved_query is an admin-gated escape hatch rather than a general remedy, so agents will hit dead ends when drilling into a document.