@abapify/adt-mcp 0.4.34 → 0.4.37
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 +15 -711
- package/dist/bin/adt-mcp-http.mjs +119 -119
- package/dist/bin/adt-mcp-http.mjs.map +1 -1
- package/dist/bin/adt-mcp.mjs +1 -1
- package/dist/index.d.mts +9 -9
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{server-ClzRW10R.mjs → server-BW9yBxNy.mjs} +140 -108
- package/dist/server-BW9yBxNy.mjs.map +1 -0
- package/dist/{server-BgM8hx8V.mjs → server-Dylu87TZ.mjs} +400 -355
- package/dist/server-Dylu87TZ.mjs.map +1 -0
- package/package.json +16 -16
- package/dist/server-BgM8hx8V.mjs.map +0 -1
- package/dist/server-ClzRW10R.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,734 +1,38 @@
|
|
|
1
1
|
# @abapify/adt-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@abapify/adt-mcp)
|
|
4
|
+
[](https://github.com/abapify/adt-cli/blob/main/LICENSE)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
MCP server for SAP ADT operations – exposes adt-cli features as MCP tools.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
| -------------- | --------------------------- | --------------------------------------------------------- |
|
|
9
|
-
| `adt-mcp` | stdio (JSON-RPC over pipes) | Stateless — connection-per-call. |
|
|
10
|
-
| `adt-mcp-http` | Streamable HTTP | Session-scoped cached `AdtClient`, locks, and changesets. |
|
|
11
|
-
|
|
12
|
-
See [`docs/deployment/mcp-http.md`](../../docs/deployment/mcp-http.md) for the complete HTTP deployment guide (Docker, Okta, multi-system, troubleshooting). The rest of this README focuses on stdio.
|
|
13
|
-
|
|
14
|
-
## Quick Start (stdio)
|
|
8
|
+
## Install
|
|
15
9
|
|
|
16
10
|
```bash
|
|
17
|
-
|
|
18
|
-
npx @abapify/adt-mcp
|
|
11
|
+
npm install -g @abapify/adt-mcp
|
|
19
12
|
```
|
|
20
13
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or the equivalent path on your OS:
|
|
14
|
+
## Usage
|
|
24
15
|
|
|
25
16
|
```json
|
|
26
17
|
{
|
|
27
18
|
"mcpServers": {
|
|
28
|
-
"adt": {
|
|
29
|
-
"command": "npx",
|
|
30
|
-
"args": ["@abapify/adt-mcp"]
|
|
31
|
-
}
|
|
19
|
+
"adt": { "command": "npx", "args": ["@abapify/adt-mcp"] }
|
|
32
20
|
}
|
|
33
21
|
}
|
|
34
22
|
```
|
|
35
23
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Add to `.vscode/mcp.json` in your workspace, or to your user settings under `"mcp"`:
|
|
39
|
-
|
|
40
|
-
```json
|
|
41
|
-
{
|
|
42
|
-
"servers": {
|
|
43
|
-
"adt": {
|
|
44
|
-
"type": "stdio",
|
|
45
|
-
"command": "npx",
|
|
46
|
-
"args": ["@abapify/adt-mcp"]
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Configure in Cursor / Windsurf
|
|
53
|
-
|
|
54
|
-
Add to your MCP server list:
|
|
55
|
-
|
|
56
|
-
```json
|
|
57
|
-
{
|
|
58
|
-
"mcpServers": {
|
|
59
|
-
"adt": {
|
|
60
|
-
"command": "npx",
|
|
61
|
-
"args": ["@abapify/adt-mcp"]
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## HTTP transport (since Wave 1)
|
|
70
|
-
|
|
71
|
-
`adt-mcp-http` is the Streamable HTTP entry-point. It targets shared / remote deployments (Docker, Kubernetes, Kiro, teams).
|
|
72
|
-
|
|
73
|
-
Minimal run:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
bunx nx build adt-mcp
|
|
77
|
-
node packages/adt-mcp/dist/bin/adt-mcp-http.mjs --port 3000 --auth-token "$(openssl rand -hex 32)"
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Minimal smoke test:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
TOKEN=<your token>
|
|
84
|
-
curl -sf http://127.0.0.1:3000/healthz
|
|
85
|
-
curl -H "Authorization: Bearer $TOKEN" \
|
|
86
|
-
-H 'Content-Type: application/json' \
|
|
87
|
-
-X POST http://127.0.0.1:3000/mcp \
|
|
88
|
-
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"demo","version":"0"}}}'
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Capture the `Mcp-Session-Id` response header, then call `sap_connect`, the tools you need, and finally `sap_disconnect` — or close the transport to trigger cleanup automatically.
|
|
92
|
-
|
|
93
|
-
**Auth modes:** `none` (dev / loopback), `bearer` (shared secret), `proxy` (trust `x-forwarded-user` from an upstream proxy), `oauth` (OIDC JWT validation against Okta / Entra ID / Cognito). Full flag + env matrix in [`docs/deployment/mcp-http.md`](../../docs/deployment/mcp-http.md#cli-reference).
|
|
94
|
-
|
|
95
|
-
### Session lifecycle tools
|
|
96
|
-
|
|
97
|
-
Only available on the HTTP transport:
|
|
98
|
-
|
|
99
|
-
| Tool | Purpose |
|
|
100
|
-
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
101
|
-
| `sap_connect` | Perform the SAP security-session handshake once per MCP session. Accepts inline credentials or a `systemId` resolved against `SAP_SYSTEMS_JSON` / `SAP_SYSTEMS_FILE`. |
|
|
102
|
-
| `sap_disconnect` | Release locks, DELETE the SAP security session, and drop the cached client. |
|
|
103
|
-
|
|
104
|
-
### Transactional changesets (since Wave 3)
|
|
24
|
+
Use this in Claude Desktop, Cursor, Windsurf, or VS Code (`.vscode/mcp.json`, `"type": "stdio"`). For a shared, session-aware server run `adt-mcp-http` (Streamable HTTP).
|
|
105
25
|
|
|
106
|
-
|
|
26
|
+
## Features
|
|
107
27
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
| `changeset_add` | Stage an object write — acquires a lock and PUTs the supplied source. Defers activate. |
|
|
112
|
-
| `changeset_commit` | Batch-activate every staged object in a single call, then release all locks. |
|
|
113
|
-
| `changeset_rollback` | Release every held lock and mark the changeset rolled back. Source PUTs are not reverted (SAP has no transactional discard). |
|
|
28
|
+
- ABAP read/write, activation, ATC, ABAP Unit, and transports as MCP tools
|
|
29
|
+
- Same service layer as `adt` — CLI and MCP behave identically
|
|
30
|
+
- stdio (`adt-mcp`) and Streamable HTTP (`adt-mcp-http`) transports
|
|
114
31
|
|
|
115
|
-
|
|
32
|
+
## Documentation
|
|
116
33
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
## Connection Parameters
|
|
120
|
-
|
|
121
|
-
Every tool requires these connection parameters (passed per-call, never stored):
|
|
122
|
-
|
|
123
|
-
| Parameter | Type | Required | Description |
|
|
124
|
-
| ---------- | ------ | -------- | -------------------------------------------------------------- |
|
|
125
|
-
| `baseUrl` | string | ✅ | SAP system base URL, e.g. `https://my-system.example.com:8000` |
|
|
126
|
-
| `client` | string | — | SAP client number, e.g. `100` |
|
|
127
|
-
| `username` | string | — | Username for basic auth |
|
|
128
|
-
| `password` | string | — | Password for basic auth |
|
|
129
|
-
|
|
130
|
-
> **Security note:** credentials are forwarded directly to the SAP system per request. The MCP server holds no state and persists no credentials.
|
|
34
|
+
**[adt-cli.netlify.app/mcp/overview](https://adt-cli.netlify.app/mcp/overview)**
|
|
131
35
|
|
|
132
36
|
---
|
|
133
37
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
### Discovery & System
|
|
137
|
-
|
|
138
|
-
#### `discovery`
|
|
139
|
-
|
|
140
|
-
Discover available ADT services on the SAP system. Useful for checking what endpoints the system supports before using other tools.
|
|
141
|
-
|
|
142
|
-
**Parameters:** connection only
|
|
143
|
-
|
|
144
|
-
**Returns:** JSON object with available service collections and their links.
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
#### `system_info`
|
|
149
|
-
|
|
150
|
-
Get SAP system and/or session information.
|
|
151
|
-
|
|
152
|
-
**Parameters:**
|
|
153
|
-
|
|
154
|
-
| Parameter | Type | Default | Description |
|
|
155
|
-
| --------- | ------------------------------------- | -------- | ---------------------------- |
|
|
156
|
-
| `scope` | `"session"` \| `"system"` \| `"both"` | `"both"` | What information to retrieve |
|
|
157
|
-
|
|
158
|
-
**Returns:**
|
|
159
|
-
|
|
160
|
-
```json
|
|
161
|
-
{
|
|
162
|
-
"session": { "user": "DEVELOPER", "client": "100", "language": "EN", ... },
|
|
163
|
-
"system": { "systemId": "DEV", "release": "757", ... }
|
|
164
|
-
}
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
### Object Repository
|
|
170
|
-
|
|
171
|
-
#### `search_objects`
|
|
172
|
-
|
|
173
|
-
Search for ABAP objects in the repository. Supports wildcards.
|
|
174
|
-
|
|
175
|
-
**Parameters:**
|
|
176
|
-
|
|
177
|
-
| Parameter | Type | Default | Description |
|
|
178
|
-
| ------------ | ------ | ------- | --------------------------------------- |
|
|
179
|
-
| `query` | string | ✅ | Search term, e.g. `ZCL_*` or `MY_CLASS` |
|
|
180
|
-
| `maxResults` | number | `50` | Maximum number of results |
|
|
181
|
-
|
|
182
|
-
**Returns:**
|
|
183
|
-
|
|
184
|
-
```json
|
|
185
|
-
{
|
|
186
|
-
"count": 3,
|
|
187
|
-
"objects": [
|
|
188
|
-
{ "name": "ZCL_MY_CLASS", "type": "CLAS/OC", "uri": "/sap/bc/adt/oo/classes/zcl_my_class", ... }
|
|
189
|
-
]
|
|
190
|
-
}
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
#### `get_object`
|
|
196
|
-
|
|
197
|
-
Get details about a specific ABAP object by name. Performs an exact-match search and returns the object metadata plus a list of similar objects if no exact match is found.
|
|
198
|
-
|
|
199
|
-
**Parameters:**
|
|
200
|
-
|
|
201
|
-
| Parameter | Type | Description |
|
|
202
|
-
| ------------ | ------ | --------------------------- |
|
|
203
|
-
| `objectName` | string | ABAP object name to look up |
|
|
204
|
-
|
|
205
|
-
**Returns:**
|
|
206
|
-
|
|
207
|
-
```json
|
|
208
|
-
{ "found": true, "object": { "name": "ZCL_MY_CLASS", "type": "CLAS/OC", "uri": "...", ... } }
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
or, when not found:
|
|
212
|
-
|
|
213
|
-
```json
|
|
214
|
-
{ "found": false, "message": "Object 'FOO' not found", "similar": [...] }
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
---
|
|
218
|
-
|
|
219
|
-
### Source Code
|
|
220
|
-
|
|
221
|
-
#### `list_source_versions`
|
|
222
|
-
|
|
223
|
-
List immutable ADT source-version metadata and transport provenance for every
|
|
224
|
-
source component of one object. The result is metadata-only; it never embeds
|
|
225
|
-
ABAP source.
|
|
226
|
-
|
|
227
|
-
| Parameter | Type | Description |
|
|
228
|
-
| ------------ | ------- | -------------------------------------------- |
|
|
229
|
-
| `objectName` | string | ABAP object name |
|
|
230
|
-
| `objectType` | string | Object type (`PROG`, `CLAS`, `INTF`, …) |
|
|
231
|
-
| `component` | string? | Exact component id such as `implementations` |
|
|
232
|
-
|
|
233
|
-
#### `get_source_version`
|
|
234
|
-
|
|
235
|
-
Explicitly read one immutable source URI returned by
|
|
236
|
-
`list_source_versions` or `cts_transport_source_manifest`. Output is bounded
|
|
237
|
-
by `maxBytes` (1 MiB default, 4 MiB hard cap) and fails rather than truncating.
|
|
238
|
-
|
|
239
|
-
| Parameter | Type | Description |
|
|
240
|
-
| ---------- | ------- | ----------------------------------------------- |
|
|
241
|
-
| `uri` | string | Server-relative immutable `/sap/bc/adt/...` URI |
|
|
242
|
-
| `maxBytes` | number? | Positive UTF-8 response limit |
|
|
243
|
-
|
|
244
|
-
#### `cts_transport_source_manifest`
|
|
245
|
-
|
|
246
|
-
Build a metadata-only, component-granular exactness manifest for an ordered
|
|
247
|
-
non-empty transport list. Every leaf reports its change kind, exactness,
|
|
248
|
-
concrete request/task provenance, immutable base/head references when known,
|
|
249
|
-
and a typed diagnostic when exact isolation cannot be proven.
|
|
250
|
-
|
|
251
|
-
| Parameter | Type | Description |
|
|
252
|
-
| ------------- | -------- | ----------------------------------------------- |
|
|
253
|
-
| `transports` | string[] | Ordered request/task identifiers |
|
|
254
|
-
| `selector` | object? | Optional `objFunc`, `pgmid`, and `type` filters |
|
|
255
|
-
| `concurrency` | number? | Bounded metadata/feed concurrency (max 32) |
|
|
256
|
-
|
|
257
|
-
#### `get_source`
|
|
258
|
-
|
|
259
|
-
Fetch ABAP source code for a program, class, interface, or function group. Supports version-aware reads, class includes, method-level reads, and regex grep for token-efficient source exploration.
|
|
260
|
-
|
|
261
|
-
**Parameters:**
|
|
262
|
-
|
|
263
|
-
| Parameter | Type | Description |
|
|
264
|
-
| ------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
265
|
-
| `objectName` | string | ABAP object name |
|
|
266
|
-
| `objectType` | string? | Object type hint (`PROG`, `CLAS`, `INTF`, …). Skips the search round-trip when provided. |
|
|
267
|
-
| `version` | enum? | `active` (default, last activated) or `inactive` (unactivated draft). |
|
|
268
|
-
| `include` | string? | For `CLAS`: source include (`main`, `definitions`, `implementations`, `testclasses`, `macros`, `text_symbols`, `localtypes`). |
|
|
269
|
-
| `method` | string? | For `CLAS`: method name to read, or `*` to list all methods. |
|
|
270
|
-
| `grep` | string? | Regex pattern; returns matching source lines with context instead of full source. For `CLAS` source, each match is annotated with the owning method/class/include. |
|
|
271
|
-
| `maxBytes` | number? | Maximum UTF-8 response size in bytes (default 1 MiB, hard cap 2 MiB). |
|
|
272
|
-
| `format` | enum? | `raw` (default) or `structured` (class includes and method boundaries as JSON). |
|
|
273
|
-
|
|
274
|
-
**Returns:**
|
|
275
|
-
|
|
276
|
-
- Default: `{ object, bytes, source, version, include }`
|
|
277
|
-
- `method=*`: `{ object, methodCount, methods }`
|
|
278
|
-
- `method=<name>`: `{ object, method, startLine, endLine, bytes, source }`
|
|
279
|
-
- `grep`: `{ object, pattern, matchCount, matches, methodContext }`
|
|
280
|
-
- `format=structured`: `{ object, source, bytes, version, include, includes, methods }`
|
|
281
|
-
|
|
282
|
-
**Examples:**
|
|
283
|
-
|
|
284
|
-
```text
|
|
285
|
-
get_source objectName=ZCL_ORDER objectType=CLAS version=inactive
|
|
286
|
-
get_source objectName=ZCL_ORDER objectType=CLAS include=testclasses
|
|
287
|
-
get_source objectName=ZCL_ORDER objectType=CLAS method=get_name
|
|
288
|
-
get_source objectName=ZCL_ORDER objectType=CLAS grep="SELECT.*FROM"
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
**Tip:** Do not combine `method` and `grep`. Use `grep` to locate code, then `method` to read the full method.
|
|
292
|
-
|
|
293
|
-
---
|
|
294
|
-
|
|
295
|
-
#### `update_source`
|
|
296
|
-
|
|
297
|
-
Write new ABAP source code to an existing object. Internally performs the full SAP ADT lock→PUT→unlock cycle.
|
|
298
|
-
|
|
299
|
-
**Parameters:**
|
|
300
|
-
|
|
301
|
-
| Parameter | Type | Description |
|
|
302
|
-
| ------------ | ------- | ------------------------------------------------------------- |
|
|
303
|
-
| `objectName` | string | ABAP object name |
|
|
304
|
-
| `objectType` | string? | Object type hint |
|
|
305
|
-
| `sourceCode` | string | New ABAP source code |
|
|
306
|
-
| `transport` | string? | Transport request number (required for transportable objects) |
|
|
307
|
-
|
|
308
|
-
**Returns:**
|
|
309
|
-
|
|
310
|
-
```json
|
|
311
|
-
{ "status": "updated", "object": "ZCL_MY_CLASS" }
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
> ⚠️ **Always activate after updating** — inactive source is not compiled and cannot be executed.
|
|
315
|
-
|
|
316
|
-
---
|
|
317
|
-
|
|
318
|
-
#### `get_test_classes`
|
|
319
|
-
|
|
320
|
-
Retrieve the test class definitions (`FOR TESTING`) embedded in an ABAP class. Returns the raw source of the testclasses include.
|
|
321
|
-
|
|
322
|
-
**Parameters:**
|
|
323
|
-
|
|
324
|
-
| Parameter | Type | Description |
|
|
325
|
-
| ----------- | ------ | ------------------------------------ |
|
|
326
|
-
| `className` | string | ABAP class name, e.g. `ZCL_MY_CLASS` |
|
|
327
|
-
|
|
328
|
-
**Returns:** Plain ABAP source of the local test class include.
|
|
329
|
-
|
|
330
|
-
---
|
|
331
|
-
|
|
332
|
-
### Activation & Syntax
|
|
333
|
-
|
|
334
|
-
#### `activate_object`
|
|
335
|
-
|
|
336
|
-
Activate one or more ABAP objects. Supports single-object and batch modes.
|
|
337
|
-
|
|
338
|
-
**Single object mode:**
|
|
339
|
-
|
|
340
|
-
| Parameter | Type | Description |
|
|
341
|
-
| ------------ | ------ | --------------------------------------- |
|
|
342
|
-
| `objectName` | string | ABAP object name |
|
|
343
|
-
| `objectType` | string | Object type (`PROG`, `CLAS`, `INTF`, …) |
|
|
344
|
-
|
|
345
|
-
**Batch mode:**
|
|
346
|
-
|
|
347
|
-
| Parameter | Type | Description |
|
|
348
|
-
| --------- | --------------------------------- | ---------------------------------- |
|
|
349
|
-
| `objects` | `Array<{objectName, objectType}>` | Objects to activate in one request |
|
|
350
|
-
|
|
351
|
-
**Returns:**
|
|
352
|
-
|
|
353
|
-
```json
|
|
354
|
-
{ "status": "activated", "count": 2, "objects": [{ "name": "ZCL_FOO", "type": "CLAS" }, ...] }
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
---
|
|
358
|
-
|
|
359
|
-
#### `check_syntax`
|
|
360
|
-
|
|
361
|
-
Run an ABAP syntax check on an object and return structured check messages. Uses the `checkrun` schema — no XML parsing in tool code.
|
|
362
|
-
|
|
363
|
-
**Parameters:**
|
|
364
|
-
|
|
365
|
-
| Parameter | Type | Default | Description |
|
|
366
|
-
| ------------ | ------------------------------------- | ---------- | -------------------------------------- |
|
|
367
|
-
| `objectName` | string | ✅ | ABAP object name |
|
|
368
|
-
| `objectType` | string? | — | Object type hint for faster resolution |
|
|
369
|
-
| `version` | `"active"` \| `"inactive"` \| `"new"` | `"active"` | Version to check |
|
|
370
|
-
|
|
371
|
-
**Returns:**
|
|
372
|
-
|
|
373
|
-
```json
|
|
374
|
-
{
|
|
375
|
-
"hasErrors": false,
|
|
376
|
-
"hasWarnings": true,
|
|
377
|
-
"reports": [
|
|
378
|
-
{
|
|
379
|
-
"reporter": "syntax",
|
|
380
|
-
"triggeringUri": "/sap/bc/adt/oo/classes/zcl_foo",
|
|
381
|
-
"checkMessageList": {
|
|
382
|
-
"checkMessage": [{ "type": "W", "shortText": "Variable X is unused", ... }]
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
]
|
|
386
|
-
}
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
---
|
|
390
|
-
|
|
391
|
-
### Unit Testing
|
|
392
|
-
|
|
393
|
-
#### `run_unit_tests`
|
|
394
|
-
|
|
395
|
-
Run ABAP Unit tests on an object or package and receive pass/fail counts broken down by test method.
|
|
396
|
-
|
|
397
|
-
**Parameters:**
|
|
398
|
-
|
|
399
|
-
| Parameter | Type | Default | Description |
|
|
400
|
-
| -------------- | ------- | ------- | ---------------------------------------- |
|
|
401
|
-
| `objectName` | string | ✅ | Object name (class, program, or package) |
|
|
402
|
-
| `objectType` | string? | — | Type hint (`CLAS`, `PROG`, `DEVC`, …) |
|
|
403
|
-
| `withCoverage` | boolean | `false` | Whether to collect code coverage data |
|
|
404
|
-
|
|
405
|
-
**Returns:**
|
|
406
|
-
|
|
407
|
-
```json
|
|
408
|
-
{
|
|
409
|
-
"totalTests": 5,
|
|
410
|
-
"passCount": 4,
|
|
411
|
-
"failCount": 1,
|
|
412
|
-
"errorCount": 0,
|
|
413
|
-
"programs": [ ... ]
|
|
414
|
-
}
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
---
|
|
418
|
-
|
|
419
|
-
### Package Management
|
|
420
|
-
|
|
421
|
-
#### `list_package_objects`
|
|
422
|
-
|
|
423
|
-
List ABAP objects contained in a package. Uses `quickSearch` with a `packageName` filter.
|
|
424
|
-
|
|
425
|
-
**Parameters:**
|
|
426
|
-
|
|
427
|
-
| Parameter | Type | Default | Description |
|
|
428
|
-
| ------------- | ------- | ------- | ---------------------------------- |
|
|
429
|
-
| `packageName` | string | ✅ | Package name, e.g. `ZPACKAGE` |
|
|
430
|
-
| `objectType` | string? | — | Filter by type (`CLAS`, `PROG`, …) |
|
|
431
|
-
| `maxResults` | number | `200` | Maximum result count |
|
|
432
|
-
|
|
433
|
-
**Returns:**
|
|
434
|
-
|
|
435
|
-
```json
|
|
436
|
-
{
|
|
437
|
-
"packageName": "ZPACKAGE",
|
|
438
|
-
"count": 12,
|
|
439
|
-
"objects": [{ "name": "ZCL_FOO", "type": "CLAS/OC", ... }]
|
|
440
|
-
}
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
---
|
|
444
|
-
|
|
445
|
-
### Change & Transport System (CTS)
|
|
446
|
-
|
|
447
|
-
#### `cts_list_transports`
|
|
448
|
-
|
|
449
|
-
List transport requests from the CTS.
|
|
450
|
-
|
|
451
|
-
**Parameters:**
|
|
452
|
-
|
|
453
|
-
| Parameter | Type | Default |
|
|
454
|
-
| ------------ | ------ | ------- |
|
|
455
|
-
| `maxResults` | number | `50` |
|
|
456
|
-
|
|
457
|
-
**Returns:** Array of transport request descriptors.
|
|
458
|
-
|
|
459
|
-
---
|
|
460
|
-
|
|
461
|
-
#### `cts_get_transport`
|
|
462
|
-
|
|
463
|
-
Get details for a specific transport request.
|
|
464
|
-
|
|
465
|
-
**Parameters:**
|
|
466
|
-
|
|
467
|
-
| Parameter | Type | Description |
|
|
468
|
-
| ------------- | ------ | ----------------------------------- |
|
|
469
|
-
| `transportId` | string | Transport number, e.g. `DEVK900001` |
|
|
470
|
-
|
|
471
|
-
**Returns:** Full transport descriptor including tasks and objects.
|
|
472
|
-
|
|
473
|
-
---
|
|
474
|
-
|
|
475
|
-
#### `cts_create_transport`
|
|
476
|
-
|
|
477
|
-
Create a new transport request.
|
|
478
|
-
|
|
479
|
-
**Parameters:**
|
|
480
|
-
|
|
481
|
-
| Parameter | Type | Default | Description |
|
|
482
|
-
| ------------- | -------------- | ------- | ------------------------------------ |
|
|
483
|
-
| `description` | string | ✅ | Transport description |
|
|
484
|
-
| `type` | `"K"` \| `"W"` | `"K"` | Workbench (`K`) or Customizing (`W`) |
|
|
485
|
-
|
|
486
|
-
---
|
|
487
|
-
|
|
488
|
-
#### `cts_create_task`
|
|
489
|
-
|
|
490
|
-
Create and verify a modifiable task under an existing transport request.
|
|
491
|
-
|
|
492
|
-
**Parameters:**
|
|
493
|
-
|
|
494
|
-
| Parameter | Type | Description |
|
|
495
|
-
| ----------- | ------ | ------------------------------- |
|
|
496
|
-
| `transport` | string | Parent transport request number |
|
|
497
|
-
| `owner` | string | SAP user who will own the task |
|
|
498
|
-
|
|
499
|
-
**Returns:** The parent transport number, created task number, normalized owner,
|
|
500
|
-
and `created` status.
|
|
501
|
-
|
|
502
|
-
---
|
|
503
|
-
|
|
504
|
-
#### `cts_release_transport`
|
|
505
|
-
|
|
506
|
-
Release a transport request.
|
|
507
|
-
|
|
508
|
-
**Parameters:**
|
|
509
|
-
|
|
510
|
-
| Parameter | Type | Description |
|
|
511
|
-
| ------------ | ------- | ------------------------------------------- |
|
|
512
|
-
| `transport` | string | Transport number |
|
|
513
|
-
| `releaseAll` | boolean | Release modifiable tasks before the request |
|
|
514
|
-
|
|
515
|
-
#### `cts_delete_transport`
|
|
516
|
-
|
|
517
|
-
Delete a transport request.
|
|
518
|
-
|
|
519
|
-
**Parameters:**
|
|
520
|
-
|
|
521
|
-
| Parameter | Type | Description |
|
|
522
|
-
| ----------- | ------ | ---------------- |
|
|
523
|
-
| `transport` | string | Transport number |
|
|
524
|
-
|
|
525
|
-
---
|
|
526
|
-
|
|
527
|
-
#### `flow_checkout_tr`
|
|
528
|
-
|
|
529
|
-
Reconcile an allowed local workspace to an exact transport source boundary.
|
|
530
|
-
The tool delegates to `@abapify/adt-flow`; it does not run Git commands.
|
|
531
|
-
|
|
532
|
-
| Parameter | Type | Default | Description |
|
|
533
|
-
| ----------------- | -------- | ------- | ---------------------------------------------------------- |
|
|
534
|
-
| `transports` | string[] | ✅ | Non-empty transport scope |
|
|
535
|
-
| `workspaceRoot` | string | ✅ | Absolute directory within a server-owned root |
|
|
536
|
-
| `base` | boolean | `false` | Select the version immediately before the scope |
|
|
537
|
-
| `verifyInventory` | boolean | `false` | Recompute inventory instead of reusing an exact-head index |
|
|
538
|
-
|
|
539
|
-
The JSON result contains changed, moved, removed, unchanged, descriptor, and
|
|
540
|
-
SAP-call counts. With `verifyInventory: true`, it also contains refreshed
|
|
541
|
-
inventory and per-item resolution outcomes. It never contains source bodies or
|
|
542
|
-
credentials.
|
|
543
|
-
|
|
544
|
-
---
|
|
545
|
-
|
|
546
|
-
#### `flow_index_tr`
|
|
547
|
-
|
|
548
|
-
Persist inventory and unresolved-boundary descriptors for an allowed local
|
|
549
|
-
workspace without reading or materializing source files. Unlike strict
|
|
550
|
-
`flow_checkout_tr`, this tool records inexact components as omissions so a
|
|
551
|
-
later exact checkout can retry them.
|
|
552
|
-
|
|
553
|
-
| Parameter | Type | Description |
|
|
554
|
-
| --------------- | -------- | --------------------------------------------- |
|
|
555
|
-
| `transports` | string[] | Non-empty transport scope |
|
|
556
|
-
| `workspaceRoot` | string | Absolute directory within a server-owned root |
|
|
557
|
-
|
|
558
|
-
The JSON result contains transport/object descriptors and omission diagnostics;
|
|
559
|
-
its source-call count is always zero.
|
|
560
|
-
|
|
561
|
-
---
|
|
562
|
-
|
|
563
|
-
### ABAP Test Cockpit (ATC)
|
|
564
|
-
|
|
565
|
-
#### `atc_run`
|
|
566
|
-
|
|
567
|
-
Run ABAP Test Cockpit checks on an object or package and return the resulting findings worklist.
|
|
568
|
-
|
|
569
|
-
In destination mode, this operation requires an explicit `safe_execute`
|
|
570
|
-
grant. A `read` grant is insufficient because SAP creates a temporary
|
|
571
|
-
server-side worklist for the analysis.
|
|
572
|
-
|
|
573
|
-
**Parameters:**
|
|
574
|
-
|
|
575
|
-
| Parameter | Type | Description |
|
|
576
|
-
| --------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
577
|
-
| `scope` | object | ATC scope: `{ kind: 'package', packageName }`, `{ kind: 'transport_request', trkorr }`, or `{ kind: 'objects', objects: [{ objectType, objectName }] }` |
|
|
578
|
-
|
|
579
|
-
**Returns:**
|
|
580
|
-
|
|
581
|
-
```json
|
|
582
|
-
{ "status": "completed", "worklist": { ... } }
|
|
583
|
-
```
|
|
584
|
-
|
|
585
|
-
---
|
|
586
|
-
|
|
587
|
-
## Common Workflows
|
|
588
|
-
|
|
589
|
-
### Read → Edit → Save → Activate
|
|
590
|
-
|
|
591
|
-
```
|
|
592
|
-
1. get_source objectName=ZCL_FOO objectType=CLAS
|
|
593
|
-
2. update_source objectName=ZCL_FOO objectType=CLAS sourceCode="..." transport=DEVK900001
|
|
594
|
-
3. check_syntax objectName=ZCL_FOO objectType=CLAS version=inactive
|
|
595
|
-
4. activate_object objectName=ZCL_FOO objectType=CLAS
|
|
596
|
-
5. run_unit_tests objectName=ZCL_FOO objectType=CLAS
|
|
597
|
-
```
|
|
598
|
-
|
|
599
|
-
### Explore a Package
|
|
600
|
-
|
|
601
|
-
```
|
|
602
|
-
1. list_package_objects packageName=ZPACKAGE
|
|
603
|
-
2. get_object objectName=ZCL_FOO objectType=CLAS
|
|
604
|
-
3. get_source objectName=ZCL_FOO objectType=CLAS
|
|
605
|
-
```
|
|
606
|
-
|
|
607
|
-
### Quality Gate
|
|
608
|
-
|
|
609
|
-
```
|
|
610
|
-
1. check_syntax objectName=ZCL_FOO objectType=CLAS
|
|
611
|
-
2. atc_run scope={"kind":"objects","objects":[{"objectType":"CLAS","objectName":"ZCL_FOO"}]}
|
|
612
|
-
3. run_unit_tests objectName=ZCL_FOO objectType=CLAS
|
|
613
|
-
```
|
|
614
|
-
|
|
615
|
-
---
|
|
616
|
-
|
|
617
|
-
## Architecture
|
|
618
|
-
|
|
619
|
-
```
|
|
620
|
-
┌──────────────┐ stdio (JSON-RPC) ┌──────────────────────────────┐
|
|
621
|
-
│ MCP Client │ ◄───────────────────► │ @abapify/adt-mcp │
|
|
622
|
-
│ (AI / IDE) │ │ McpServer (17 tools) │
|
|
623
|
-
└──────────────┘ └──────────────┬───────────────┘
|
|
624
|
-
│ calls
|
|
625
|
-
┌──────────────▼───────────────┐
|
|
626
|
-
│ @abapify/adt-client │
|
|
627
|
-
│ (typed contracts via speci) │
|
|
628
|
-
└──────────────┬───────────────┘
|
|
629
|
-
│ HTTP/HTTPS
|
|
630
|
-
┌──────────────▼───────────────┐
|
|
631
|
-
│ SAP System (ADT REST) │
|
|
632
|
-
└──────────────────────────────┘
|
|
633
|
-
```
|
|
634
|
-
|
|
635
|
-
**Design principles:**
|
|
636
|
-
|
|
637
|
-
- **No logic duplication** – tools delegate to `@abapify/adt-client` services.
|
|
638
|
-
- **Schema-based serialisation** – request/response XML is handled via typed schemas from `@abapify/adt-schemas`. No manual XML building, no third-party XML parser.
|
|
639
|
-
- **Structured JSON** – every tool returns JSON, never raw console output.
|
|
640
|
-
- **Zod validation** – all tool inputs are validated before reaching the SAP system.
|
|
641
|
-
- **Connection-per-call** – each tool call creates its own ADT client; the server is stateless.
|
|
642
|
-
|
|
643
|
-
---
|
|
644
|
-
|
|
645
|
-
## Programmatic Usage
|
|
646
|
-
|
|
647
|
-
```typescript
|
|
648
|
-
import { createMcpServer } from '@abapify/adt-mcp';
|
|
649
|
-
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
650
|
-
|
|
651
|
-
const server = createMcpServer();
|
|
652
|
-
const transport = new StdioServerTransport();
|
|
653
|
-
await server.connect(transport);
|
|
654
|
-
```
|
|
655
|
-
|
|
656
|
-
### Custom client factory (e.g. for testing or SSO)
|
|
657
|
-
|
|
658
|
-
```typescript
|
|
659
|
-
import { createMcpServer } from '@abapify/adt-mcp';
|
|
660
|
-
|
|
661
|
-
const server = createMcpServer({
|
|
662
|
-
clientFactory: (params) =>
|
|
663
|
-
createAdtClient({
|
|
664
|
-
baseUrl: params.baseUrl,
|
|
665
|
-
username: params.username ?? '',
|
|
666
|
-
password: params.password ?? '',
|
|
667
|
-
client: params.client,
|
|
668
|
-
}),
|
|
669
|
-
});
|
|
670
|
-
```
|
|
671
|
-
|
|
672
|
-
---
|
|
673
|
-
|
|
674
|
-
## Testing
|
|
675
|
-
|
|
676
|
-
Integration tests use Vitest and a built-in mock ADT server that needs no SAP system.
|
|
677
|
-
|
|
678
|
-
```bash
|
|
679
|
-
# Run all integration tests
|
|
680
|
-
bunx vitest run tests/integration.test.ts
|
|
681
|
-
```
|
|
682
|
-
|
|
683
|
-
### Using the mock server in your own tests
|
|
684
|
-
|
|
685
|
-
The mock ADT server lives in the private `@abapify/adt-fixtures` package
|
|
686
|
-
(monorepo-only — it is not published to npm). Inside this repository the
|
|
687
|
-
integration tests import it directly:
|
|
688
|
-
|
|
689
|
-
```typescript
|
|
690
|
-
import { createMockAdtServer } from '@abapify/adt-fixtures';
|
|
691
|
-
```
|
|
692
|
-
|
|
693
|
-
---
|
|
694
|
-
|
|
695
|
-
## Development
|
|
696
|
-
|
|
697
|
-
```bash
|
|
698
|
-
bunx nx build adt-mcp # build
|
|
699
|
-
bunx nx typecheck adt-mcp # type check
|
|
700
|
-
bunx nx lint adt-mcp # lint
|
|
701
|
-
bunx nx test adt-mcp # run integration tests with Vitest
|
|
702
|
-
```
|
|
703
|
-
|
|
704
|
-
---
|
|
705
|
-
|
|
706
|
-
## Feature Parity Map
|
|
707
|
-
|
|
708
|
-
| CLI Command | MCP Tool | Status |
|
|
709
|
-
| ---------------------------- | ------------------------------- | --------- |
|
|
710
|
-
| `adt discovery` | `discovery` | ✅ |
|
|
711
|
-
| `adt info` | `system_info` | ✅ |
|
|
712
|
-
| `adt search` | `search_objects` | ✅ |
|
|
713
|
-
| `adt get` | `get_object` | ✅ |
|
|
714
|
-
| `adt source get` | `get_source` | ✅ |
|
|
715
|
-
| `adt source versions` | `list_source_versions` | ✅ |
|
|
716
|
-
| `adt source version get` | `get_source_version` | ✅ |
|
|
717
|
-
| `adt source put` | `update_source` | ✅ |
|
|
718
|
-
| `adt activate` | `activate_object` | ✅ |
|
|
719
|
-
| `adt check` | `check_syntax` | ✅ |
|
|
720
|
-
| `adt aunit run` | `run_unit_tests` | ✅ |
|
|
721
|
-
| `adt atc run` | `atc_run` | ✅ |
|
|
722
|
-
| `adt cts tr list` | `cts_list_transports` | ✅ |
|
|
723
|
-
| `adt cts tr get` | `cts_get_transport` | ✅ |
|
|
724
|
-
| `adt cts tr task create` | `cts_create_task` | ✅ |
|
|
725
|
-
| `adt cts tr source-manifest` | `cts_transport_source_manifest` | ✅ |
|
|
726
|
-
| `adt cts tr delete` | `cts_delete_transport` | ✅ |
|
|
727
|
-
| `adt cts tr create` | `cts_create_transport` | ✅ |
|
|
728
|
-
| `adt cts tr release` | `cts_release_transport` | ✅ |
|
|
729
|
-
| `adt flow checkout tr` | `flow_checkout_tr` | ✅ |
|
|
730
|
-
| `adt flow index tr` | `flow_index_tr` | ✅ |
|
|
731
|
-
| `adt ls` | — | 🔜 Future |
|
|
732
|
-
| `adt cts search` | — | 🔜 Future |
|
|
733
|
-
| `adt import package` | — | 🔜 Future |
|
|
734
|
-
| `adt import transport` | — | 🔜 Future |
|
|
38
|
+
Part of [**abapify**](https://github.com/abapify/adt-cli) — open, typed tooling for SAP ABAP Development Tools (ADT): CLI, MCP server, and SDK.
|