b1-mcp-server for SAP B1
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_DRY_RUN | No | The exact value true validates raw SQL and Service Layer writes without executing them; connections and Service Layer GET still run. | false |
| MCP_LOG_LEVEL | No | Stderr verbosity: debug / info / warn / error. JSONL file logging is unaffected. Uses info when unset/empty and reports a fallback for any other invalid value. | info |
| MCP_SL_TIMEOUT_MS | No | Service Layer login/request timeout in milliseconds. Must be a positive integer; invalid values fall back to the default. | 30000 |
| MCP_SL_TRUST_FILE | No | Local non-secret certificate trust store. | ~/.claude/service-layer-trust.json |
| MCP_AUDIT_LOG_PATH | No | Audit log JSONL file. Unset or empty uses the default path. | ~/.claude/logs/b1-mcp-audit.jsonl |
| MCP_MAX_RESULT_ROWS | No | Max rows returned to the model; extra rows are cut and announced. Must be a positive integer; invalid values fall back to the default. | 500 |
| NODE_EXTRA_CA_CERTS | No | For an internal certificate authority, set this to the CA bundle before starting the MCP process. Global certificate verification disablement is never supported: the adapter refuses to connect when NODE_TLS_REJECT_UNAUTHORIZED=0 is present. | |
| MCP_CONNECTIONS_FILE | No | Path to the connection profile file. All optional; there is no .env file — the server reads process.env directly. | ~/.claude/connections.json |
| MCP_MAX_QUERY_LENGTH | No | Max SQL length in characters. Must be a positive integer; unset or whitespace-only uses the default, any other invalid value reports the fallback on stderr and uses the default. | 8000 |
| MCP_MAX_RESULT_CHARS | No | Max characters of result JSON, applied after the row cap. Must be a positive integer; invalid values fall back to the default. | 100000 |
| MCP_QUERY_TIMEOUT_MS | No | Statement ceiling in milliseconds; a query still running at this point is aborted. Raise it if a legitimate report needs longer. Must be a positive integer; invalid values fall back to the default. | 60000 |
| MCP_SL_MAX_BODY_CHARS | No | Maximum serialised PATCH/POST body length. Must be a positive integer; invalid values fall back to the default. | 50000 |
| MCP_SL_MAX_URL_LENGTH | No | Maximum relative OData URL length. Must be a positive integer; invalid values fall back to the default. | 2048 |
| MCP_SL_WRITES_ENABLED | No | Emergency kill switch for every Service Layer write (PATCH, POST, DELETE); true/false are case-insensitive and invalid values disable writes. Replaces MCP_SL_PATCH_ENABLED, which is no longer read — except that any value other than true in the old name still disables writes. | true |
| MCP_RATE_LIMIT_MAX_CALLS | No | Max calls per tool per window. Must be a positive integer; invalid values fall back to the default rather than meaning "no limit". | 60 |
| MCP_RATE_LIMIT_WINDOW_MS | No | Rate-limit window in milliseconds. Must be a positive integer; invalid values fall back to the default. | 60000 |
| MCP_ELICITATION_TIMEOUT_MS | No | How long a human gets to answer an approval form (certificate trust, Service Layer write) before it fails closed. Must be a positive integer; invalid values fall back to the default. | 120000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
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 |
|---|---|
| connect_databaseA | Switch the active database and Service Layer connection to a different SAP Business One environment. Searches connection profiles by ID or database name (case-insensitive). Partial matches are only accepted when they resolve to a single profile. Each profile can include DirectDb (DB) credentials, Service Layer (SL) credentials, or both. When switching environments, each stale or non-matching side is disconnected before replacement; a healthy side that still matches the selected profile remains active. If only one side connects successfully, it remains active - retry the failed side after fixing credentials. Tracks failed login attempts per profile and warns about account lockout risk under the configured login policy. Available profiles: (no profiles loaded) Use "list" as the query to reload and list all available profiles. |
| execute_sqlA | Execute a raw SQL statement against the currently connected database. All SQL, whether written by the user or generated by you, goes through the same server-side validation. IMPORTANT: Before calling this tool, you MUST confirm which database the user intends to query. If the user has not explicitly stated the target database in their message, ASK them first. Do NOT assume the currently connected database is the intended target. READ-ONLY: only SELECT (and read-only DO BEGIN...END blocks) execute. Data-changing statements are blocked server-side. If the user needs a write (INSERT/UPDATE/DELETE), do NOT call this tool — generate the SQL and give it to the user to run in a real DB client (HANA Studio / DBeaver / hdbsql), where a human can review the statement and control its transaction handling. Rules enforced server-side:
|
| get_schema_infoA | Retrieve metadata about tables, columns, or procedures in the currently connected database. Read-only. Use this to explore the schema before writing queries. For "columns": provide the table name in "filter". For "tables"/"procedures": filter is optional (LIKE pattern). IMPORTANT: Before calling this tool, you MUST confirm which database the user intends to query. If the user has not explicitly stated the target database in their message, ASK them first. Do NOT assume the currently connected database is the intended target. |
| execute_service_layerA | Execute a read-only OData GET against the currently connected SAP Business One Service Layer. Writes go through execute_service_layer_write. Denied when the connected profile's slAllowedMethods (printed by connect_database) omits GET. Query options are allowed; absolute URLs, Login/Logout and $batch are denied. |
| execute_service_layer_writeA | Execute a guarded OData write (PATCH, POST or DELETE) against the currently connected SAP Business One Service Layer. These are real writes to the company database. The verb must be in the connected profile's slAllowedMethods, and database must equal the connected Service Layer database exactly — connect_database prints both. A mismatch is denied. Approval follows the profile's slWriteApproval, also printed by connect_database. "elicitation" (default): the server asks the user through an MCP approval form; clients without form elicitation cannot write. "client" or "none": the server executes after this client's own permission prompt, honoured only for Claude Code. On a "none" profile, prefer execute_service_layer_write_unattended, which does the same write without any approval; use this tool there only when the user asks to confirm the write. MCP_DRY_RUN previews but never executes a write, and MCP_SL_WRITES_ENABLED=false disables every write globally. PATCH and DELETE accept one directly keyed entity endpoint only. POST accepts an entity set, a service operation, or one action on a keyed entity (Orders(12)/Close). Query options, navigation paths, absolute URLs, Login/Logout and $batch are denied. |
| execute_service_layer_write_unattendedA | Execute a guarded OData write (PATCH, POST or DELETE) with NO approval of any kind, for development companies. Denied unless the connected profile has slWriteApproval "none" (printed by connect_database); otherwise use execute_service_layer_write. These are real writes to the company database. Every other rule of execute_service_layer_write applies unchanged: database must equal the connected Service Layer database, the verb must be in slAllowedMethods, the same endpoint shapes are enforced, MCP_DRY_RUN previews and MCP_SL_WRITES_ENABLED=false disables it. |
| check_connectionA | Check if the database and Service Layer connections are active and alive. Pings DirectDb (SELECT query) and Service Layer (GET request) independently. No parameters required. Reports status for both connections. |
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 7 tools
Read vs write tools are clearly separated (execute_service_layer vs execute_service_layer_write), and execute_sql/check_connection/get_schema_info target distinct concerns. The only real ambiguity is between execute_service_layer_write and execute_service_layer_write_unattended, which perform the identical operation and differ only in approval mode; the descriptions explain the distinction but an agent can still easily misselect.
All tools use snake_case with a consistent verb_noun pattern (execute_*, connect_*, check_*, get_*). The write/write_unattended pair follows a predictable suffix convention rather than breaking the pattern. Names are readable and self-describing throughout.
Seven tools is well-scoped for a DB/SAP integration server: connection management, status, schema introspection, read/write SQL, and read/write Service Layer. Each tool earns its place with no obvious filler or redundancy.
The surface covers connection lifecycle, schema exploration, status checks, and both read and write paths across SQL and Service Layer. The main intentional gap is direct SQL writes (blocked by design, handed to the user), and there is no explicit disconnect tool, but core workflows are covered.