# claude-sap-kit [![Listed in SAP AI MCP Servers & Claude Plugins](https://img.shields.io/badge/listed%20in-SAP%20AI%20MCP%20Servers%20%26%20Claude%20Plugins-0a6ed1)](https://github.com/marianfoo/sap-ai-mcp-servers#community-sap-ai-skills--claude-plugins) Tools and skills that let **Claude Code** work on an **on-premise SAP system** without SAP GUI, built as an extension of [ARC-1](https://github.com/arc-mcp/arc-1). ARC-1 already gives Claude read and write access to ABAP code through ADT. This kit adds what ADT does not cover: running reports, previewing print output and editing SmartForms and Adobe forms. ⭐ **If you find it useful, please star the repo**: it helps other SAP developers find it. Questions and ideas are welcome in [Issues](https://github.com/silvius1996/claude-sap-kit/issues). ## What you can ask Claude - *"Run MB52 for plant 1001, storage locations M001 to M003"* → runs the report and reads the ALV as JSON. - *"Compare ZMM_STOCK with its copy on the same filters"* → same selection on both, row-by-row comparison. - *"Show me the PDF of delivery 80012345"* → preview of the NAST message, nothing is printed. - *"On the delivery note, replace the sender address with a fixed text"* → Z copy of the SmartForms, XML edit, PDF preview and comparison with the original. - *"OK, move the change to the original form in request DEVK900123"* → controlled replacement, with backup, summary and explicit confirmation. - *"On the order confirmation (Adobe form), make the footer text smaller"* → Z copy of the form, XDP edit, PDF preview and comparison with the original. ## How it works ``` Claude Code ──MCP──▶ ARC-1 ──▶ extension (9 Custom_* tools) ──HTTP /sap/bc/soap/rfc──▶ remote-enabled FMs ZAI_* ──▶ ABAP classes ``` | Tool | What it does | |---|---| | `Custom_LaunchReport` | `SUBMIT` of a report (by name or transaction) with a variant and/or selection values; returns the ALV as JSON or the list as text | | `Custom_PrintPreview` | Runs the print program of a NAST message to spool and saves the PDF, even with a SmartForms or Adobe form not yet configured in NACE | | `Custom_SmartFormRead` | Downloads the XML of any SmartForms | | `Custom_SmartFormWrite` | Uploads an XML as a `ZAI_*` copy in `$TMP`, with check, activation and FM generation | | `Custom_SmartFormReplace` | Replaces a customer form with the approved copy, under a transport request, in two steps (`prepare` → `execute`) | | `Custom_AdobeFormRead` | Downloads any Adobe form (SFP) as three files: form XML without layout, layout XDP, interface XML | | `Custom_AdobeFormWrite` | Uploads form XML + XDP as a `ZAI_*` copy in `$TMP`, with activation and FM generation | | `Custom_AdobeInterfaceWrite` | Uploads an interface XML as a `ZAI_*` form interface in `$TMP` (new, or updated in place so the forms using it stay linked), with activation | | `Custom_AdobeFormReplace` | Gives a customer Adobe form the layout of the approved copy, in place, under a transport request, in two steps (`prepare` → `execute`); refused if the copy differs in anything else | ARC-1 extensions can only make HTTP calls, so the tools call remote-enabled function modules through the standard SOAP-RFC service. ## Repository layout ``` .claude-plugin/ Claude Code plugin and marketplace skills/ sap-arc1-kit/ skill: installs the kit on an SAP system assets/abap/ ABAP classes and function group (default prefix ZAI) assets/arc1-extension/ ARC-1 extension in TypeScript, with tests scripts/set_prefix.py changes the object prefix (e.g. ZAI → ZXYZ) sap-report-launcher/ skill: how to run and compare reports sap-smartform-xml/ skill: how to read, edit and check SmartForms sap-adobe-form/ skill: how to read, copy, edit and check Adobe forms ``` ## Requirements - SAP_BASIS 7.50 or later, on-premise or private cloud: **ECC 6.0 EHP8** and **S/4HANA** (all releases). Tested live on S/4HANA 2025 (SAP_BASIS 816) and ECC 6.0 EHP8 (SAP_BASIS 750); the ABAP sources avoid newer constructs. On ECC the class `/UI2/CL_JSON` must exist (used for the ALV output). Not for S/4HANA Public Cloud or the BTP ABAP Environment (no `SUBMIT`, NAST or SOAP-RFC there). - [ARC-1](https://github.com/arc-mcp/arc-1) 1.4.0 or later, configured in Claude Code with writes enabled. - SICF service `/sap/bc/soap/rfc` active. - For the Adobe forms tools: Adobe Document Services (ADS) configured (standard report `FP_TEST_00`). - SAP user with `S_RFC` on the kit function group, plus the authorizations for the reports to run and for spool requests. - Node.js 22.19+ or 24 (to build the extension) and Python 3 (for the scripts). ## Installation 1. **Plugin** (the four skills), from Claude Code: ``` /plugin marketplace add silvius1996/claude-sap-kit /plugin install sap-arc1-kit@claude-sap-kit ``` 2. **Kit on the SAP system**: with ARC-1 connected, ask Claude *"install the ARC-1 kit on this system"*. The skill `sap-arc1-kit` goes through every step: prefix, creation and activation of the ABAP objects, ABAP Unit tests, build of the extension and `.mcp.json` configuration. The steps are also described in [skills/sap-arc1-kit/SKILL.md](skills/sap-arc1-kit/SKILL.md) if you prefer to do them by hand. 3. Restart Claude Code: the `Custom_*` tools appear after the restart. Minimal extension configuration in the ARC-1 server of `.mcp.json`: ```json "env": { "ARC1_PLUGINS": "/arc1-extension/dist/index.js", "SAP_ALLOW_PLUGIN_RAW_WRITES": "true" } ``` ## Safety The kit is designed to be safe even when an AI is driving it: - standard SAP objects are never changed; - SmartForms and Adobe forms are written only as copies with the kit prefix, in `$TMP`, created by the logged-on user; every overwrite first saves a local backup; - replacing a customer form needs a transport request given by the user, a `prepare` step with a summary and a one-time token, and is refused if the original or the copy changed in the meantime; for Adobe forms only the layout is replaced, in place, and only when the copy differs from the original in nothing else; - allowed packages, allowed requests and the author check are configured in the project `.mcp.json`; - nothing is ever deleted, with one exception: the SAP API cannot replace the context of an Adobe form, so an existing `ZAI_*` copy (own, in `$TMP`) is deleted and created again after its backup; - the skills ask for confirmation before running reports or print programs that change data. ## Business data and the model What a tool returns goes into Claude's context, and from there to the model provider under your agreement with them. The tools are not equal from this point of view: | Tool | What reaches the model | |---|---| | `Custom_SmartFormRead`, `Custom_SmartFormWrite`, `Custom_SmartFormReplace`, `Custom_AdobeFormRead`, `Custom_AdobeFormWrite`, `Custom_AdobeInterfaceWrite`, `Custom_AdobeFormReplace` | Form definitions: layout, texts and code. Customer code, but no business documents | | `Custom_LaunchReport` | **Business data**: the report output (ALV rows or list), for example stock, prices, customers | | `Custom_PrintPreview` | **Business data**: the printed document, with addresses, prices and quantities. The PDF is saved locally and reaches the model when Claude reads or compares it, as the skills do to check a form | Test systems are often copies of production, so "only development and test systems" does not keep real data out. Decide per system and per customer: - where business data must not leave the system, keep the report and preview tools off, for example with a deny rule in the project's `.claude/settings.json` (`arc1` is the name of the ARC-1 server in `.mcp.json`): ```json { "permissions": { "deny": ["mcp__arc1__Custom_LaunchReport", "mcp__arc1__Custom_PrintPreview"] } } ``` With ARC-1 in read-only mode all the kit tools are off, because they need writes enabled; - where the customer accepts it, keep selections narrow (one material and plant, not the whole stock), so that only the data needed for the task is read. ## Limits - Print output with NAST messages only: no S/4 Output Management (BRF+/APOC). - Editing: SmartForms (copies and replacement of the original) and Adobe forms (copies, `ZAI_*` interfaces and replacement of the layout of the original in its original language; context, interface and translations of a customer form are changed in SFP / SE63). SAPscript can be previewed but not edited. - Reports that open popups, `CALL SCREEN` or dialog transactions cannot be run. ## Tests ```bash cd skills/sap-arc1-kit/assets/arc1-extension npm ci --ignore-scripts npm test ``` The ABAP classes come with ABAP Unit tests: the installation skill runs them on the system. ## Featured in - [SAP MCP Servers, SAP AI Skills, and Claude Plugins](https://github.com/marianfoo/sap-ai-mcp-servers#community-sap-ai-skills--claude-plugins) by Marian Zeis, under *Community SAP AI Skills & Claude Plugins* ([interactive catalog](https://sap-ai-tools.marianzeis.de/)). ## License [MIT](LICENSE). ARC-1 is a separate project, also under the MIT license.