b1-mcp-server
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. | info |
| MCP_SL_TIMEOUT_MS | No | Service Layer login/request timeout in milliseconds. Must be a positive integer. | 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. | 500 |
| NODE_EXTRA_CA_CERTS | No | Path to a CA bundle for an internal certificate authority; set before starting the MCP process. | |
| MCP_CONNECTIONS_FILE | No | Path to the connection-profile file. | ~/.claude/connections.json |
| MCP_MAX_QUERY_LENGTH | No | Max SQL length in characters. Must be a positive integer. | 8000 |
| MCP_MAX_RESULT_CHARS | No | Max characters of result JSON, applied after the row cap. Must be a positive integer. | 100000 |
| MCP_QUERY_TIMEOUT_MS | No | Statement ceiling; a query still running at this point is aborted. Must be a positive integer. | 60000 |
| MCP_SL_MAX_BODY_CHARS | No | Maximum serialised PATCH/POST body length. Must be a positive integer. | 50000 |
| MCP_SL_MAX_URL_LENGTH | No | Maximum relative OData URL length. Must be a positive integer. | 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. | true |
| MCP_RATE_LIMIT_MAX_CALLS | No | Max calls per tool per rate-limit window. Must be a positive integer. | 60 |
| MCP_RATE_LIMIT_WINDOW_MS | No | Rate-limit window in milliseconds. Must be a positive integer. | 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. | 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
Most tools target clearly distinct operations: connection switching, health check, schema introspection, raw SQL, and OData reads/writes. The only real overlap is execute_service_layer_write vs execute_service_layer_write_unattended, which differ solely in approval mode, but the descriptions explicitly state when to use each, mitigating confusion.
All tools use snake_case with a predictable verb_noun (or verb_resource) structure: connect_database, execute_sql, check_connection, get_schema_info, execute_service_layer, and the consistent _write / _write_unattended suffixes. No mixed conventions.
Seven tools is well-scoped for a database + Service Layer bridge: connection, health, schema, SQL read, SL read, SL write, and unattended write. Each tool earns its place; nothing feels redundant beyond the necessary approval-mode split.
The surface covers the full read lifecycle (connect, check, schema, SQL, OData GET) plus guarded writes, with the deliberate and documented omission of raw SQL writes. The main gap is the lack of Service Layer metadata/entity-set discovery analogous to get_schema_info, which would help agents construct valid OData requests.