ABAP Lens
Provides read-only and check-only access to SAP ABAP systems, including ABAP source code, DDIC table definitions, CDS sources, where-used lists, transports, version history, short dumps, syntax checks, ATC checks, and ABAP Unit tests.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ABAP Lens
Give any AI assistant a clear, safe view into your SAP ABAP system.
ABAP Lens is an MCP server that lets Claude, Cursor, GitHub Copilot, Gemini CLI, Codex, opencode and any other MCP client read and check ABAP code: source, DDIC, CDS, where-used, transports, versions, short dumps, syntax, ATC and ABAP Unit.
It talks to a small REST service inside SAP (ZDEVAPI, included in abap/) instead of ADT.
So it does not depend on ADT, does not need ADT authorizations, and is fast:
Measured on one S/4HANA 1909 production system | ABAP Lens | ADT REST |
Short dumps, last 7 days (924 dumps) | 0.04 s, 238 KB | 24 s, 15 MB |
Where-used of a Z table | 0.02 s | 0.2 s |
Transport request with 2 objects | 0.01 s, 0.7 KB | 0.02 s, 27 KB |
Source of a 4,330-line include | 0.03 s | 0.04 s |
Smaller answers mean fewer tokens and more room in the model's context.
Why it is safe
Read and check only. There is no operation that writes, activates, locks or transports.
SAP authorizations stay in charge. Every call needs the
ZDEVAPIauthorization object, and then the standard check for the object (S_DEVELOP,S_TRANSPRT, ST22). The user never sees more than in SE80/ST22.Opt-in per system. Each operation must be switched on in
ZDEVAPI_CFG; one row turns everything off.Logged. Each call writes one row to
ZDEVAPI_LOG(user, operation, object, status, duration, never the payload).Read-only mode for production.
"readOnly": truehides syntax/ATC/ABAP Unit from the AI completely.HTTPS only, no environment variables. Credentials live in one config file or come from your password manager.
Related MCP server: abap-adt-mcp
Tools
Tool | What it does |
| System ID, service version, operations you may use |
| Find repository objects by name pattern / type / package |
| Active source of programs, includes, classes (by part), interfaces, function modules, CDS |
| Class includes and methods, function group includes and FMs, program includes |
| Table / structure fields with includes expanded, keys, technical settings |
| CDS DDL source, SQL view name, activation state |
| Where-used list from the index |
| Transport request header, tasks, objects; or open requests for an object |
| Version history |
| ST22 short dumps and their details (no variable values) |
| Syntax check, optionally of proposed source without saving it |
| ATC check of one object |
| ABAP Unit run of one object |
| One-call overview: package, size, open transports, last changes |
| Before a change: where-used, open transports, versions, syntax and ATC baseline |
| Stops when another developer has the object in an open request |
| Tells whether join fields cover the full key of a table |
| Flags CDS syntax that your release does not support (rules in a JSON file) |
| Builds / validates a transport description by your team's format |
| Checks a new object name against your package naming rules |
¹ not available when the system is readOnly. ² only when you configure team conventions.
Prompts: analyze-z-report, prepare-change, review-cds, dump-triage.
Quick start
1. SAP side (once per system): pull abap/ with abapGit — classes, tables, authorization object
and ICF node come with it — then follow abap/INSTALL.md: activate the ICF node, assign the role,
switch operations on.
2. Config file ~/.config/abap-lens/config.json (Windows: %USERPROFILE%\AppData\Roaming\abap-lens\config.json):
{
"systems": {
"dev": {
"url": "https://sap-dev.example.com:44300",
"client": "100",
"user": "MY_SAP_USER",
"passwordCommand": ["pass", "show", "sap/dev"],
"caFile": "certs/dev.pem"
},
"prd": {
"url": "https://sap-prd.example.com:44300",
"client": "100",
"user": "MY_SAP_USER",
"passwordCommand": ["pass", "show", "sap/prd"],
"readOnly": true
}
}
}Then chmod 600 ~/.config/abap-lens/config.json.
3. Your AI client — one entry per system:
claude mcp add -s user abap-lens-dev -- npx -y abap-lens --system devCursor, VS Code, Claude Desktop, Windsurf, Gemini CLI, Codex, opencode: see docs/clients.md.
4. Check: ask "Call sap_health".
Config reference
systems.<name>:
Key | Required | Meaning |
| yes |
|
| yes | SAP client, 3 digits |
| yes | SAP user |
| one of them | Plain password, or a command whose first output line is the password, e.g. |
| no | PEM of the server certificate / CA (STRUST export). Relative paths are resolved from the config folder |
| no |
|
| no | ICF path, default |
| no | Only for SAP default certificates without a SAN; the certificate chain is still verified |
team (all optional):
Key | Meaning |
| Your conventions JSON. Turns on |
| Your own CDS rule set. Default: |
| Extra documents for the AI, e.g. |
Command line: abap-lens --system <name> [--config <file>]. With only one system configured, --system may be left out.
Development
npm ci
npm run build
npm testNode.js 20.18 or later. The MCP side is TypeScript (src/), the SAP side ABAP (abap/src, abapGit format).
License
MIT, see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only AI coding tools for change verification, release readiness, capacity, and guidance.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Checks AI-written code for leaked keys and made-up packages, on your machine. Never uploads code.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI assistants like Claude Code to directly connect to SAP ABAP systems via the ADT REST API with read/write capabilities, featuring AI-friendly high-level tools and built-in safety measures such as read-only mode, prefix whitelisting, and automatic locking.9284 npmMIT
- AlicenseAqualityDmaintenanceEnables AI agents to read, write, activate, and transport ABAP code in SAP systems via ABAP ADT REST API, without needing SAP GUI.24MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to work with SAP ABAP systems through the ADT REST API, supporting repository search, source code read/write, activation, syntax checks, and transport request management.1Apache 2.0
- AlicenseCqualityBmaintenanceGrants AI agents secure, verifiable access to SAP ABAP systems (ECC 6.0 and S/4HANA) so they can review code and transport orders, run ATC and ABAP Unit checks, trace where-used relationships, query tables with read-only ABAP SQL, diagnose incidents across dumps, jobs and application logs, and consult official SAP documentation. Writes are restricted to development systems with an explicit transport order, and every result reports which system it came from, returning typed errors instead of misleading empty results when a check cannot be completed.177 npm3Apache 2.0