Skip to main content
Glama
bersimao

b1-mcp-server for SAP B1

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_DRY_RUNNoThe exact value true validates raw SQL and Service Layer writes without executing them; connections and Service Layer GET still run.false
MCP_LOG_LEVELNoStderr 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_MSNoService Layer login/request timeout in milliseconds. Must be a positive integer; invalid values fall back to the default.30000
MCP_SL_TRUST_FILENoLocal non-secret certificate trust store.~/.claude/service-layer-trust.json
MCP_AUDIT_LOG_PATHNoAudit log JSONL file. Unset or empty uses the default path.~/.claude/logs/b1-mcp-audit.jsonl
MCP_MAX_RESULT_ROWSNoMax 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_CERTSNoFor 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_FILENoPath to the connection profile file. All optional; there is no .env file — the server reads process.env directly.~/.claude/connections.json
MCP_MAX_QUERY_LENGTHNoMax 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_CHARSNoMax 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_MSNoStatement 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_CHARSNoMaximum serialised PATCH/POST body length. Must be a positive integer; invalid values fall back to the default.50000
MCP_SL_MAX_URL_LENGTHNoMaximum relative OData URL length. Must be a positive integer; invalid values fall back to the default.2048
MCP_SL_WRITES_ENABLEDNoEmergency 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_CALLSNoMax 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_MSNoRate-limit window in milliseconds. Must be a positive integer; invalid values fall back to the default.60000
MCP_ELICITATION_TIMEOUT_MSNoHow 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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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:

  • READ-ONLY: INSERT/UPDATE/DELETE/DROP are blocked for everyone — no confirmation bypass.

  • Direct EXEC/EXECUTE/CALL: blocked (stored procedures are disabled).

  • CREATE/ALTER: blocked.

  • MS SQL pass-through (OPENQUERY/OPENROWSET/OPENDATASOURCE): blocked.

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 7 tools

Disambiguation4/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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.

Maintenance

ActivityNo data
ResponsivenessNo issues