Skip to main content
Glama
albanleong
by albanleong
README.md
# abap-mcpb

An MCPB (MCP Bundle) package for SAP ABAP development via the ADT API. Connect Claude Desktop to your SAP system and let it read, write, test, and deploy ABAP code — no build step required.

## Origins

This MCPB is packaged from [dassian-adt](https://github.com/DassianInc/dassian-adt) (v2.0), which is itself a production rewrite of [mcp-abap-abap-adt-api](https://github.com/mario-andreschak/mcp-abap-abap-adt-api) by **[Mario Andreschak](https://github.com/mario-andreschak)**. The underlying ADT HTTP communication is powered by **[Marcello Urbani](https://github.com/marcellourbani)**'s [abap-adt-api](https://github.com/marcellourbani/abap-adt-api) library.

### What changed in this MCPB vs the original dist/

Only two files were modified from the original compiled output:

1. **`handlers/QualityHandlers.js`** — The ATC check (`abap_atc_run`) was rewritten to actively trigger a new ATC run and return structured findings grouped by severity (error/warning/info) with fields like `checkId`, `checkTitle`, `messageTitle`, and `location` (line/column). The original passively fetched an existing worklist.

2. **`index.js`** — Added global `uncaughtException` and `unhandledRejection` handlers, ENV diagnostic logging at startup, and try/catch wrapping around `runStdio()` for better error reporting. The original had bare `.catch(console.error)`.

All other 24 files (handlers, lib, auth, types) are identical to the dassian-adt v2.0 `dist/` output.

## What It Does

25 tools covering the full ABAP development lifecycle:

| Category | Tools | What They Do |
|----------|-------|-------------|
| **Source** | `abap_get_source`, `abap_set_source`, `abap_get_function_group` | Read/write ABAP source for any object type. Function group tool fetches all includes and FMs in one call. |
| **Objects** | `abap_create`, `abap_delete`, `abap_activate`, `abap_search`, `abap_object_info` | Full object lifecycle. Create in $TMP or real packages. |
| **Transports** | `transport_create`, `transport_assign`, `transport_release`, `transport_list`, `transport_info`, `transport_contents` | Create, populate, and release transports. |
| **Quality** | `abap_syntax_check`, `abap_atc_run` | Syntax check and ATC with structured severity grouping. |
| **Data** | `abap_table`, `abap_query` | Read tables/CDS views with WHERE/LIKE/BETWEEN. Execute freestyle SQL. |
| **Run** | `abap_run` | Create temp class, run ABAP code, capture output, clean up. |
| **System** | `login`, `healthcheck`, `abap_get_dump`, `raw_http` | Session management, connectivity test, ST22 dumps, raw ADT access. |
| **Git** | `git_repos`, `git_pull` | gCTS repository listing and pull. |

## Why Use an MCPB?

An MCPB (MCP Bundle) is a self-contained package that installs directly into Claude Desktop — no cloning repos, no `npm install`, no build steps. You get:

- **One-click install** — download the `.mcpb` file and open it in Claude Desktop
- **Built-in configuration UI** — enter your SAP connection details in a form, no JSON editing required
- **Per-tool permissions** — enable or disable individual tools from the Claude Desktop settings, so you control exactly what the AI can do on your SAP system

### Configuration

After installing, Claude Desktop presents a configuration form for your SAP connection:

![SAP Connection Configuration](screenshots/abap-mcpb-config.png)

### Tool Permissions

All 25 tools are listed in the Claude Desktop permissions panel. You can enable or disable each tool individually — for example, keep read-only tools on while disabling write operations until you're ready:

![Tool Permissions](screenshots/abap-mcpb-tools-authorization.png)

## Installation

### Prerequisites

- Claude Desktop with MCPB support
- Access to an SAP system with ADT enabled (typically port 44300)
- SAP user with development authorization

### Install the MCPB

1. Download `abap-mcpb.mcpb` from the [Releases](https://github.com/albanleong/abap-mcpb/releases) page
2. Open Claude Desktop and install the bundle
3. Configure your SAP connection when prompted:
   - **SAP System URL** — e.g. `https://your-sap-server:44300`
   - **SAP Username**
   - **SAP Password**
   - **SAP Client** — e.g. `100` (optional, defaults to 100)
   - **SAP Language** — e.g. `EN` (optional, defaults to EN)
   - **Allow Self-Signed Certificates** — set to `0` if your SAP system uses self-signed certs

## How This MCPB Was Built

This section documents how the bundle was created from the dassian-adt source, for reproducibility.

### 1. Clone and build the original

```bash
git clone https://github.com/DassianInc/dassian-adt.git
cd dassian-adt
npm install
npm run build
```

This produces a `dist/` folder with compiled JavaScript.

### 2. Create the MCPB project folder

```bash
mkdir abap-mcpb
cp -r dist/ abap-mcpb/server/
cp -r node_modules/ abap-mcpb/node_modules/
cp package.json package-lock.json abap-mcpb/
```

The `dist/` folder was renamed to `server/` to match the MCPB convention.

### 3. Apply fixes

Two files were modified from the original `dist/` output:

- **`server/index.js`** — Added global error handlers (`uncaughtException`, `unhandledRejection`), ENV diagnostic logging at startup, and try/catch around `runStdio()`
- **`server/handlers/QualityHandlers.js`** — Rewrote ATC check to actively trigger runs and return structured findings grouped by severity

### 4. Create manifest.json

A `manifest.json` was created defining the server entry point (`server/index.js`), user configuration schema (SAP connection details), and the 25 tool declarations.

### 5. Create .mcpbignore

An `.mcpbignore` file excludes tests, dev config, TypeScript source, build artifacts, and dev-only node_modules (jest, babel, types) from the bundle.

### 6. Build the bundle

The `.mcpb` bundle was created using the Claude Desktop MCPB tooling, producing `abap-mcpb.mcpb`.

## Project Structure

```
abap-mcpb/
  manifest.json       MCPB metadata, tool declarations, user config schema
  abap-mcpb-icon.png  Extension icon
  server/             Runtime JavaScript (compiled from dassian-adt)
    index.js          MCP server entry point
    handlers/         Tool handler modules (Source, Object, Transport, etc.)
    lib/              URL builder, error classification, logger
    auth/             Browser-based SAP login page
    types/            Tool schema definitions
  node_modules/       Runtime dependencies
  package.json        Dependency manifest
  .mcpbignore         Bundle exclusion rules
  abap-mcpb.mcpb      The built bundle
```

## Credits

- **[Mario Andreschak](https://github.com/mario-andreschak)** — original [mcp-abap-abap-adt-api](https://github.com/mario-andreschak/mcp-abap-abap-adt-api) server scaffold
- **[Marcello Urbani](https://github.com/marcellourbani)** — [abap-adt-api](https://github.com/marcellourbani/abap-adt-api) library powering all ADT HTTP communication
- **[Dassian Inc.](https://github.com/DassianInc)** — [dassian-adt](https://github.com/DassianInc/dassian-adt) v2.0 production rewrite (the source this MCPB is built from)

## License

MIT — see [LICENSE](LICENSE).