@mcp-abap-adt/core 7.1.1 → 7.2.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/CHANGELOG.md +33 -0
- package/README.md +6 -9
- package/dist/lib/config/IServerConfig.d.ts +6 -0
- package/dist/lib/config/IServerConfig.d.ts.map +1 -1
- package/dist/lib/config/ServerConfigManager.d.ts.map +1 -1
- package/dist/lib/config/ServerConfigManager.js +22 -2
- package/dist/lib/config/ServerConfigManager.js.map +1 -1
- package/dist/server/SseServer.d.ts +9 -0
- package/dist/server/SseServer.d.ts.map +1 -1
- package/dist/server/SseServer.js +16 -4
- package/dist/server/SseServer.js.map +1 -1
- package/dist/server/StreamableHttpServer.d.ts +9 -0
- package/dist/server/StreamableHttpServer.d.ts.map +1 -1
- package/dist/server/StreamableHttpServer.js +15 -3
- package/dist/server/StreamableHttpServer.js.map +1 -1
- package/dist/server/dnsRebindingProtection.d.ts +21 -0
- package/dist/server/dnsRebindingProtection.d.ts.map +1 -0
- package/dist/server/dnsRebindingProtection.js +45 -0
- package/dist/server/dnsRebindingProtection.js.map +1 -0
- package/dist/server/launcher.js +6 -0
- package/dist/server/launcher.js.map +1 -1
- package/docs/architecture/ARCHITECTURE.md +8 -6
- package/docs/architecture/HANDLER_EXPORTER.md +6 -6
- package/docs/architecture/README.md +1 -1
- package/docs/architecture/TOOLS_ARCHITECTURE.md +13 -4
- package/docs/configuration/YAML_CONFIG.md +19 -23
- package/docs/deployment/GITHUB_ACTIONS.md +2 -2
- package/docs/development/ASSISTANT_GUIDELINES.md +1 -1
- package/docs/development/tests/TESTING_AUTH.md +3 -3
- package/docs/installation/CLINE_CONFIGURATION.md +17 -21
- package/docs/installation/INSTALLATION.md +46 -38
- package/docs/installation/examples/README.md +10 -10
- package/docs/installation/examples/SERVICE_KEY_SETUP.md +3 -3
- package/docs/installation/examples/cline-stdio-npx-config.json +1 -1
- package/docs/installation/platforms/INSTALL_LINUX.md +34 -27
- package/docs/installation/platforms/INSTALL_MACOS.md +33 -26
- package/docs/installation/platforms/INSTALL_WINDOWS.md +33 -26
- package/docs/user-guide/AVAILABLE_TOOLS.md +110 -4
- package/docs/user-guide/AVAILABLE_TOOLS_COMPACT.md +1 -1
- package/docs/user-guide/AVAILABLE_TOOLS_HIGH.md +51 -2
- package/docs/user-guide/AVAILABLE_TOOLS_LEGACY.md +128 -4
- package/docs/user-guide/AVAILABLE_TOOLS_LOW.md +1 -1
- package/docs/user-guide/AVAILABLE_TOOLS_READONLY.md +59 -2
- package/docs/user-guide/CLIENT_CONFIGURATION.md +4 -4
- package/docs/user-guide/CLI_OPTIONS.md +76 -71
- package/docs/user-guide/HANDLERS_MANAGEMENT.md +9 -9
- package/docs/user-guide/README.md +8 -8
- package/package.json +3 -3
|
@@ -13,14 +13,14 @@ The `HandlerExporter` class allows you to register all ABAP ADT handlers on any
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm install @
|
|
16
|
+
npm install @mcp-abap-adt/core
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Basic Usage
|
|
20
20
|
|
|
21
21
|
```typescript
|
|
22
22
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
23
|
-
import { HandlerExporter } from "@
|
|
23
|
+
import { HandlerExporter } from "@mcp-abap-adt/core/handlers";
|
|
24
24
|
import { createAbapConnection } from "@mcp-abap-adt/connection";
|
|
25
25
|
|
|
26
26
|
// Create your MCP server
|
|
@@ -138,7 +138,7 @@ for (const entry of entries) {
|
|
|
138
138
|
If you're using v2 server classes directly:
|
|
139
139
|
|
|
140
140
|
```typescript
|
|
141
|
-
import { StreamableHttpServer } from "@
|
|
141
|
+
import { StreamableHttpServer } from "@mcp-abap-adt/core/server/v2";
|
|
142
142
|
|
|
143
143
|
const exporter = new HandlerExporter();
|
|
144
144
|
const registry = exporter.createRegistry();
|
|
@@ -155,7 +155,7 @@ Example for cloud-llm-hub style integration:
|
|
|
155
155
|
```typescript
|
|
156
156
|
import cds from "@sap/cds";
|
|
157
157
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
158
|
-
import { HandlerExporter } from "@
|
|
158
|
+
import { HandlerExporter } from "@mcp-abap-adt/core";
|
|
159
159
|
import { createConnection } from "./connections/connectionFactory";
|
|
160
160
|
|
|
161
161
|
// Create MCP server instance
|
|
@@ -191,12 +191,12 @@ If you were using `mcp_abap_adt_server` directly:
|
|
|
191
191
|
|
|
192
192
|
```typescript
|
|
193
193
|
// Old way (still works via legacy import)
|
|
194
|
-
import { mcp_abap_adt_server } from "@
|
|
194
|
+
import { mcp_abap_adt_server } from "@mcp-abap-adt/core";
|
|
195
195
|
const server = new mcp_abap_adt_server({ connection });
|
|
196
196
|
await server.run();
|
|
197
197
|
|
|
198
198
|
// New way (recommended for embedding)
|
|
199
|
-
import { HandlerExporter } from "@
|
|
199
|
+
import { HandlerExporter } from "@mcp-abap-adt/core/handlers";
|
|
200
200
|
const exporter = new HandlerExporter();
|
|
201
201
|
exporter.registerOnServer(yourMcpServer, () => connection);
|
|
202
202
|
```
|
|
@@ -15,7 +15,7 @@ The default `mcp-abap-adt` command runs the v2 server with full transport suppor
|
|
|
15
15
|
### Handler Exporter (v1)
|
|
16
16
|
For embedding into existing servers (e.g., CAP/CDS applications):
|
|
17
17
|
```typescript
|
|
18
|
-
import { HandlerExporter } from '@
|
|
18
|
+
import { HandlerExporter } from '@mcp-abap-adt/core/handlers';
|
|
19
19
|
|
|
20
20
|
const exporter = new HandlerExporter({
|
|
21
21
|
includeReadOnly: true,
|
|
@@ -16,24 +16,33 @@ Each module now owns its description via a constant `TOOL_DEFINITION` structure
|
|
|
16
16
|
### 1. Handler Organization
|
|
17
17
|
|
|
18
18
|
Handlers are organized into categorized subdirectories under `src/handlers/`:
|
|
19
|
-
- `
|
|
19
|
+
- `behavior_definition/` - Behavior Definition handlers
|
|
20
|
+
- `behavior_implementation/` - Behavior Implementation handlers
|
|
20
21
|
- `class/` - Class handlers
|
|
21
22
|
- `common/` - Common handlers (activate, delete, check, lock, unlock, validate)
|
|
23
|
+
- `compact/` - Compact facade handlers
|
|
22
24
|
- `data_element/` - Data Element handlers
|
|
23
|
-
- `ddlx/` -
|
|
25
|
+
- `ddlx/` - DDLX (metadata extension) handlers
|
|
24
26
|
- `domain/` - Domain handlers
|
|
25
27
|
- `enhancement/` - Enhancement handlers
|
|
26
|
-
- `function/` - Function handlers
|
|
28
|
+
- `function/` - Function (function module) handlers
|
|
29
|
+
- `function_group/` - Function Group handlers
|
|
30
|
+
- `function_include/` - Function Include handlers
|
|
31
|
+
- `function_module/` - Function Module handlers
|
|
27
32
|
- `include/` - Include handlers
|
|
28
33
|
- `interface/` - Interface handlers
|
|
34
|
+
- `metadata_extension/` - Metadata Extension handlers
|
|
29
35
|
- `package/` - Package handlers
|
|
30
36
|
- `program/` - Program handlers
|
|
31
37
|
- `search/` - Search handlers
|
|
38
|
+
- `service_binding/` - Service Binding handlers
|
|
39
|
+
- `service_definition/` - Service Definition handlers
|
|
32
40
|
- `structure/` - Structure handlers
|
|
33
41
|
- `system/` - System handlers
|
|
34
42
|
- `table/` - Table handlers
|
|
35
43
|
- `transport/` - Transport handlers
|
|
36
|
-
- `
|
|
44
|
+
- `unit_test/` - ABAP Unit test handlers
|
|
45
|
+
- `view/` - View (CDS) handlers
|
|
37
46
|
|
|
38
47
|
This organization improves code navigation, reduces merge conflicts, and makes the codebase more maintainable.
|
|
39
48
|
|
|
@@ -28,7 +28,7 @@ Command-line arguments **always override** YAML values. This allows you to:
|
|
|
28
28
|
Example:
|
|
29
29
|
```bash
|
|
30
30
|
# Use config.yaml but override the port
|
|
31
|
-
mcp-abap-adt --conf=config.yaml --
|
|
31
|
+
mcp-abap-adt --conf=config.yaml --port=8080
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## Configuration File Structure
|
|
@@ -66,9 +66,9 @@ http:
|
|
|
66
66
|
# When using 0.0.0.0, client must provide all connection headers - server won't use default destination
|
|
67
67
|
host: 127.0.0.1
|
|
68
68
|
json-response: false
|
|
69
|
-
allowed-
|
|
70
|
-
allowed-
|
|
71
|
-
enable-dns-protection: false
|
|
69
|
+
allowed-hosts: [] # DNS-rebinding protection: exact Host values incl. port, e.g. ["localhost:3000"]
|
|
70
|
+
allowed-origins: [] # DNS-rebinding protection: exact Origin values incl. scheme, e.g. ["https://app.example.com"]
|
|
71
|
+
enable-dns-protection: false # Enable Host/Origin allowlist validation (needs at least one list set)
|
|
72
72
|
|
|
73
73
|
# SSE (Server-Sent Events) transport options
|
|
74
74
|
sse:
|
|
@@ -76,9 +76,9 @@ sse:
|
|
|
76
76
|
# Host binding: 127.0.0.1 (default, localhost only, secure) or 0.0.0.0 (all interfaces, less secure)
|
|
77
77
|
# When using 0.0.0.0, client must provide all connection headers - server won't use default destination
|
|
78
78
|
host: 127.0.0.1
|
|
79
|
-
allowed-
|
|
80
|
-
allowed-
|
|
81
|
-
enable-dns-protection: false
|
|
79
|
+
allowed-hosts: [] # DNS-rebinding protection: exact Host values incl. port, e.g. ["localhost:3001"]
|
|
80
|
+
allowed-origins: [] # DNS-rebinding protection: exact Origin values incl. scheme, e.g. ["https://app.example.com"]
|
|
81
|
+
enable-dns-protection: false # Enable Host/Origin allowlist validation (needs at least one list set)
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
## Configuration Options
|
|
@@ -101,21 +101,21 @@ sse:
|
|
|
101
101
|
| Option | Type | Default | Description |
|
|
102
102
|
|--------|------|---------|-------------|
|
|
103
103
|
| `http.port` | number | `3000` | HTTP server port |
|
|
104
|
-
| `http.host` | string | `
|
|
104
|
+
| `http.host` | string | `127.0.0.1` | HTTP server host (`127.0.0.1`/`localhost` for local only, `0.0.0.0` for all interfaces) |
|
|
105
105
|
| `http.json-response` | boolean | `false` | Enable JSON response format |
|
|
106
|
-
| `http.allowed-
|
|
107
|
-
| `http.allowed-
|
|
108
|
-
| `http.enable-dns-protection` | boolean | `false` | Enable
|
|
106
|
+
| `http.allowed-hosts` | string[] | `[]` | DNS-rebinding protection: exact Host header values to allow, including port (e.g. `localhost:3000`). NOT browser CORS — no Access-Control-Allow-Origin headers are emitted. |
|
|
107
|
+
| `http.allowed-origins` | string[] | `[]` | DNS-rebinding protection: exact Origin header values to allow, including scheme (e.g. `https://app.example.com`). |
|
|
108
|
+
| `http.enable-dns-protection` | boolean | `false` | Enable Host/Origin allowlist validation. Required for `allowed-hosts`/`allowed-origins` to take effect; needs at least one list set. Non-allowlisted Host/Origin → HTTP 403. |
|
|
109
109
|
|
|
110
110
|
### SSE Options
|
|
111
111
|
|
|
112
112
|
| Option | Type | Default | Description |
|
|
113
113
|
|--------|------|---------|-------------|
|
|
114
114
|
| `sse.port` | number | `3001` | SSE server port |
|
|
115
|
-
| `sse.host` | string | `
|
|
116
|
-
| `sse.allowed-
|
|
117
|
-
| `sse.allowed-
|
|
118
|
-
| `sse.enable-dns-protection` | boolean | `false` | Enable
|
|
115
|
+
| `sse.host` | string | `127.0.0.1` | SSE server host |
|
|
116
|
+
| `sse.allowed-hosts` | string[] | `[]` | DNS-rebinding protection: exact Host header values to allow, including port (e.g. `localhost:3001`). NOT browser CORS — no Access-Control-Allow-Origin headers are emitted. |
|
|
117
|
+
| `sse.allowed-origins` | string[] | `[]` | DNS-rebinding protection: exact Origin header values to allow, including scheme (e.g. `https://app.example.com`). |
|
|
118
|
+
| `sse.enable-dns-protection` | boolean | `false` | Enable Host/Origin allowlist validation. Required for `allowed-hosts`/`allowed-origins` to take effect; needs at least one list set. Non-allowlisted Host/Origin → HTTP 403. |
|
|
119
119
|
|
|
120
120
|
## Examples
|
|
121
121
|
|
|
@@ -145,15 +145,13 @@ Usage:
|
|
|
145
145
|
mcp-abap-adt --conf=config.yaml
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
### Example 3: SSE Mode with
|
|
148
|
+
### Example 3: SSE Mode with Custom Host and Port
|
|
149
149
|
|
|
150
150
|
```yaml
|
|
151
151
|
transport: sse
|
|
152
152
|
sse:
|
|
153
153
|
port: 3001
|
|
154
|
-
|
|
155
|
-
- http://localhost:3000
|
|
156
|
-
- http://localhost:5173
|
|
154
|
+
host: 127.0.0.1
|
|
157
155
|
```
|
|
158
156
|
|
|
159
157
|
Usage:
|
|
@@ -225,13 +223,11 @@ http:
|
|
|
225
223
|
port: 3000
|
|
226
224
|
```
|
|
227
225
|
|
|
228
|
-
### Test Config 4: sse-
|
|
226
|
+
### Test Config 4: sse-default.yaml
|
|
229
227
|
```yaml
|
|
230
228
|
transport: sse
|
|
231
229
|
sse:
|
|
232
230
|
port: 3001
|
|
233
|
-
allowed-origins:
|
|
234
|
-
- http://localhost:3000
|
|
235
231
|
```
|
|
236
232
|
|
|
237
233
|
Run tests with different configs:
|
|
@@ -239,7 +235,7 @@ Run tests with different configs:
|
|
|
239
235
|
mcp-abap-adt --conf=stdio-stdio.yaml
|
|
240
236
|
mcp-abap-adt --conf=stdio-env.yaml
|
|
241
237
|
mcp-abap-adt --conf=http-default.yaml
|
|
242
|
-
mcp-abap-adt --conf=sse-
|
|
238
|
+
mcp-abap-adt --conf=sse-default.yaml
|
|
243
239
|
```
|
|
244
240
|
|
|
245
241
|
## Benefits
|
|
@@ -12,7 +12,7 @@ Automatically creates GitHub releases when you push a version tag.
|
|
|
12
12
|
|
|
13
13
|
**What it does:**
|
|
14
14
|
1. Checks out code with submodules
|
|
15
|
-
2. Sets up Node.js
|
|
15
|
+
2. Sets up Node.js 22
|
|
16
16
|
3. Installs dependencies
|
|
17
17
|
4. Builds the project
|
|
18
18
|
5. Runs tests (non-blocking)
|
|
@@ -42,7 +42,7 @@ Runs continuous integration tests on every push and PR.
|
|
|
42
42
|
|
|
43
43
|
**What it does:**
|
|
44
44
|
1. Tests on multiple OS (Ubuntu, macOS, Windows)
|
|
45
|
-
2. Tests on multiple Node.js versions (
|
|
45
|
+
2. Tests on multiple Node.js versions (22, 25)
|
|
46
46
|
3. Builds and tests the project
|
|
47
47
|
4. Verifies package creation
|
|
48
48
|
5. Tests package installation
|
|
@@ -160,7 +160,7 @@ When reviewing code or documentation:
|
|
|
160
160
|
|
|
161
161
|
This submodule is used by the main `cloud-llm-hub` project:
|
|
162
162
|
|
|
163
|
-
- **Import path**: `@
|
|
163
|
+
- **Import path**: `@mcp-abap-adt/core`
|
|
164
164
|
- **Build output**: `dist/` directory
|
|
165
165
|
- **Usage**: Imported in `srv/mcp-proxy.ts` and `srv/mcp-manager.ts`
|
|
166
166
|
- **MCP Endpoints**: Exposed via CAP service at `/mcp/stream/http` and `/mcp/sse`
|
|
@@ -47,7 +47,7 @@ EOF
|
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
49
|
cd /home/okyslytsia/prj/mcp-abap-adt
|
|
50
|
-
npm run dev
|
|
50
|
+
npm run dev
|
|
51
51
|
# or
|
|
52
52
|
npm run dev:http
|
|
53
53
|
# or
|
|
@@ -105,7 +105,7 @@ cat > TRIAL.json << 'EOF'
|
|
|
105
105
|
EOF
|
|
106
106
|
|
|
107
107
|
# Start server from this directory
|
|
108
|
-
npm run dev
|
|
108
|
+
npm run dev
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
## Debug Mode:
|
|
@@ -113,7 +113,7 @@ npm run dev:stdio
|
|
|
113
113
|
To enable debug logs for auth-broker:
|
|
114
114
|
|
|
115
115
|
```bash
|
|
116
|
-
DEBUG_AUTH_LOG=true npm run dev
|
|
116
|
+
DEBUG_AUTH_LOG=true npm run dev
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
## Test Logging Switches
|
|
@@ -33,9 +33,9 @@ Cline reads MCP server configurations from:
|
|
|
33
33
|
|
|
34
34
|
If you installed via npm:
|
|
35
35
|
```bash
|
|
36
|
-
npm install -g @
|
|
36
|
+
npm install -g @mcp-abap-adt/core
|
|
37
37
|
# or
|
|
38
|
-
npx @
|
|
38
|
+
npx @mcp-abap-adt/core
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
Use the simpler configurations below (no need to specify full paths).
|
|
@@ -61,7 +61,7 @@ If you cloned the repository and are developing locally, use the full path confi
|
|
|
61
61
|
"command": "npx",
|
|
62
62
|
"args": [
|
|
63
63
|
"-y",
|
|
64
|
-
"@
|
|
64
|
+
"@mcp-abap-adt/core",
|
|
65
65
|
"--transport=stdio",
|
|
66
66
|
"--env=/absolute/path/to/.env"
|
|
67
67
|
],
|
|
@@ -80,7 +80,7 @@ If you cloned the repository and are developing locally, use the full path confi
|
|
|
80
80
|
"command": "npx",
|
|
81
81
|
"args": [
|
|
82
82
|
"-y",
|
|
83
|
-
"@
|
|
83
|
+
"@mcp-abap-adt/core",
|
|
84
84
|
"--transport=stdio",
|
|
85
85
|
"--env=/Users/username/.env"
|
|
86
86
|
],
|
|
@@ -99,7 +99,7 @@ If you cloned the repository and are developing locally, use the full path confi
|
|
|
99
99
|
"command": "npx",
|
|
100
100
|
"args": [
|
|
101
101
|
"-y",
|
|
102
|
-
"@
|
|
102
|
+
"@mcp-abap-adt/core",
|
|
103
103
|
"--transport=stdio",
|
|
104
104
|
"--env=C:/Users/username/.env"
|
|
105
105
|
],
|
|
@@ -112,7 +112,7 @@ If you cloned the repository and are developing locally, use the full path confi
|
|
|
112
112
|
|
|
113
113
|
#### B. Using Global Installation
|
|
114
114
|
|
|
115
|
-
If you installed globally (`npm install -g @
|
|
115
|
+
If you installed globally (`npm install -g @mcp-abap-adt/core`):
|
|
116
116
|
|
|
117
117
|
**With .env file:**
|
|
118
118
|
```json
|
|
@@ -192,12 +192,12 @@ Choose one method:
|
|
|
192
192
|
|
|
193
193
|
**A. Using NPX** (recommended):
|
|
194
194
|
```bash
|
|
195
|
-
npx @
|
|
195
|
+
npx @mcp-abap-adt/core --transport=http --port=3000
|
|
196
196
|
```
|
|
197
197
|
|
|
198
198
|
**B. Using Global Install**:
|
|
199
199
|
```bash
|
|
200
|
-
mcp-abap-adt --transport=http --
|
|
200
|
+
mcp-abap-adt --transport=http --port=3000
|
|
201
201
|
```
|
|
202
202
|
|
|
203
203
|
**C. Using NPM Script** (local development):
|
|
@@ -258,12 +258,12 @@ Choose one method:
|
|
|
258
258
|
|
|
259
259
|
**A. Using NPX** (recommended):
|
|
260
260
|
```bash
|
|
261
|
-
npx @
|
|
261
|
+
npx @mcp-abap-adt/core --transport=sse --port=3001 --env=/path/to/.env
|
|
262
262
|
```
|
|
263
263
|
|
|
264
264
|
**B. Using Global Install**:
|
|
265
265
|
```bash
|
|
266
|
-
mcp-abap-adt --transport=sse --
|
|
266
|
+
mcp-abap-adt --transport=sse --port=3001 --env=/path/to/.env
|
|
267
267
|
```
|
|
268
268
|
|
|
269
269
|
**C. Using NPM Script** (local development):
|
|
@@ -418,18 +418,10 @@ You can run multiple instances with different SAP systems:
|
|
|
418
418
|
|
|
419
419
|
```bash
|
|
420
420
|
# HTTP
|
|
421
|
-
node ./bin/mcp-abap-adt.js --transport=http --
|
|
421
|
+
node ./bin/mcp-abap-adt.js --transport=http --port=8080 --host=0.0.0.0
|
|
422
422
|
|
|
423
423
|
# SSE
|
|
424
|
-
node ./bin/mcp-abap-adt.js --transport=sse --
|
|
425
|
-
```
|
|
426
|
-
|
|
427
|
-
### CORS Configuration
|
|
428
|
-
|
|
429
|
-
```bash
|
|
430
|
-
node ./bin/mcp-abap-adt.js --transport=http \
|
|
431
|
-
--http-allowed-origins=http://localhost:3000,https://example.com \
|
|
432
|
-
--http-enable-dns-protection
|
|
424
|
+
node ./bin/mcp-abap-adt.js --transport=sse --port=8081 --host=0.0.0.0
|
|
433
425
|
```
|
|
434
426
|
|
|
435
427
|
### Environment Variables
|
|
@@ -466,7 +458,11 @@ Instead of command-line arguments, you can use environment variables:
|
|
|
466
458
|
|
|
467
459
|
1. **Never commit** `.env` files with credentials to git
|
|
468
460
|
2. **Use JWT authentication** for production environments
|
|
469
|
-
3. **Enable DNS protection** for HTTP/SSE servers exposed to network
|
|
461
|
+
3. **Enable DNS-rebinding protection** for HTTP/SSE servers exposed to network — use `--http-enable-dns-protection` with `--http-allowed-hosts` to restrict which Host headers are accepted. Example:
|
|
462
|
+
```bash
|
|
463
|
+
mcp-abap-adt --transport=http --http-enable-dns-protection --http-allowed-hosts=localhost:3000
|
|
464
|
+
```
|
|
465
|
+
This is Host/Origin allowlist validation, NOT browser CORS — no `Access-Control-Allow-Origin` headers are emitted. A non-allowlisted Host gets HTTP 403. The `--http-allowed-hosts` value must include the port (e.g. `localhost:3000`, not `localhost`).
|
|
470
466
|
4. **Use HTTPS** in production (configure reverse proxy)
|
|
471
467
|
|
|
472
468
|
## Next Steps
|
|
@@ -18,7 +18,7 @@ After installation, you'll be able to:
|
|
|
18
18
|
## 🔧 Prerequisites
|
|
19
19
|
|
|
20
20
|
All platforms require:
|
|
21
|
-
- **Node.js**
|
|
21
|
+
- **Node.js** 22 or later
|
|
22
22
|
- **npm** (comes with Node.js)
|
|
23
23
|
- **Git**
|
|
24
24
|
- Access to SAP ABAP system (on-premise or BTP)
|
|
@@ -36,14 +36,14 @@ Download and install from a pre-built `.tgz` package:
|
|
|
36
36
|
# Or receive it from your administrator
|
|
37
37
|
|
|
38
38
|
# Install globally (recommended)
|
|
39
|
-
npm install -g ./
|
|
39
|
+
npm install -g ./mcp-abap-adt-core-<version>.tgz
|
|
40
40
|
|
|
41
41
|
# Or install locally in your project
|
|
42
|
-
npm install ./
|
|
42
|
+
npm install ./mcp-abap-adt-core-<version>.tgz
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
After installation, you'll have access to:
|
|
46
|
-
- `mcp-abap-adt` - MCP ABAP ADT Server (default:
|
|
46
|
+
- `mcp-abap-adt` - MCP ABAP ADT Server (default: stdio mode)
|
|
47
47
|
- `mcp-abap-adt --transport=stdio` - stdio transport (for MCP clients)
|
|
48
48
|
- `mcp-abap-adt --transport=http` - HTTP server transport
|
|
49
49
|
- `mcp-abap-adt --transport=sse` - SSE transport
|
|
@@ -90,7 +90,7 @@ mcp-auth auth -k path/to/service-key.json
|
|
|
90
90
|
|
|
91
91
|
**Run the server:**
|
|
92
92
|
```bash
|
|
93
|
-
# Default
|
|
93
|
+
# Default stdio mode (bare command starts stdio; HTTP/SSE require --transport=http/--transport=sse)
|
|
94
94
|
# Note: auth-broker is available for stdio/SSE via `--mcp=<destination>` and for HTTP via destination headers
|
|
95
95
|
mcp-abap-adt
|
|
96
96
|
|
|
@@ -111,7 +111,7 @@ mcp-abap-adt --env-path=/path/to/my.env
|
|
|
111
111
|
mcp-abap-adt --env-path ~/configs/sap-dev.env
|
|
112
112
|
|
|
113
113
|
# Start HTTP server on custom port
|
|
114
|
-
mcp-abap-adt --transport=http --
|
|
114
|
+
mcp-abap-adt --transport=http --port=8080
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
**Environment File Priority:**
|
|
@@ -245,10 +245,10 @@ This project uses **npm workspaces** to manage multiple packages (`@mcp-abap-adt
|
|
|
245
245
|
|
|
246
246
|
### Installing from Pre-built Package
|
|
247
247
|
|
|
248
|
-
The pre-built package (`
|
|
248
|
+
The pre-built package (`mcp-abap-adt-core-<version>.tgz`) contains everything you need to run the server without building from source.
|
|
249
249
|
|
|
250
250
|
#### Prerequisites
|
|
251
|
-
- Node.js
|
|
251
|
+
- Node.js 22 or later
|
|
252
252
|
- npm 9 or later
|
|
253
253
|
|
|
254
254
|
#### Global Installation (Recommended)
|
|
@@ -257,7 +257,7 @@ Install globally to use commands from anywhere:
|
|
|
257
257
|
|
|
258
258
|
```bash
|
|
259
259
|
# Install from local package file
|
|
260
|
-
npm install -g ./
|
|
260
|
+
npm install -g ./mcp-abap-adt-core-<version>.tgz
|
|
261
261
|
|
|
262
262
|
# Verify installation
|
|
263
263
|
mcp-abap-adt --help
|
|
@@ -268,7 +268,7 @@ mcp-abap-adt --transport=sse --help
|
|
|
268
268
|
**Available commands after global installation:**
|
|
269
269
|
|
|
270
270
|
```bash
|
|
271
|
-
# Default
|
|
271
|
+
# Default stdio mode (HTTP/SSE require --transport=http/--transport=sse)
|
|
272
272
|
mcp-abap-adt
|
|
273
273
|
|
|
274
274
|
# Force use of auth-broker (service keys), ignore .env file
|
|
@@ -281,10 +281,10 @@ mcp-abap-adt --transport=stdio
|
|
|
281
281
|
mcp-abap-adt --env-path=/path/to/.env
|
|
282
282
|
|
|
283
283
|
# HTTP server transport
|
|
284
|
-
mcp-abap-adt --transport=http --
|
|
284
|
+
mcp-abap-adt --transport=http --port=3000
|
|
285
285
|
|
|
286
286
|
# SSE transport
|
|
287
|
-
mcp-abap-adt --transport=sse --
|
|
287
|
+
mcp-abap-adt --transport=sse --port=3001
|
|
288
288
|
```
|
|
289
289
|
|
|
290
290
|
**For JWT authentication with service keys**, install separately:
|
|
@@ -302,10 +302,10 @@ Install in your project directory:
|
|
|
302
302
|
cd /path/to/your/project
|
|
303
303
|
|
|
304
304
|
# Install the package
|
|
305
|
-
npm install /path/to/
|
|
305
|
+
npm install /path/to/mcp-abap-adt-core-<version>.tgz
|
|
306
306
|
|
|
307
307
|
# Use via npx
|
|
308
|
-
npx mcp-abap-adt --transport=http --port
|
|
308
|
+
npx mcp-abap-adt --transport=http --port=3000
|
|
309
309
|
```
|
|
310
310
|
|
|
311
311
|
#### Configuration
|
|
@@ -375,7 +375,7 @@ EOF
|
|
|
375
375
|
Or use a custom environment file:
|
|
376
376
|
|
|
377
377
|
```bash
|
|
378
|
-
mcp-abap-adt --transport=http --env-path /path/to/custom/.env --port
|
|
378
|
+
mcp-abap-adt --transport=http --env-path /path/to/custom/.env --port=3000
|
|
379
379
|
```
|
|
380
380
|
|
|
381
381
|
#### Usage Examples
|
|
@@ -387,22 +387,22 @@ mcp-abap-adt --transport=http
|
|
|
387
387
|
|
|
388
388
|
**Example 2: Start HTTP server on custom port**
|
|
389
389
|
```bash
|
|
390
|
-
mcp-abap-adt --transport=http --port
|
|
390
|
+
mcp-abap-adt --transport=http --port=8080
|
|
391
391
|
```
|
|
392
392
|
|
|
393
393
|
**Example 3: Start HTTP server accessible from network**
|
|
394
394
|
```bash
|
|
395
|
-
mcp-abap-adt --transport=http --host
|
|
395
|
+
mcp-abap-adt --transport=http --host=0.0.0.0 --port=3000
|
|
396
396
|
```
|
|
397
397
|
|
|
398
398
|
**Example 4: Use custom environment file**
|
|
399
399
|
```bash
|
|
400
|
-
mcp-abap-adt --transport=http --env-path /opt/config/.env.production --port
|
|
400
|
+
mcp-abap-adt --transport=http --env-path /opt/config/.env.production --port=8080
|
|
401
401
|
```
|
|
402
402
|
|
|
403
403
|
**Example 5: Start SSE server**
|
|
404
404
|
```bash
|
|
405
|
-
mcp-abap-adt --transport=sse --port
|
|
405
|
+
mcp-abap-adt --transport=sse --port=3000
|
|
406
406
|
```
|
|
407
407
|
|
|
408
408
|
#### Command Line Options
|
|
@@ -426,19 +426,22 @@ All server commands (`mcp-abap-adt`, `mcp-abap-adt --transport=http`, `mcp-abap-
|
|
|
426
426
|
- `--transport=<type>` - Transport type: `stdio`, `http`, `streamable-http`, or `sse`
|
|
427
427
|
|
|
428
428
|
**HTTP Server Options (for `mcp-abap-adt --transport=http`):**
|
|
429
|
-
- `--
|
|
430
|
-
- `--
|
|
429
|
+
- `--host=<host>` - Server host (default: 127.0.0.1; use 0.0.0.0 for all interfaces)
|
|
430
|
+
- `--port=<port>` - Server port (default: 3000 for http)
|
|
431
|
+
- `--path=<path>` / `--http-path=<path>` (alias) - HTTP endpoint path (default: /mcp/stream/http)
|
|
431
432
|
- `--http-json-response` - Enable JSON response format
|
|
432
|
-
- `--http-allowed-
|
|
433
|
-
- `--http-allowed-
|
|
434
|
-
- `--http-enable-dns-protection` - Enable
|
|
433
|
+
- `--http-allowed-hosts=<list>` - Comma-separated exact Host header values for DNS-rebinding protection (includes port, e.g. `localhost:3000`)
|
|
434
|
+
- `--http-allowed-origins=<list>` - Comma-separated exact Origin header values for DNS-rebinding protection (includes scheme, e.g. `https://app.example.com`)
|
|
435
|
+
- `--http-enable-dns-protection` - Enable Host/Origin allowlist validation (NOT browser CORS — no Access-Control-Allow-Origin headers are emitted); needs at least one list set; non-allowlisted Host/Origin → HTTP 403
|
|
435
436
|
|
|
436
437
|
**SSE Server Options (for `mcp-abap-adt --transport=sse`):**
|
|
437
|
-
- `--
|
|
438
|
-
- `--
|
|
439
|
-
- `--sse-
|
|
440
|
-
- `--
|
|
441
|
-
- `--sse-
|
|
438
|
+
- `--host=<host>` - Server host (default: 127.0.0.1; use 0.0.0.0 for all interfaces)
|
|
439
|
+
- `--port=<port>` - Server port (default: 3001 for sse)
|
|
440
|
+
- `--sse-path=<path>` - SSE connection path (default: /sse)
|
|
441
|
+
- `--post-path=<path>` - SSE message post path (default: /messages)
|
|
442
|
+
- `--sse-allowed-hosts=<list>` - Comma-separated exact Host header values for DNS-rebinding protection (includes port, e.g. `localhost:3001`)
|
|
443
|
+
- `--sse-allowed-origins=<list>` - Comma-separated exact Origin header values for DNS-rebinding protection (includes scheme, e.g. `https://app.example.com`)
|
|
444
|
+
- `--sse-enable-dns-protection` - Enable Host/Origin allowlist validation (NOT browser CORS — no Access-Control-Allow-Origin headers are emitted); needs at least one list set; non-allowlisted Host/Origin → HTTP 403
|
|
442
445
|
|
|
443
446
|
**Environment Variables:**
|
|
444
447
|
|
|
@@ -450,8 +453,14 @@ You can also configure the server using environment variables.
|
|
|
450
453
|
- `MCP_TRANSPORT` - Default transport type (stdio|http|sse)
|
|
451
454
|
- `MCP_HTTP_PORT` - Default HTTP port
|
|
452
455
|
- `MCP_HTTP_HOST` - Default HTTP host (default: 127.0.0.1)
|
|
456
|
+
- `MCP_HTTP_ALLOWED_HOSTS` - Comma-separated exact Host header values (DNS-rebinding protection; includes port, e.g. `localhost:3000`)
|
|
457
|
+
- `MCP_HTTP_ALLOWED_ORIGINS` - Comma-separated exact Origin header values (DNS-rebinding protection; includes scheme)
|
|
458
|
+
- `MCP_HTTP_ENABLE_DNS_PROTECTION` - Enable HTTP Host/Origin allowlist validation (true|false; NOT browser CORS — no Access-Control-Allow-Origin headers are emitted)
|
|
453
459
|
- `MCP_SSE_PORT` - Default SSE port
|
|
454
460
|
- `MCP_SSE_HOST` - Default SSE host (default: 127.0.0.1)
|
|
461
|
+
- `MCP_SSE_ALLOWED_HOSTS` - Comma-separated exact Host header values (DNS-rebinding protection; includes port, e.g. `localhost:3001`)
|
|
462
|
+
- `MCP_SSE_ALLOWED_ORIGINS` - Comma-separated exact Origin header values (DNS-rebinding protection; includes scheme)
|
|
463
|
+
- `MCP_SSE_ENABLE_DNS_PROTECTION` - Enable SSE Host/Origin allowlist validation (true|false; NOT browser CORS — no Access-Control-Allow-Origin headers are emitted)
|
|
455
464
|
- `MCP_UNSAFE` - Disable connection validation (true|false)
|
|
456
465
|
- `MCP_USE_AUTH_BROKER` - Force auth-broker usage (true|false)
|
|
457
466
|
- `MCP_BROWSER` - Browser for OAuth2 flow (e.g., chrome, firefox)
|
|
@@ -491,12 +500,11 @@ mcp-abap-adt --help
|
|
|
491
500
|
# Use custom .env from different location
|
|
492
501
|
mcp-abap-adt --env=~/configs/sap-production.env
|
|
493
502
|
|
|
494
|
-
# Start HTTP server
|
|
495
|
-
mcp-abap-adt --transport=http --
|
|
496
|
-
--http-allowed-origins=http://localhost:3000,https://myapp.com
|
|
503
|
+
# Start HTTP server
|
|
504
|
+
mcp-abap-adt --transport=http --port=8080
|
|
497
505
|
|
|
498
|
-
# Start SSE
|
|
499
|
-
mcp-abap-adt --transport=sse --
|
|
506
|
+
# Start SSE server
|
|
507
|
+
mcp-abap-adt --transport=sse --port=3001
|
|
500
508
|
```
|
|
501
509
|
|
|
502
510
|
**Example 6: Use stdio transport (for MCP clients)**
|
|
@@ -510,10 +518,10 @@ To update to a newer version:
|
|
|
510
518
|
|
|
511
519
|
```bash
|
|
512
520
|
# Uninstall old version
|
|
513
|
-
npm uninstall -g @
|
|
521
|
+
npm uninstall -g @mcp-abap-adt/core
|
|
514
522
|
|
|
515
523
|
# Install new version
|
|
516
|
-
npm install -g ./
|
|
524
|
+
npm install -g ./mcp-abap-adt-core-<version>.tgz
|
|
517
525
|
```
|
|
518
526
|
|
|
519
527
|
#### Troubleshooting Package Installation
|
|
@@ -537,7 +545,7 @@ $env:PATH += ";$(npm config get prefix)"
|
|
|
537
545
|
Solution:
|
|
538
546
|
```bash
|
|
539
547
|
# Use sudo for global installation
|
|
540
|
-
sudo npm install -g ./
|
|
548
|
+
sudo npm install -g ./mcp-abap-adt-core-<version>.tgz
|
|
541
549
|
|
|
542
550
|
# Or configure npm to use a different directory (recommended)
|
|
543
551
|
mkdir ~/.npm-global
|
|
@@ -546,7 +554,7 @@ echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
|
|
|
546
554
|
source ~/.bashrc
|
|
547
555
|
|
|
548
556
|
# Then install without sudo
|
|
549
|
-
npm install -g ./
|
|
557
|
+
npm install -g ./mcp-abap-adt-core-<version>.tgz
|
|
550
558
|
```
|
|
551
559
|
|
|
552
560
|
---
|