guniweb-sap-mcp 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -5
- package/dist/index.js +71 -66
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ graph TB
|
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
### Infrastructure
|
|
69
|
-
- **
|
|
69
|
+
- **Two Transport Modes** -- stdio and Streamable HTTP (the legacy SSE transport was removed in 0.8.0)
|
|
70
70
|
- **Named destinations (0.3.0)** -- one server, several SAP systems; a Bearer token per n8n credential selects the system and its permissions. Static API key still supported
|
|
71
71
|
- **Docker Ready** -- Docker Compose for n8n + SAP MCP sidecar
|
|
72
72
|
- **Zero telemetry** -- the server talks to the SAP/BTP endpoints you configure and to nothing else. No usage statistics, no update checks, no crash reports
|
|
@@ -150,7 +150,7 @@ A `docker-compose.yml` that puts n8n next to the server is in the repository.
|
|
|
150
150
|
|-------------------------------|----------------|-------------------------------------------------------------------------------------------------|
|
|
151
151
|
| `--tool-timeout` / `SAP_MCP_TOOL_TIMEOUT` | `30` (seconds) | Time budget for a **whole tool call**, however many SAP requests it makes. On expiry the client gets a valid MCP response with `truncated: true` and a plain-language reason — never a hanging connection. Paginated reads return the pages fetched so far. `0` disables the budget (logged as a warning at startup) |
|
|
152
152
|
| `SAP_HTTP_TIMEOUT_MS` | `30000` | Timeout for a **single** outbound SAP request (ms). Hanging gateways fail fast with a structured `TIMEOUT` error instead of stalling the n8n agent. Capped by whatever is left of the tool budget above |
|
|
153
|
-
| `--cache-dir` / `SAP_CACHE_DIR` | _(unset = in-memory only)_ | Persist the catalog and metadata caches to disk so a restart does not refetch them. Without it every restart re-reads the full catalog — on a system with
|
|
153
|
+
| `--cache-dir` / `SAP_CACHE_DIR` | _(unset = in-memory only)_ | Persist the catalog and metadata caches to disk so a restart does not refetch them. Without it every restart re-reads the full catalog — on a system with over a thousand services that is the cold start that breaks client timeouts. n8n evicts its own client entry on a transport error, so restarts are not rare |
|
|
154
154
|
| `SAP_CA_CERT` | _(unset)_ | Path to the root CA that signs your SAP certificate — the documented way past a corporate PKI. Mirrored into `NODE_EXTRA_CA_CERTS`. Prefer this over `SAP_TLS_VERIFY=false`, which disables the check rather than solving it |
|
|
155
155
|
| `--concurrency` / `SAP_CONCURRENCY` | `5` | Upper bound on simultaneous SAP requests where several are unavoidable |
|
|
156
156
|
| `--allow-write` / `SAP_MCP_ALLOW_WRITE` | _(unset = read-only)_ | **Since 0.2.2 the server is read-only by default.** `sap_create`, `sap_update`, `sap_delete`, `sap_function` and `sap_idoc_send` are not registered at all until you set this — a tool an agent cannot see is a tool it cannot call by accident. `--read-only` is still accepted and now simply describes the default |
|
|
@@ -161,7 +161,7 @@ A `docker-compose.yml` that puts n8n next to the server is in the repository.
|
|
|
161
161
|
|
|
162
162
|
In HTTP transport mode the `/idoc` route is mounted on the MCP port: with `--webhook-secret` it authenticates independently of `--api-key` (so SAP's Basic auth works while n8n uses the Bearer key); without it, it falls under `--api-key` if set — and is **open** if neither is configured (the server logs a warning at startup).
|
|
163
163
|
|
|
164
|
-
Both timeouts must stay **below the smallest client limit** in your setup.
|
|
164
|
+
Both timeouts must stay **below the smallest client limit** in your setup. Typical limits: a reverse proxy such as Cloudflare aborts at 100 s (`524`), n8n's MCP client transport at 300 s. A budget above the smallest limit never takes effect, because the client gives up first.
|
|
165
165
|
|
|
166
166
|
#### Tracing a slow tool call
|
|
167
167
|
|
|
@@ -173,6 +173,8 @@ Every tool call logs one line on completion, carrying a correlation id that also
|
|
|
173
173
|
|
|
174
174
|
`grep a3f19c8b2d04` then shows the full story of that one call — including how many SAP requests it produced. `outcome` is one of `ok`, `error`, `timeout` (budget expired) or `aborted` (client disconnected).
|
|
175
175
|
|
|
176
|
+
Send a W3C `traceparent` header with the request, and its trace id appears in the same line as `traceId`, so a job can be followed from the calling application through n8n to the SAP request. The header is only logged. An invalid one is ignored, and it is never forwarded to SAP ([details](docs/api-reference.md#tracing-across-systems-traceparent)).
|
|
177
|
+
|
|
176
178
|
**`level: 50` means something is actually wrong.** Expected non-2xx responses — the `404`s from the catalog path probing and from the V4 catalog attempt on systems that have none — are logged at `info` with `"expected": true`, not at `error`. Measured on a production system: over 96 hours of runtime that false alarm was the *only* error-level entry in the log. Alerting on `level: 50` is therefore meaningful; before, it produced nothing but noise.
|
|
177
179
|
|
|
178
180
|
#### When something breaks
|
|
@@ -195,7 +197,7 @@ If `SAP_TLS_VERIFY=false` is in effect, **every tool result** carries a warning
|
|
|
195
197
|
|
|
196
198
|
Clients that *require* a session id — they read `mcp-session-id` from the initialize response and send it back on subsequent requests — will fail against this server. The n8n MCP Client, Claude Desktop, and the MCP Inspector all work without it.
|
|
197
199
|
|
|
198
|
-
The legacy `--transport sse` mode
|
|
200
|
+
The legacy `--transport sse` mode was removed in 0.8.0; use `http`.
|
|
199
201
|
|
|
200
202
|
#### Several SAP systems: `destinations.json`
|
|
201
203
|
|
|
@@ -292,6 +294,8 @@ curl -H "$A" -X DELETE "$U/destinations/s4test?force=true" # remove; withou
|
|
|
292
294
|
- **Bootstrap without any SAP configuration.** With `--admin-token` the server starts even if `destinations.json` does not exist yet and no `SAP_*` is set: `/mcp` answers `503` until the first destination (and a token, or a destination named `default`) has been created through the API. `docker run … -e SAP_MCP_ADMIN_TOKEN=… -e SAP_MCP_DESTINATIONS=/config/destinations.json` is a complete first start.
|
|
293
295
|
- Put the API behind the same reverse proxy/TLS as `/mcp`; the admin secret travels as a Bearer header like any other credential.
|
|
294
296
|
|
|
297
|
+
**Rotating tokens and SAP passwords** — step by step, with what needs a restart and what does not: [Setup Guide → Rotating credentials](docs/setup-guide.md#rotating-credentials).
|
|
298
|
+
|
|
295
299
|
### 4. Use with n8n
|
|
296
300
|
|
|
297
301
|
1. Add an **AI Agent** node with an **MCP Client Tool** sub-node
|
|
@@ -406,7 +410,7 @@ graph TB
|
|
|
406
410
|
end
|
|
407
411
|
|
|
408
412
|
subgraph Server["guniweb-sap-mcp"]
|
|
409
|
-
Transport["Transport<br/>stdio | HTTP
|
|
413
|
+
Transport["Transport<br/>stdio | HTTP"]
|
|
410
414
|
UserCtx["UserContext<br/>Extraction"]
|
|
411
415
|
Registry["ToolRegistryManager<br/>Core | OData | IDoc"]
|
|
412
416
|
Tools["17 MCP Tools<br/>3 Resources • 3 Prompts"]
|