Skip to main content
Glama
README.md
# abap-mcp — Read & inspect ABAP from Claude, Cursor & any MCP client

An **MCP (Model Context Protocol) server** that connects AI assistants (Claude Desktop, Claude Code, Cursor, …) to a SAP system over the **standard ADT (ABAP Development Tools) HTTP API**. Your AI can search the repository, read source, run a syntax check, query tables and map where-used — all **read-only**, without leaving the chat.

No SDK bloat. **Pure Python standard library** — starts in seconds even behind aggressive corporate antivirus, and runs on any Python 3.x.

---

## Why this exists

ABAP developers are the last ones to get good AI tooling. Copilots can write ABAP text, but they can't *see your system*. This bridges that gap using the same ADT REST API Eclipse uses — so it works against any modern SAP NetWeaver / S/4HANA system you can already reach.

It's the missing link between an LLM and a live SAP repository — as a safe, read-only lens.

---

## Read-only by design

This server **only reads**. There are no write, activate, execute or modify tools — nothing it can do changes your system. Every call is a `GET` (or a read-only `SELECT` / syntax check). You can hand it to your AI and let it explore your system with zero risk of a change.

---

## What it can do

- `abap_ping` — connectivity / auth check
- `abap_search` — find objects across the repository
- `abap_read_class` / `abap_read_program` / `abap_read_include` / `abap_read_function` / `abap_read_uri` — read source
- `abap_ui5_list` / `abap_ui5_read` — browse a UI5/BSP app (SAPUI5 ABAP Repository)
- `abap_sql` — read-only SELECT against tables (Data Preview)
- `abap_syntax_check` — validate a source without saving
- `abap_where_used` — where-used / blast radius via CROSS + WBCROSSGT
- `smartform_info` / `sapscript_info` — inspect forms

---

## Setup (60 seconds)

```bash
git clone <repo>
cd abap-mcp
cp .env.example .env      # fill in host, client, user, password
```

`.env`:
```
SAP_BASE_URL=http://your-sap-host.example.com:8000
SAP_CLIENT=100
SAP_USER=YOUR_SAP_USER
SAP_PASSWD=YOUR_PASSWORD
SAP_LANG=EN
```

Register with Claude Code / Desktop:
```bash
claude mcp add abap-mcp --scope user -- python /path/to/server.py
```

Or in any MCP client, point it at `python server.py` over stdio.

Ask your assistant: *"ping the SAP system and list all Z-classes whose name starts with ZCL_."*

---

## Requirements

- Python 3.8+ (no pip dependencies)
- Network access to a SAP system's ADT endpoint (`/sap/bc/adt/*`)
- A SAP user with read/display authorizations

## Disclaimer

Use against systems you are authorized to access. Reads go through standard SAP authorization. Not affiliated with or endorsed by SAP SE.

## License

MIT. Free to use, modify and share.

---

*Built by [João Pace](https://www.linkedin.com/in/joaopace) — SAP × AI. If this saves you time, a ⭐ on the repo helps others find it. Found a rough edge? Open an issue or reach out on LinkedIn.*