sap-ai-dev-toolkit 0.2.5

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.
Files changed (57) hide show
  1. package/.github/agents/abap-developer.agent.md +25 -0
  2. package/.github/agents/abap-runtime-debugger.agent.md +27 -0
  3. package/.github/agents/rap-service-developer.agent.md +27 -0
  4. package/.github/agents/sap-solution-architect.agent.md +31 -0
  5. package/.github/skills/abap-debugging/SKILL.md +15 -0
  6. package/.github/skills/abap-development/SKILL.md +16 -0
  7. package/.github/skills/abap-runtime-analysis/SKILL.md +17 -0
  8. package/.github/skills/abap-testing-quality/SKILL.md +19 -0
  9. package/.github/skills/cds-development/SKILL.md +16 -0
  10. package/.github/skills/clean-core-extensibility/SKILL.md +16 -0
  11. package/.github/skills/rap-development/SKILL.md +16 -0
  12. package/.github/skills/rap-service-delivery/SKILL.md +17 -0
  13. package/.github/skills/sap-sdlc-orchestration/SKILL.md +16 -0
  14. package/.github/skills/sap-standard-api-analysis/SKILL.md +16 -0
  15. package/.github/skills/sap-transport-release/SKILL.md +14 -0
  16. package/LICENSE +22 -0
  17. package/LICENSE-APACHE-2.0.txt +201 -0
  18. package/NOTICE +33 -0
  19. package/README.md +723 -0
  20. package/dist/checksums.txt +5 -0
  21. package/dist/vsp-darwin-arm64 +0 -0
  22. package/dist/vsp-darwin-x64 +0 -0
  23. package/dist/vsp-linux-arm64 +0 -0
  24. package/dist/vsp-linux-x64 +0 -0
  25. package/dist/vsp-win32-x64.exe +0 -0
  26. package/package.json +52 -0
  27. package/patches/vsp-bas-proxy-auth.patch +310 -0
  28. package/scripts/build-vsp.mjs +52 -0
  29. package/scripts/ensure-go.mjs +59 -0
  30. package/scripts/install-user-copilot-assets.mjs +110 -0
  31. package/scripts/mutation-terminal-ui.mjs +69 -0
  32. package/scripts/postinstall.mjs +269 -0
  33. package/scripts/publish-npm.mjs +97 -0
  34. package/src/abaplint.mjs +105 -0
  35. package/src/bas-discovery.mjs +210 -0
  36. package/src/binary.mjs +99 -0
  37. package/src/cf-connectivity.mjs +317 -0
  38. package/src/cf-destination.mjs +793 -0
  39. package/src/launcher.mjs +144 -0
  40. package/src/mcp-config.mjs +253 -0
  41. package/src/mcp-proxy.mjs +388 -0
  42. package/src/setup.mjs +275 -0
  43. package/src/terminal-ui.mjs +67 -0
  44. package/test/cf-connectivity.test.mjs +287 -0
  45. package/test/cf-destination.test.mjs +307 -0
  46. package/test/cf-runtime.test.mjs +505 -0
  47. package/test/copilot-assets.test.mjs +37 -0
  48. package/test/copilot-content.test.mjs +145 -0
  49. package/test/discovery.test.mjs +199 -0
  50. package/test/fixtures/fake-vsp.mjs +244 -0
  51. package/test/launcher.test.mjs +164 -0
  52. package/test/mcp-config-cf.test.mjs +149 -0
  53. package/test/mcp-proxy.test.mjs +337 -0
  54. package/test/setup-cf.test.mjs +362 -0
  55. package/test/setup.test.mjs +376 -0
  56. package/test/terminal-ui.test.mjs +47 -0
  57. package/tools.md +68 -0
package/README.md ADDED
@@ -0,0 +1,723 @@
1
+ <h1 align="center">🧭 SAP AI Development Toolkit</h1>
2
+
3
+ <p align="center">
4
+ <strong>AI-native ABAP development from GitHub Copilot Chat — directly against your SAP landscape</strong><br>
5
+ Inspect. Understand. Build. Test. Validate. Prepare for transport.<br>
6
+ A destination-aware Model Context Protocol (MCP) bridge connecting SAP Business Application Studio, SAP ADT, VSP, and your GitHub Copilot coding agent.
7
+ </p>
8
+
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/package/sap-ai-dev-toolkit"><img src="https://img.shields.io/npm/v/sap-ai-dev-toolkit?style=for-the-badge&color=CB3837&logo=npm&logoColor=white" alt="npm version"></a>
11
+ <a href="https://www.npmjs.com/package/sap-ai-dev-toolkit"><img src="https://img.shields.io/npm/dm/sap-ai-dev-toolkit?style=for-the-badge&color=CB3837&logo=npm&logoColor=white" alt="npm downloads"></a>
12
+ <img src="https://img.shields.io/badge/Node.js-%E2%89%A520-339933?style=for-the-badge&logo=nodedotjs&logoColor=white" alt="Node.js 20 or newer">
13
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-75B900?style=for-the-badge" alt="MIT License"></a>
14
+ </p>
15
+
16
+ <p align="center">
17
+ <img src="https://img.shields.io/badge/SAP-Business%20Application%20Studio-0A6ED1?style=flat-square&logo=sap&logoColor=white" alt="SAP Business Application Studio">
18
+ <img src="https://img.shields.io/badge/GitHub%20Copilot-Agent-000000?style=flat-square&logo=githubcopilot&logoColor=white" alt="GitHub Copilot Agent">
19
+ <img src="https://img.shields.io/badge/MCP-enabled-7B61FF?style=flat-square" alt="MCP enabled">
20
+ <img src="https://img.shields.io/badge/SAP%20ADT-connected-0A6ED1?style=flat-square&logo=sap&logoColor=white" alt="SAP ADT connected">
21
+ <img src="https://img.shields.io/badge/ABAP-CDS%20%7C%20RAP-EA4AAA?style=flat-square" alt="ABAP CDS RAP">
22
+ </p>
23
+
24
+ <p align="center">
25
+ <a href="#install">📦 Install</a> ·
26
+ <a href="#copilot-agent">🤖 Copilot Agent</a> ·
27
+ <a href="#bas">🧭 BAS Setup</a> ·
28
+ <a href="#tools">🧰 Tool Catalog</a> ·
29
+ <a href="#troubleshooting">🩺 Troubleshooting</a>
30
+ </p>
31
+
32
+ ## ⚡ Quick start
33
+
34
+ ```sh
35
+ npm install --global sap-ai-dev-toolkit
36
+ sap-ai-dev --setup
37
+ ```
38
+
39
+ To also add optional full-stack SAP companion MCP servers for Fiori, UI5, CAP, and browser validation, run:
40
+
41
+ ```sh
42
+ sap-ai-dev --setup --tools
43
+ ```
44
+
45
+ Then in SAP Business Application Studio:
46
+
47
+ 1. Open the Command Palette.
48
+ 2. Run **MCP: List Servers**.
49
+ 3. Start the server named after your selected BAS destination.
50
+ 4. In GitHub Copilot Chat, choose the best-fit bundled agent from the agent picker: **SAP Solution Architect**, **ABAP Developer**, **ABAP Runtime Debugger**, or **RAP Service Developer**.
51
+ 5. In the Chat tools picker, enable the server for that BAS destination.
52
+ 6. Ask Copilot what you want to inspect, build, test, or verify.
53
+
54
+ **Prerequisite:** Node.js 20 or newer. If Go is not already available, the installer can provision the pinned supported Go release automatically.
55
+
56
+ ## 🤖 Available agents and skills
57
+
58
+ **Agents:** Four user-invocable custom agents are included. Select the best fit from the agent picker in GitHub Copilot Chat, as shown in Quick start.
59
+
60
+ | | Agent | Best for |
61
+ | --- | --- | --- |
62
+ | 🧭 | **SAP Solution Architect** | System investigation, SAP standard/API recommendations, Clean Core and side-by-side design, and SDLC orchestration through implementation handoffs and validation gates |
63
+ | 🧑‍💻 | **ABAP Developer** | General ABAP, CDS, and RAP implementation, validation, and transport-preparation tasks |
64
+ | 🐞 | **ABAP Runtime Debugger** | Runtime incidents, dumps, logs, traces, debugger sessions, call graphs, and performance symptoms |
65
+ | 🚀 | **RAP Service Developer** | RAP business objects, behavior implementations, projections, service definitions, service bindings, and OData validation |
66
+
67
+ **Included skills:** `abap-development` · `abap-testing-quality` · `cds-development` · `rap-development` · `abap-debugging` · `abap-runtime-analysis` · `rap-service-delivery` · `sap-standard-api-analysis` · `clean-core-extensibility` · `sap-sdlc-orchestration` · `sap-transport-release`
68
+
69
+ If the agents are not listed, install the optional agents and skills under `$HOME/.copilot` when prompted during an interactive global install, then reload BAS if needed. Repository-scoped installation instructions appear below.
70
+
71
+ ## ✨ Turn Copilot Chat into an SAP development cockpit
72
+
73
+ `sap-ai-dev-toolkit` installs `sap-ai-dev`, discovers your BAS destinations, and exposes a curated SAP development toolset through MCP. Instead of manually switching between chat, terminal commands, repository searches, ADT screens, and SAP checks, describe the outcome you want and let the appropriate bundled agent coordinate the available tools.
74
+
75
+ <p align="center"><strong>💬 Request → 🔎 Inspect → 🧠 Reason → 🧑‍💻 Implement → 🧪 Verify → 📋 Report</strong></p>
76
+
77
+ The workflow covers ABAP, CDS, RAP, repository analysis, table and query access, testing, ATC, application logs, transports, and controlled source changes. The live MCP tool list remains the source of truth for what your connected SAP system and active VSP mode expose.
78
+
79
+ ## 🌟 Feature highlights
80
+
81
+ | | Feature | What it gives you |
82
+ | --- | --- | --- |
83
+ | 🤖 | **AI-driven ABAP development** | Ask for changes in natural language and let the bundled agents orchestrate inspection, implementation, runtime diagnosis, validation, and reporting. |
84
+ | 🧭 | **BAS destination awareness** | Discover BAS destinations and create one isolated MCP server per selected SAP system. |
85
+ | 🔎 | **Deep repository inspection** | Read source, search objects, grep packages, find definitions and references, compare source, inspect dependencies, and analyze impact. |
86
+ | 🧩 | **CDS + RAP development** | Inspect CDS metadata and dependencies, model CDS artifacts, and build RAP business objects and services. |
87
+ | 🗃️ | **SAP data access** | Inspect DDIC structures, read table content, and execute controlled ABAP SQL queries against the connected system. |
88
+ | ✍️ | **Create + edit ABAP objects** | Write or edit supported source objects, create packages and tables, syntax-check, and activate when explicitly requested. |
89
+ | ✅ | **Quality built into the flow** | Use local ABAP linting plus SAP syntax checks, ABAP Unit, ATC, editor diagnostics, and formatting. |
90
+ | 🐞 | **Debugging + diagnostics** | Investigate dumps, traces, application logs, runtime failures, system capabilities, and installed components. |
91
+ | 🚚 | **Transport-aware workflows** | Inspect transport requests and object lock context, and create transports when explicitly authorized. |
92
+ | 🔐 | **Controlled SAP state changes** | State-changing actions require a known target and an explicit request; SAP authorizations still apply. |
93
+ | 🧱 | **Destination isolation** | Each generated MCP server is tied to its own `BAS_VSP_DESTINATION`, helping prevent accidental cross-system execution. |
94
+ | 🛡️ | **Credential-safe configuration** | Credentials, cookies, usernames, passwords, and raw destination payloads are not written into MCP configuration. |
95
+
96
+ The catalog below documents 40 tool capabilities across source inspection, data, editing, quality, transports, and logs. Availability can vary by SAP system and VSP mode, so the live `tools/list` response is authoritative.
97
+
98
+ ## 🚀 What can the agent do?
99
+
100
+ ### 🧑‍💻 Build and refactor
101
+
102
+ - ABAP reports, classes, interfaces, and function groups
103
+ - CDS definitions and dependency-aware changes
104
+ - RAP business objects and services
105
+ - Focused source edits with syntax validation
106
+
107
+ ### 🔍 Understand your SAP codebase
108
+
109
+ - Search repository objects and packages
110
+ - Find definitions and references
111
+ - Compare implementations
112
+ - Inspect class metadata and dependencies
113
+ - Run CDS forward and reverse impact analysis
114
+
115
+ ### 🧪 Validate quality
116
+
117
+ - ABAP Unit
118
+ - ATC checks
119
+ - SAP syntax checks
120
+ - Local `abaplint`
121
+ - BAS editor and LSP diagnostics
122
+ - Pretty-print source
123
+
124
+ ### 🏢 Work with the live SAP system
125
+
126
+ - Read DDIC structures and table content
127
+ - Execute ABAP SQL queries
128
+ - Inspect system and component information
129
+ - Read SLG1 application logs
130
+ - Review and create transport requests
131
+
132
+ ## 🧠 Four agents, eleven focused skills
133
+
134
+ The package ships with four custom agents plus eleven task-focused Copilot Agent Skills:
135
+
136
+ | | Skill | Best for |
137
+ | --- | --- | --- |
138
+ | 🧑‍💻 | `abap-development` | Implementing and refactoring ABAP reports, classes, interfaces, and function groups |
139
+ | ✅ | `abap-testing-quality` | ABAP Unit, lint, LSP diagnostics, SAP syntax checks, and ATC |
140
+ | 🧩 | `cds-development` | CDS modeling, dependency inspection, and consumer impact analysis |
141
+ | 🚀 | `rap-development` | RAP business objects and service development |
142
+ | 🧭 | `sap-standard-api-analysis` | SAP standard capability, released API, CDS/RAP/OData, and fit-gap analysis before custom development |
143
+ | 🧱 | `clean-core-extensibility` | Clean Core, released extensibility, and side-by-side extension design with risk classification |
144
+ | 🔁 | `sap-sdlc-orchestration` | Requirement-to-release lifecycle planning, delegated implementation, quality gates, validation, and handover |
145
+ | 🐞 | `abap-debugging` | Dumps, logs, traces, and runtime failure diagnosis |
146
+ | 🔬 | `abap-runtime-analysis` | Incident triage, traces, debugger state, call graphs, and performance analysis |
147
+ | 🚀 | `rap-service-delivery` | RAP service activation, publication, OData validation, and end-to-end runtime checks |
148
+ | 🚚 | `sap-transport-release` | Dependency checks and transport preparation; release itself is intentionally unavailable here |
149
+
150
+ ## 🗺️ How it fits together
151
+
152
+ Each selected BAS destination becomes its own isolated MCP server identity. The MCP client discovers the live tools and schemas, the add-on routes calls to the correct VSP child, and VSP reaches SAP ADT through the selected BAS destination.
153
+
154
+ ## 🧰 Optional full-stack companion MCP servers
155
+
156
+ ABAP/RAP backend access is provided by this add-on's BAS/VSP proxy. For end-to-end SAP development, setup can also add managed companion MCP entries for frontend, CAP, and browser validation work:
157
+
158
+ ```sh
159
+ sap-ai-dev --setup --tools
160
+ ```
161
+
162
+ The companion entries are optional and are launched through `npx` only when the MCP client starts them. They are marked as managed by `sap-ai-dev-toolkit`, so rerunning setup can update or remove them without touching unrelated MCP servers.
163
+
164
+ | MCP entry | Package | Launches | Use when the agent needs to |
165
+ | --- | --- | --- | --- |
166
+ | `sap-fiori-tools` | `@sap-ux/fiori-mcp-server` | `fiori-mcp` | Generate or adapt Fiori elements/freestyle apps, annotations, and SAP Fiori UX artifacts |
167
+ | `ui5-tools` | `@ui5/mcp-server` | `ui5mcp` | Inspect SAPUI5/OpenUI5 projects, manifests, routing, views, controllers, and UI5-specific issues |
168
+ | `cap-tools` | `@cap-js/mcp-server` | `cds-mcp` | Inspect CAP CDS models, services, entities, actions, and local CAP application structure |
169
+ | `browser-validation` | `@playwright/mcp` | `playwright-mcp` | Open BAS previews, smoke-test Fiori/UI flows, collect screenshots, and verify browser runtime behavior |
170
+
171
+ Recommended profiles:
172
+
173
+ - **RAP + Fiori:** select your BAS destination plus `sap-fiori-tools`, `ui5-tools`, and `browser-validation`.
174
+ - **CAP on BTP:** select `cap-tools`, `sap-fiori-tools`, `ui5-tools`, and `browser-validation`.
175
+ - **UI-only:** select `sap-fiori-tools`, `ui5-tools`, and optionally `browser-validation`.
176
+
177
+ ## 💡 Example requests
178
+
179
+ Once the destination server is enabled in Copilot Chat, ask for outcomes instead of manually orchestrating individual SAP operations:
180
+
181
+ > Find every reference to `ZCL_ORDER`, explain the impact of changing method `CREATE_ORDER`, and show me the callers before editing anything.
182
+
183
+ > Fix the defect in `ZCL_PRICING`, add or update ABAP Unit coverage, run syntax checks and the available tests, and summarize exactly what passed or was skipped.
184
+
185
+ > Inspect the dependencies and downstream consumers of this CDS view and tell me what would be affected by renaming the field.
186
+
187
+ > Read company codes from `T001` for this destination and return `BUKRS`, `BUTXT`, `WAERS`, and `LAND1`.
188
+
189
+ > Check the current object's transport context, prepare the change for transport, but do not release anything.
190
+
191
+ ## 🔐 Enterprise-friendly safety model
192
+
193
+ | Guardrail | Behavior |
194
+ | --- | --- |
195
+ | 🎯 **Explicit target** | SAP changes only proceed when the destination and required target details are known. |
196
+ | 🚦 **Explicit state change** | Activation, service publication, and transport creation happen only when requested and authorized. |
197
+ | 🧪 **Verification first** | The agent uses available lint, syntax, unit-test, ATC, and diagnostics workflows and reports what actually ran. |
198
+ | 🔒 **SAP authorization remains authoritative** | The add-on does not bypass backend SAP permissions. |
199
+ | 🚚 **Full VSP tool surface** | The proxy exposes every tool registered by the active VSP child, including transport tools; SAP authorizations and VSP safety checks still apply. |
200
+ | 🧱 **Per-destination isolation** | Generated MCP entries are scoped to a single `BAS_VSP_DESTINATION`. |
201
+ | 🔑 **No credentials in `mcp.json`** | Authentication material stays in BAS destination configuration rather than MCP config. |
202
+
203
+ <a id="install"></a>
204
+
205
+ ## 📦 Installation
206
+
207
+ Install globally from a BAS dev space:
208
+
209
+ ```sh
210
+ npm install --global sap-ai-dev-toolkit
211
+ ```
212
+
213
+ If you previously installed the old package, remove it first because the legacy `bas-vsp-mcp` command is no longer shipped:
214
+
215
+ ```sh
216
+ npm uninstall --global bas-mcp-addon
217
+ npm install --global sap-ai-dev-toolkit
218
+ sap-ai-dev --setup
219
+ ```
220
+
221
+ The guided setup can also offer companion MCP entries with `sap-ai-dev --setup --tools`:
222
+
223
+ | Server | npm package | Best for |
224
+ | --- | --- | --- |
225
+ | SAP Fiori tools | `@sap-ux/fiori-mcp-server` | Fiori elements/freestyle apps, annotations, and UX guidance |
226
+ | UI5 tools | `@ui5/mcp-server` | SAPUI5/OpenUI5 project inspection, help, and lint/project support |
227
+ | CAP tools | `@cap-js/mcp-server` | CAP CDS/service model inspection and CAP app development |
228
+ | Browser validation | `@playwright/mcp` | Fiori/UI smoke tests, screenshots, and browser runtime validation |
229
+
230
+ The installer handles two setup tasks automatically:
231
+
232
+ - Looks for Go in `GO_BINARY`, `PATH`, or the package-local Go installation. If none is available, it downloads and installs the pinned supported Go release without prompting.
233
+ - Uses the package's checksum-verified patched VSP binary for the current platform. A remote download is the fallback only when the package has no bundled asset.
234
+
235
+ With `H2O_URL` set, an interactive install opens a checkbox picker with no destinations selected by default. Use **Space** to choose destinations and **Enter** to confirm. Press **a** to toggle all destinations (select all if any are unchecked; otherwise clear the selection). Confirming with none selected removes this add-on's managed MCP entries. When the `cf` CLI 8.18 or newer is authenticated to a targeted space, setup first offers an optional import from that space's Destination service; type **y** then **Enter** to include it, or press **Enter** to skip. Accepted CF and BAS destinations appear together in the picker. npm may run its install hook without an interactive terminal, even when the shell is interactive; in that case, selection is skipped without changing MCP config.
236
+
237
+ The setup report uses icons and terminal colors; set `NO_COLOR=1` to disable ANSI colors. The table is a weather report, not a bouncer: green **PASS** means the ADT probe responded, red **FAIL** means it failed, and yellow **SKIPPED** means it was skipped. Probe failures do not block MCP registration or startup for destinations you select.
238
+
239
+ Run `sap-ai-dev --setup` later to change the destination selection or remove generated destination entries. Run `sap-ai-dev --setup --tools` to also choose optional companion tools. Use `--npx` to make generated BAS/VSP destination entries start the pinned package through npm instead of relying on a global `sap-ai-dev` command; companion tools already use `npx` with their own npm packages.
240
+
241
+ If a setup step is skipped or fails, rerun it from an interactive BAS terminal:
242
+
243
+ ```sh
244
+ sap-ai-dev --setup
245
+ ```
246
+
247
+ To configure without a global install, run the guided setup directly through npm:
248
+
249
+ ```sh
250
+ npx --yes --ignore-scripts --package=sap-ai-dev-toolkit sap-ai-dev --setup --npx
251
+ ```
252
+
253
+ This lists discovered systems in the same checkbox picker, with nothing selected by default. Use **Space** to choose destinations, **Enter** to confirm, and **a** to toggle all (select all if any are unchecked; otherwise clear the selection). It writes MCP entries that launch the selected servers through npx. The entries pin the package version used during setup, and `--ignore-scripts` avoids running the install-time wizard a second time. After setup, in BAS run **MCP: List Servers**, select each chosen destination, and choose **Start Server**.
254
+
255
+ For a non-interactive installation or a platform without a published VSP asset, provide a trusted binary override:
256
+
257
+ ```sh
258
+ BAS_VSP_BINARY=/path/to/vsp npm install --global sap-ai-dev-toolkit
259
+ ```
260
+
261
+ At the end of a global install, the color-coded summary shows the MCP config path, each generated entry name, destination/client/authentication, launch command, and environment key names (not values). The installer does not open an editor automatically; in BAS/VS Code:
262
+
263
+ 1. Open the Command Palette.
264
+ 2. Run **MCP: List Servers**.
265
+ 3. Select the generated server name shown in the report and choose **Start Server**.
266
+ 4. Use **MCP: Open User Configuration** to inspect or edit the generated entries. Each entry is isolated to its destination.
267
+
268
+ <a id="copilot-agent"></a>
269
+
270
+ ## 🤖 GitHub Copilot ABAP agents and skills
271
+
272
+ The package includes four user-invocable custom agents (**SAP Solution Architect**, **ABAP Developer**, **ABAP Runtime Debugger**, and **RAP Service Developer**) and eleven task-focused Agent Skills for GitHub Copilot in BAS.
273
+
274
+ ### 🧠 How the SAP Solution Architect and ABAP Developer agents work
275
+
276
+ 1. **Start with architecture when requirements are open-ended.** Use **SAP Solution Architect** to investigate the SAP system, evaluate SAP standard solutions, recommend released APIs, apply Clean Core and side-by-side extensibility, create the solution design, and orchestrate the SDLC through implementation work packages and validation gates.
277
+ 2. **Understand the request.** Establish the expected behavior and, for SAP changes, the destination, package, and transport or temporary target. Ask only when a material detail is missing.
278
+ 3. **Inspect before editing.** Read relevant source, tests, callers, dependencies, standard APIs, release state, and conventions; query the active MCP server's live `tools/list` and use its exact destination-prefixed tools and schemas.
279
+ 4. **Implement with behavior in mind.** Add or refine an ABAP Unit assertion first when an executable regression test is available, then make the smallest change that meets the request.
280
+ 5. **Verify with available checks.** Use `LintABAP` for caller-supplied source, BAS editor LSP diagnostics when configured, and SAP `SyntaxCheck`, `RunUnitTests`, and `RunATCCheck` when exposed and relevant. Lint and syntax checks do not replace behavior tests.
281
+ 6. **Protect SAP state.** Only make requested changes. Activate objects or publish services only when asked; create transports only when explicitly authorized. Release and deletion of transports are unavailable through this add-on.
282
+ 7. **Report observed results.** Summarize architecture decisions, changed objects, implementation handoff or actual validation, activation, and publication outcomes. Identify skipped checks and exact blockers; never claim a check passed if it did not run.
283
+
284
+ ### 🧩 Included Agent Skills
285
+
286
+ | | Skill | Focus |
287
+ | --- | --- | --- |
288
+ | 🧑‍💻 | `abap-development` | Implement and refactor ABAP reports, classes, interfaces, and function groups. |
289
+ | ✅ | `abap-testing-quality` | ABAP Unit behavior tests, lint, LSP diagnostics, syntax checks, and ATC. |
290
+ | 🧩 | `cds-development` | Model CDS definitions and inspect dependencies and consumers. |
291
+ | 🚀 | `rap-development` | Build RAP business objects and services; publish only when requested. |
292
+ | 🧭 | `sap-standard-api-analysis` | Assess SAP standard capabilities, released APIs, CDS/RAP/OData options, and fit-gap before custom code. |
293
+ | 🧱 | `clean-core-extensibility` | Design Clean Core compliant in-app, developer, API/event, and side-by-side extension patterns. |
294
+ | 🔁 | `sap-sdlc-orchestration` | Orchestrate discovery, design, implementation handoffs, quality gates, transport readiness, and handover. |
295
+ | 🐞 | `abap-debugging` | Diagnose dumps, application logs, traces, and runtime failures. |
296
+ | 🔬 | `abap-runtime-analysis` | Analyze incidents, traces, debugger state, call graphs, and performance symptoms. |
297
+ | 🚀 | `rap-service-delivery` | Validate RAP service bindings, activation, publication, and end-to-end OData behavior. |
298
+ | 🚚 | `sap-transport-release` | Check dependencies and prepare changes for transport; release is not available here. |
299
+
300
+ ### 📥 Install for your BAS user
301
+
302
+ After destination setup, the installer prints a 🤖 notice that it is waiting for confirmation, then offers to install the bundled agents and all eleven skills under `$HOME/.copilot`. Press **Enter** to install; type **n** then **Enter** to skip. Declining leaves those files unchanged.
303
+
304
+ These user-level customizations are available across workspaces opened by the same BAS user in the same dev space. Copilot must be available in BAS and may need a window reload to discover new files. A non-interactive install skips the optional prompt; `npm install --ignore-scripts` skips the postinstall wizard entirely.
305
+
306
+ On reinstall or package upgrade, unchanged add-on-managed files are updated. Existing customizations and files edited since the previous install are preserved; postinstall reports paths that need manual review instead of overwriting them.
307
+
308
+ ### 🗂️ Add the agents and skills to a repository
309
+
310
+ To commit repository-scoped customizations, copy the packaged files from the BAS workspace root without overwriting existing files:
311
+
312
+ ```sh
313
+ ADDON_ROOT="$(npm root -g)/sap-ai-dev-toolkit"
314
+ mkdir -p .github/agents .github/skills
315
+ cp -n "$ADDON_ROOT/.github/agents/"*.agent.md .github/agents/
316
+ cp -Rn "$ADDON_ROOT/.github/skills/." .github/skills/
317
+ ```
318
+
319
+ Review skipped or conflicting files and merge changes manually. `LintABAP` analyzes caller-supplied source in memory; it does not read workspace files. `vsp lsp --stdio` supplies editor diagnostics separately and does not appear in `tools/list`.
320
+
321
+ <a id="bas"></a>
322
+
323
+ ## 🧭 BAS setup
324
+
325
+ `sap-ai-dev --setup` reads BAS destination names from `H2O_URL/api/listDestinations`, then gives each destination's `/sap/bc/adt/discovery` endpoint a quick knock through the BAS proxy. HTTP 2xx, 401, and 403 count as reachable; other responses and network failures are reported but do not exclude discovered destinations from the selection list or prevent startup when selected.
326
+
327
+ If the `cf` CLI is version 8.18 or newer and authenticated to a targeted space, setup offers an opt-in import from that space's SAP Destination service. It does not create service keys unless you accept. The imported records are limited to the current space and are merged with BAS destinations for selection. OnPremise destinations require choosing a Connectivity service instance; runtime traffic uses that service's proxy, and PrincipalPropagation uses the current CF user's token. Internet destinations use the configured HTTP(S) proxy environment. Setup stores only service-instance/key references in `mcp.json`, not the service-key credentials. At runtime the generated entry verifies the active CF space and resolves those references. Setup removes an add-on-created key only when no remaining CF entry references it and the CLI is targeted to the key's recorded space; keys are left untouched when the space cannot be verified.
328
+ Cloud Foundry HTTP destination probes use forward-form HTTP requests, not CONNECT tunnels; SAP Connectivity requires HTTP from the application to its proxy. OnPremise requests are canceled when the client disconnects or the runtime route closes.
329
+
330
+ Interactive npm install and `sap-ai-dev --setup` both use a checkbox picker with no destinations selected by default. Use **Space** to choose destinations, **Enter** to confirm, and **a** to toggle all (select all if any are unchecked; otherwise clear the selection). Confirming with none checked removes this package's generated MCP entries. Non-interactive installs skip destination selection without changing MCP config. Run the interactive setup command above; add `--npx` when the package is not installed globally.
331
+
332
+ Setup tidies its own footprint: it reconciles MCP entries managed by this package and removes legacy `sapAiDev_*` / `basVspMcp_*` entries from earlier releases. Existing unrelated MCP servers and top-level configuration such as `inputs` stay untouched.
333
+
334
+ ### 🌐 BAS destination example
335
+
336
+ First, give BAS a route to your backend: create the destination in **BTP Cockpit → Connectivity → Destinations** in the subaccount where BAS runs.
337
+
338
+ The sample values sketch an on-premise ABAP backend routed through SAP Cloud Connector; swap in the URL, proxy type, and authentication configured for your landscape.
339
+
340
+ | Destination field | Example | Notes |
341
+ | --- | --- | --- |
342
+ | `Name` | `DEMO_ABAP` | Unique BAS destination name. It becomes both `BAS_VSP_DESTINATION` and the generated MCP server name. |
343
+ | `Type` | `HTTP` | ADT is an HTTP service. |
344
+ | `URL` | `https://abap.example.com:44300` | Backend URL exposed through the configured route. |
345
+ | `Proxy Type` | `OnPremise` | Use `OnPremise` for Cloud Connector; use `Internet` for a directly reachable public endpoint. |
346
+ | `Authentication` | `PrincipalPropagation` | Example only; choose an authentication method configured for the backend and Cloud Connector. |
347
+ | `sap-client` | `100` | SAP client to target. The add-on defaults to `001` if omitted. |
348
+ | `HTML5.DynamicDestination` | `true` | BAS destination property shown in the supplied sample. |
349
+ | `WebIDEEnabled` | `true` | Exposes the destination to BAS development tools. |
350
+ | `WebIDEUsage` | `dev_abap,odata_abap` | Include `dev_abap` for ABAP development; add other usages required by your BAS scenario. |
351
+ | `CloudConnectorLocationId` | `DEMO-LOCATION` | Optional; set only when the Cloud Connector uses a location ID. |
352
+
353
+ For on-premise systems, configure Cloud Connector access to the backend host and port first. Keep credentials and authentication material in the BAS destination configuration; never put them in `mcp.json`.
354
+
355
+ Think of `H2O_URL` as BAS's front door: it must point to the endpoint serving `/api/listDestinations`, not to the SAP backend.
356
+
357
+ The `/api/listDestinations` response is a JSON array of destination records, like the provided `dests.sample.json`. A representative record:
358
+
359
+ ```json
360
+ {
361
+ "Type": "HTTP",
362
+ "HTML5.DynamicDestination": "true",
363
+ "Authentication": "PrincipalPropagation",
364
+ "WebIDEEnabled": "true",
365
+ "ProxyType": "OnPremise",
366
+ "sap-client": "100",
367
+ "Name": "DEMO_ABAP",
368
+ "WebIDEUsage": "dev_abap,odata_abap",
369
+ "Host": "https://abap.example.com:44300",
370
+ "WebIDEExposedHost": "abap.example.com:44300"
371
+ }
372
+ ```
373
+
374
+ The BAS editor calls the backend address URL; the sample-style list response may report it as `Host`. Discovery needs a non-empty `Name`, reads `Authentication` and `sap-client` case-insensitively, and accepts these fields either at the record root or under `Properties`.
375
+
376
+ A destination name must start with a letter or digit and contain only letters, digits, `.`, `_`, or `-`.
377
+
378
+ The add-on probes `http://<Name>.dest/sap/bc/adt/discovery` through the BAS proxy. HTTP 2xx, 401, and 403 mean the ADT endpoint is reachable; other responses and network errors are reported but do not exclude a discovered destination from the selection list.
379
+
380
+ `WebIDEEnabled`, `WebIDEUsage`, `HTML5.DynamicDestination`, and returned host fields are BAS metadata, not filters used by this probe.
381
+
382
+ See SAP Help: **Create a Destination to Connect to SAP Business Application Studio** and **Creating a Destination to an ABAP System for BAS**.
383
+
384
+ ### 🔌 Generated MCP server entry
385
+
386
+ One selected system, one isolated stdio MCP entry. Here's the shape:
387
+
388
+ ```json
389
+ {
390
+ "type": "stdio",
391
+ "command": "sap-ai-dev",
392
+ "env": {
393
+ "H2O_URL": "https://bas.example.com",
394
+ "BAS_VSP_DESTINATION": "DEMO_ABAP",
395
+ "SAP_ALLOW_TRANSPORTABLE_EDITS": "true"
396
+ },
397
+ "BAS_EXT": "true"
398
+ }
399
+ ```
400
+
401
+ The MCP protocol `serverInfo.name` matches `BAS_VSP_DESTINATION`, so each wizard-generated destination has its own identity instead of the shared `sap-ai-dev-toolkit` name.
402
+
403
+ Credentials, cookies, SAP usernames, passwords, and raw BAS destination payloads are not written to the MCP configuration.
404
+
405
+ ### ⚙️ MCP configuration location
406
+
407
+ The configuration path is selected in this order:
408
+
409
+ 1. `SAP_AI_DEV_MCP_CONFIG`, when set.
410
+ 2. `BAS_VSP_MCP_CONFIG`, when set for compatibility with earlier releases.
411
+ 3. An existing MCP user configuration detected automatically.
412
+ 4. The default MCP user configuration location.
413
+
414
+ Set `SAP_AI_DEV_MCP_CONFIG` to use a specific configuration file:
415
+
416
+ ```sh
417
+ SAP_AI_DEV_MCP_CONFIG="/path/to/mcp.json" sap-ai-dev --setup
418
+ ```
419
+
420
+ The file must be strict JSON with an object-valued `servers` property. Existing malformed or incompatible files are rejected without overwriting them.
421
+
422
+ ### 🛠️ Commands
423
+
424
+ | Need | Command |
425
+ | --- | --- |
426
+ | See options without starting the MCP server | `sap-ai-dev --help` |
427
+ | Walk through setup interactively | `sap-ai-dev --setup` |
428
+ | See discovered systems and probe results | `sap-ai-dev --list-destinations` |
429
+ | Get the same report in machine-readable, redacted form | `sap-ai-dev --list-destinations --json` |
430
+ | Check availability without starting the server | `sap-ai-dev --check` |
431
+
432
+ With `H2O_URL` set, the normal command starts the MCP proxy. Each generated entry supplies one `BAS_VSP_DESTINATION`, so each server stays in its own lane and exposes only its selected SAP system.
433
+
434
+ The proxy exposes every VSP tool registered by the installed VSP mode, plus local `LintABAP` and the convenience `GetApplicationLog` mapping. It enables transport support and transportable source edits in generated MCP entries. Direct VSP invocation remains unchanged.
435
+
436
+ Without `H2O_URL`, the command passes arguments directly to the installed VSP binary—no BAS proxy detour.
437
+
438
+ ### 🔄 How an MCP tool call reaches SAP
439
+
440
+ `sap-ai-dev` is an MCP stdio server and destination router, not a terminal command for individual SAP operations. No shell incantations needed: your MCP client discovers the tools, picks one for the chat request, and sends the call over stdio.
441
+
442
+ Each generated MCP server entry uses its BAS destination name verbatim: `DEMO_ABAP` stays `DEMO_ABAP`. Tool names use the normalized destination slug instead, so the prefix is `demo-abap` (`demo-abap__GetSource`, `demo-abap__RunQuery`, `demo-abap__LintABAP`). Use the exact names shown by your MCP client; punctuation can change during slugification.
443
+
444
+ The proxy keeps VSP tool descriptions and input schemas, then adds the destination label. `LintABAP` is the exception: it is implemented locally and uses the shared input schema shown by `tools/list`. It lints only submitted source in memory; it does not read the workspace, call SAP, or load configured external dependencies. Supply every dependency source file in `files`. The live `tools/list` result remains the source of truth for the installed VSP binary's exact schemas.
445
+
446
+ <a id="tools"></a>
447
+
448
+ ## 🧰 Tool catalog
449
+
450
+ From read-only inspection to controlled SAP changes. The catalog is organized by developer intent so you can quickly see what the agent can inspect, query, validate, edit, activate, or prepare for transport.
451
+
452
+ The menu includes the existing curated VSP tools, additions listed in `tools.md` when registered by the active VSP mode, the `GetApplicationLog` mapping, and local `LintABAP`. Focused mode may omit `ActivateMultiple`, `GetUserTransports`, and `GetTransportInfo`; the live `tools/list` result remains authoritative.
453
+
454
+ ### 🧹 Lint submitted ABAP source locally
455
+
456
+ The per-destination tool name is `<destination-slug>__LintABAP`, for example `demo-abap__LintABAP`. It accepts caller-supplied abapGit-serialized source files; config is optional and, when present, is the full abaplint configuration rather than a merge with defaults.
457
+
458
+ ```json
459
+ {
460
+ "files": [
461
+ {
462
+ "filename": "zdemo.prog.abap",
463
+ "source": "REPORT zdemo.\nWRITE 'Hello'."
464
+ }
465
+ ]
466
+ }
467
+ ```
468
+
469
+ `files` must be a nonempty array of `{ "filename": string, "source": string }` entries. The basename follows `<object>.<type>.<extension>`, such as `zcl_demo.clas.abap`. If the code depends on other objects, include those sources in the same `files` array; the tool does not resolve `config.dependencies`, read local files, make network requests, or contact SAP.
470
+
471
+ The single text item in the MCP result contains JSON: `{ "status": "clean" | "issues", "filesChecked": number, "issueCount": number, "errors": number, "warnings": number, "infos": number, "issues": [...] }`. Each issue reports filename, rule, severity, message, and start/end positions with line and column. Lint findings—including Error-severity findings—are reports, not MCP tool-call errors.
472
+
473
+ ### 🔎 Find and understand ABAP objects
474
+
475
+ | Tool | What it does |
476
+ | --- | --- |
477
+ | `GetSource` | Read source for programs, classes, interfaces, function modules and groups, includes, CDS, and supported RAP/DDIC objects. |
478
+ | `SearchObject` | Find repository objects by name or wildcard query. |
479
+ | `GrepObjects` | Search regular expressions across specified object URLs. |
480
+ | `GrepPackages` | Search regular expressions in one or more packages, optionally including subpackages. |
481
+ | `FindDefinition` | Locate a symbol's definition from source text and a position. |
482
+ | `FindReferences` | Find references to an object or a symbol. |
483
+ | `GetContext` | Summarize public signatures of source dependencies for code review. |
484
+ | `CompareSource` | Compare two objects and return a unified diff. |
485
+ | `GetClassInfo` | Inspect class methods, attributes, interfaces, and inheritance metadata. |
486
+ | `GetPackage` | Read package details. |
487
+ | `GetAPIReleaseState` | Check whether an object is released for S/4HANA Clean Core / ABAP Cloud development; use the URI returned by `SearchObject`. |
488
+ | `GetFunctionGroup` | Read function-group source. |
489
+ | `GetMessages` | Read the messages defined by an ABAP message class (SE91). |
490
+ | `GetInactiveObjects` | List objects changed by the current user but not yet activated. |
491
+
492
+ ### 🗃️ Read SAP tables and metadata
493
+
494
+ | Tool | What it does |
495
+ | --- | --- |
496
+ | `GetTable` | Read an ABAP Dictionary table's structure. |
497
+ | `GetTableContents` | Read table rows, optionally with an ABAP SQL filter and row limit. |
498
+ | `RunQuery` | Run a freestyle ABAP SQL query against the SAP database. |
499
+ | `GetCDSDependencies` | Follow a CDS view's forward dependencies to its sources. |
500
+ | `GetCDSImpactAnalysis` | Find downstream consumers of a CDS view (reverse dependencies). |
501
+ | `GetCDSElementInfo` | Read CDS element names, types, annotations, and semantic metadata. |
502
+
503
+ `RunQuery` uses ABAP SQL, not generic SQL. Use `max_rows` instead of `LIMIT`; for ordering use `ASCENDING` or `DESCENDING`, not `ASC` or `DESC`.
504
+
505
+ SAP authorizations and the destination's available APIs still apply.
506
+
507
+ ### ✍️ Create, update, and activate
508
+
509
+ | Tool | What it does |
510
+ | --- | --- |
511
+ | `WriteSource` | Create or update supported ABAP source objects; detects create versus update in upsert mode. |
512
+ | `EditSource` | Replace a specific source fragment; syntax checking is enabled by default. |
513
+ | `CreatePackage` | Create a package; transportable packages need a transport and software component. |
514
+ | `CreateTable` | Create a transparent DDIC table from a JSON field definition. |
515
+ | `SyntaxCheck` | Ask SAP to syntax-check source before saving or activation. |
516
+ | `Activate` | Activate one named ABAP object. |
517
+ | `ActivatePackage` | Activate inactive objects in dependency order. If package is omitted, it can activate all inactive objects for the current user. |
518
+ | `ActivateMultiple` | Activate related objects together while resolving mutual dependencies, such as an include and its main program. |
519
+
520
+ The write, create, and activation tools change SAP state. Confirm the target, package, and transport before using them. `EditSource` performs a focused replacement; its default syntax check prevents saving when syntax errors are reported.
521
+
522
+ ### ✅ Test and inspect the system
523
+
524
+ | Tool | What it does |
525
+ | --- | --- |
526
+ | `RunUnitTests` | Run ABAP Unit tests for an object; dangerous and long-running tests are excluded by default. |
527
+ | `RunATCCheck` | Run an ABAP Test Cockpit check and return findings. |
528
+ | `GetSystemInfo` | Read system ID, SAP release, kernel, and database details. |
529
+ | `GetInstalledComponents` | List installed software components and versions. |
530
+ | `GetFeatures` | Probe optional system capabilities, including abapGit, RAP/OData, AMDP debugging, UI5/BSP, and CTS transports. |
531
+ | `PrettyPrint` | Format ABAP source text without saving it to SAP. |
532
+
533
+ ### 🚚 Inspect and create transports
534
+
535
+ | Tool | What it does |
536
+ | --- | --- |
537
+ | `ListTransports` | List a user's transport requests with optional status, type, source, date, and grouping filters. |
538
+ | `GetUserTransports` | Read and group a user's transport requests and tasks; supports organizer filters and source selection. |
539
+ | `GetTransport` | Read a transport request's details, objects, and tasks. |
540
+ | `GetTransportInfo` | Find eligible transports and lock status for an ABAP object or package. |
541
+ | `CreateTransport` | Create a transport request. |
542
+ | `ReleaseTransport` | Release a transport request when registered by VSP and authorized in SAP. |
543
+ | `DeleteTransport` | Delete a transport request when registered by VSP and authorized in SAP. |
544
+
545
+ The proxy starts VSP with `--enable-transports` and omits `--transport-read-only`. Generated MCP entries set `SAP_ALLOW_TRANSPORTABLE_EDITS=true` so source edits in transportable packages are permitted. VSP safety checks and SAP authorizations still apply.
546
+
547
+ ### 📜 Read SAP application logs (SLG1)
548
+
549
+ | Tool | What it does |
550
+ | --- | --- |
551
+ | `GetApplicationLog` | Extract newest-first application log entries, optionally including message details and texts. |
552
+
553
+ - Filter by program, user, object, subobject, from, and to.
554
+ - `max_results` defaults to 100. Date-only `to` values include the full day.
555
+ - `messages: true` adds BALDAT details and T100 message text; otherwise, the tool returns log headers only.
556
+ - The proxy maps this convenience tool to the single `SAP(action="analyze", type="application_log")` operation. The general-purpose `SAP` router is also exposed when VSP registers it.
557
+
558
+ The proxy exposes all tools registered by the child VSP process. The object deletion, debugger, trace, general-purpose SAP router, and transport tools are callable when VSP registers them. Direct VSP invocation without `H2O_URL` retains the VSP binary's own tool surface.
559
+
560
+ ### 🚀 Ready to put the tools to work from chat?
561
+
562
+ 1. Start the generated server in BAS with **MCP: List Servers**.
563
+ 2. In the Chat tools picker, enable the server for the destination you want.
564
+ 3. Ask for the operation in plain language. The MCP client sends `tools/call`; no need to type a tool such as `GetSource` into a terminal.
565
+ 4. Check the response in chat. For source edits, ask for a syntax check and tests before activation when that matches your workflow.
566
+
567
+ For a quick table read—say, company codes from `T001`—select the destination's `RunQuery` tool (for `DEMO_ABAP`, `demo-abap__RunQuery`) and pass:
568
+
569
+ ```json
570
+ {
571
+ "sql_query": "SELECT BUKRS, BUTXT, WAERS, LAND1 FROM T001",
572
+ "max_rows": 100
573
+ }
574
+ ```
575
+
576
+ The same request can be expressed to an MCP client as:
577
+
578
+ ```json
579
+ {
580
+ "jsonrpc": "2.0",
581
+ "id": 2,
582
+ "method": "tools/call",
583
+ "params": {
584
+ "name": "demo-abap__RunQuery",
585
+ "arguments": {
586
+ "sql_query": "SELECT BUKRS, BUTXT, WAERS, LAND1 FROM T001",
587
+ "max_rows": 100
588
+ }
589
+ }
590
+ }
591
+ ```
592
+
593
+ Use the name returned by `tools/list` instead of copying the example name. For a plain table read, `GetTableContents` requires `table_name` and accepts `max_rows`; `RunQuery` requires `sql_query` and accepts `max_rows` or `all_rows`.
594
+
595
+ To read a class implementation, select `GetSource` and pass:
596
+
597
+ ```json
598
+ {
599
+ "object_type": "CLAS",
600
+ "name": "ZCL_ORDER",
601
+ "include": "implementations"
602
+ }
603
+ ```
604
+
605
+ The MCP client discovers the schemas; callers do not need to memorize every argument. For example, `GetSource` requires `object_type` and `name`, while `GrepPackages` requires `packages` and `pattern`. Inspect the live schema before calling an unfamiliar tool.
606
+
607
+ ### 🔍 Inspect installed servers and tools
608
+
609
+ | What to inspect | How |
610
+ | --- | --- |
611
+ | Add-on command options | `sap-ai-dev --help` |
612
+ | BAS destinations and probe status | `sap-ai-dev --list-destinations --json` |
613
+ | Destination availability only | `sap-ai-dev --check` |
614
+ | Generated server names and destination mapping | **MCP: Open User Configuration**; look for entries named after the BAS destination and `BAS_VSP_DESTINATION`. |
615
+ | Running server | **MCP: List Servers**; select the server and choose **Start Server**. |
616
+ | Tools and exact schemas | Expand that server in the Chat tools picker. At the protocol level, MCP clients request `tools/list`, whose entries include `name`, `description`, and `inputSchema`. |
617
+ | Runtime and tool-call logs | Select the MCP server in the Output view. Startup, call lifecycle, and child stderr logs are written to stderr; child MCP log notifications are forwarded to the client. Tool arguments and result contents are not logged. |
618
+ | Installed package version | `npm list --global sap-ai-dev-toolkit` |
619
+
620
+ After MCP initialization, a raw inspection request has this shape (normally sent by the client, not typed into the terminal):
621
+
622
+ ```json
623
+ {"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}
624
+ ```
625
+
626
+ The response contains a `tools` array. A `RunQuery` entry resembles this excerpt; the actual description may include more detail:
627
+
628
+ ```json
629
+ {
630
+ "name": "demo-abap__RunQuery",
631
+ "description": "Execute an ABAP SQL query [destination: DEMO_ABAP]",
632
+ "inputSchema": {
633
+ "type": "object",
634
+ "properties": {
635
+ "sql_query": { "type": "string" },
636
+ "max_rows": { "type": "number" },
637
+ "all_rows": { "type": "boolean" }
638
+ },
639
+ "required": ["sql_query"]
640
+ }
641
+ }
642
+ ```
643
+
644
+ `--list-destinations` reports discovery and probe status; it does not list the MCP tools. Use the MCP client tool picker or its `tools/list` inspection for that. stdout is reserved for MCP protocol messages while the server is running, so do not pipe the normal server command to a shell JSON formatter.
645
+
646
+ ### 🔧 Environment variables
647
+
648
+ | Variable | Purpose |
649
+ | --- | --- |
650
+ | `H2O_URL` | BAS endpoint used to discover destinations. Required for BAS discovery. |
651
+ | `BAS_VSP_DESTINATION` | Comma-separated destination allowlist for normal runtime discovery. Setup clears this temporarily so it can display all eligible systems. |
652
+ | `BAS_VSP_MODE` | VSP child mode (`expert` by default; `focused` omits `ActivateMultiple`, `GetUserTransports`, and `GetTransportInfo`). The proxy exposes its curated tools plus tools listed in `tools.md` when registered by that mode, including local `LintABAP`. |
653
+ | `SAP_ALLOW_TRANSPORTABLE_EDITS` | Generated MCP entries set this to `true` to permit source edits in transportable packages; VSP safety checks and SAP authorizations still apply. |
654
+ | `SAP_AI_DEV_MCP_CONFIG` | Explicit MCP user configuration path. |
655
+ | `BAS_VSP_MCP_CONFIG` | Backward-compatible alias for the MCP user configuration path. |
656
+ | `BAS_VSP_BINARY` | Trusted prebuilt VSP executable; skips Go and binary provisioning. |
657
+ | `BAS_VSP_BINARY_URL` | Alternate VSP binary download URL. |
658
+ | `BAS_VSP_CACHE_DIR` | Binary cache directory. |
659
+ | `GO_BINARY` | Explicit Go executable used for provisioning when automatic Go installation is unavailable. |
660
+ | `BAS_VSP_SKIP_PROBE=true` | Skip destination probes; useful for controlled diagnostics or fixtures. |
661
+ | `HTTP_PROXY` / `HTTPS_PROXY` | BAS proxy settings used for destination-list requests, destination probing, and child processes. |
662
+ | `NO_PROXY` | Proxy bypass list for BAS destination-list requests; `.dest` hosts remain routed through the BAS proxy. |
663
+
664
+ <a id="troubleshooting"></a>
665
+
666
+ ## 🩺 Troubleshooting
667
+
668
+ No systems on the list? Start at BAS's front door and check the destination names:
669
+
670
+ ```sh
671
+ curl "$H2O_URL/api/listDestinations"
672
+ sap-ai-dev --list-destinations --json
673
+ ```
674
+
675
+ Next, check that the backend answers at `/sap/bc/adt`.
676
+
677
+ Runtime diagnostics take the stderr lane. In the MCP server's Output view, check per-destination ADT probe status, VSP child stderr, and failed tool-call details; stdout is reserved for MCP protocol messages.
678
+
679
+ If automatic Go or VSP provisioning fails, check network access and the package's supported platform. You can install Go manually or set `GO_BINARY` as an explicit fallback. A trusted prebuilt VSP can be supplied with `BAS_VSP_BINARY`.
680
+
681
+ ## 🧑‍💻 Development
682
+
683
+ Run the built-in Node.js test suite:
684
+
685
+ ```sh
686
+ npm test
687
+ ```
688
+
689
+ The package repository is [grknylmz/sap-ai-dev-toolkit](https://github.com/grknylmz/sap-ai-dev-toolkit).
690
+
691
+ ## 🚀 Publishing to npm
692
+
693
+ The package publisher reads `NPM_PUBLISH_TOKEN` from the root `.env` file (already gitignored) or from the environment. Create `.env` with a publish-capable npm token:
694
+
695
+ ```sh
696
+ NPM_PUBLISH_TOKEN=npm_...
697
+ ```
698
+
699
+ - `npm run publish:npm` publishes the version already set in `package.json`.
700
+ - To publish a patch bump, run `npm run publish:npm -- --patch`; it updates `package.json` and `package-lock.json` before publishing. If publishing fails after the bump, retry without `--patch`.
701
+ - Preview the package without publishing or changing its version with `npm run publish:npm -- --dry-run`.
702
+
703
+ The token is not printed or stored in the repository.
704
+
705
+ ## 📄 Acknowledgements and licenses
706
+
707
+ The original SAP AI Development Toolkit code and project changes are copyright (c) 2026 Gurkan Yilmaz and released under the MIT License. Everyone may use, copy, modify, distribute, sublicense, and sell copies, provided the copyright and license notices are retained; the software is provided without warranty. See `LICENSE`. Bundled VSP and third-party components retain their own licenses and notices in `NOTICE` and `LICENSE-APACHE-2.0.txt`.
708
+
709
+ This add-on bundles patched binaries from Vibing Steampunk (VSP), created by Alice Vinogradova and contributors. The binaries are built from upstream commit `9886d27`; this repository's BAS proxy-auth patch is in `patches/vsp-bas-proxy-auth.patch`.
710
+
711
+ Thanks to the VSP maintainers for the ADT/MCP implementation.
712
+
713
+ VSP is MIT-licensed. It permits use, modification, redistribution, and sale, provided the copyright and license notice are retained. It is permissive, not copyleft, and disclaims warranty.
714
+
715
+ The upstream VSP NOTICE identifies `open-rfc-go` and `open-rfc` under Apache-2.0. Redistributors must include the license and preserve applicable notices. Apache-2.0's patent license terminates if a recipient initiates patent litigation alleging that the work infringes; it grants no general trademark rights.
716
+
717
+ This package includes the upstream VSP license and notices, plus the Apache-2.0 license text, in `LICENSE`, `NOTICE`, and `LICENSE-APACHE-2.0.txt`. The upstream notice records other Go-module licenses in VSP's `go.mod` and `go.sum`; this is not a full audit of every transitive dependency.
718
+
719
+ License sources:
720
+
721
+ - VSP `LICENSE`
722
+ - VSP `NOTICE`
723
+ - Apache License 2.0