Skip to main content
Glama
sap-ui-automation

sap-ui-automation

by DidroAI

SAP UI MCP

Let AI agents see and interact with SAP screens.

An MCP server, CLI and SDK for Claude Code, Codex, Cursor, Copilot or your own agent, on SAP GUI for HTML (Web GUI), SAP Fiori and SAP GUI for Windows.

npm Chrome Web Store CI MIT

Docs · Quick start · Benchmark · Chrome extension · llms.txt

https://github.com/user-attachments/assets/d1cb2602-76b2-46d0-8757-982c35e9327d

Watch the launch video (8 min): the Chrome extension, one setup command, and Codex working in two SAP sessions at once.

Why

From a screenshot or a page's HTML, an agent has to guess which SAP field is which. SAP UI MCP reads the screen the way SAP models it and gives the agent one line per control, with SAP's own ids, labels, values and whether each can be edited. After an action it sends only what changed on the same screen.

TRANSACTION VA01  PROGRAM SAPMV45A  SCREEN 101  SYSTEM ABA (800)
WINDOW wnd[0]  "Create Sales Order: Initial Screen"
btn[8]  button  Create with Reference (F8)
ctxtVBAK-AUART  field  Order Type = "OR"  (edit)
ctxtVBAK-VKORG  field  Sales Organization = ""  (edit)

Use MCP for interactive work in coding agents. Across 104 matched Web GUI runs per method in our Claude Code pilot, MCP averaged 22 seconds, $0.0053 and 208k tokens per run. The CLI averaged 39 seconds, $0.0081 and 356k tokens. Counts include cache reads and writes. Use the CLI for shell scripts or an agent without MCP, and the SDK for repeatable tests. Benchmark and limitations

Related MCP server: Windows Computer Bridge MCP

Quick start

  1. Add the SAP UI MCP extension to Chrome.

  2. Run one command (Node.js 22 or later):

    npx -y sap-ui-automation setup --extension

    It finds the coding agents on your machine (Claude Code, Codex, Cursor, VS Code and Copilot, Gemini CLI and more), adds the MCP server and the skills to each, and installs the extension's helper. Restart Chrome and your agents once.

  3. Click the extension's icon, then Pair, and add your SAP systems.

Then ask your agent: "Look at my SAP screen and tell me which fields are required." For a repeatable workflow, ask the agent to record a display transaction in a dedicated test session, assert a value on the result, stop recording, then replay it. Example prompt

Set up sap-ui-automation for me (npm package sap-ui-automation, https://github.com/DidroAI/sap-ui-mcp). Say what each command does before you run it, and wait for me when I have to click something.
Rules: never type, ask for or store an SAP password, and never log on to SAP for me. Do not set or change SAP_WRITE. Do not save, post or change anything in SAP. Ask before you install software.
1. Check node -v is 22 or later; if not, tell me how to install it and stop.
2. Ask me to add the SAP UI MCP extension to Chrome: https://chromewebstore.google.com/detail/ui-automation-for-sap/geglpbkaklfpmnbidfcpflegmdkjodkn and wait.
3. Run npx -y sap-ui-automation setup --extension --dry-run, show me the result, then run it without --dry-run. Tell me to restart Chrome once, then to click the extension's icon, click Pair and add my SAP systems, and wait.
4. From here on, run commands with the environment variable SAP_BROWSER=extension (in the syntax of my shell). Run npx -y sap-ui-automation doctor. For each ✗, tell me what to do (the → line says it), wait, and run it again.
5. Ask me to open an SAP screen, then run npx -y sap-ui-automation sessions. Verify the intended session with me if several match. Run npx -y sap-ui-automation look --session "<verified-id>" --print with its actual ID, and describe the screen in three lines.
6. Report in at most ten lines: the version, the agents setup changed, each doctor area (✓ or ✗) and what is left for me, whether I must restart an agent, and the effective write setting. Explain whether this client can display or automatically accept confirmation requests (including Codex Full Access).

The longer version, also for SAP GUI for Windows: Set up with your agent.

Client

Claude Code

claude mcp add sap-ui-automation --scope user -- npx -y sap-ui-automation, or the plugin: /plugin marketplace add DidroAI/sap-ui-mcp, then /plugin install sap-ui-automation@sap-ui-automation

Codex

codex mcp add sap-ui-automation -- npx -y sap-ui-automation

Cursor

Add to Cursor

VS Code

Install in VS Code or code --add-mcp '{"name":"sap-ui-automation","type":"stdio","command":"npx","args":["-y","sap-ui-automation"]}'

Claude Desktop

open sap-ui-automation.mcpb from the latest release

Other MCP clients

a stdio server with the command npx -y sap-ui-automation

These use a Chrome window the server opens. For your own Chrome with the extension, add SAP_BROWSER=extension to the server's environment. Every client and Windows notes: Install in your client.

Run npx -y sap-ui-automation setup, then turn scripting on in SAP GUI (Options → Accessibility & Scripting → Scripting). The SAP system must allow it (sapgui/user_scripting = TRUE). Where it does not, the experimental network reader reads SAP GUI's traffic through a local SAProuter. Guide.

Benchmark

Our benchmark: six long SAP ECC processes (five of 10 to 15 screens, one of 7 screens and 24 steps), run with Claude Haiku 5.5, Sonnet 5.5 and Opus 5.5, 443 runs in all. A run passes when checks on the SAP database pass.

On Web GUI, against SAP UI MCP

Haiku 5.5

Sonnet 5.5

Opus 5.5

Playwright MCP: cost per success / time per run

7.6× / 5.4×

3.9× / 4.1×

2.6× / 3.6×

Claude computer use: cost per success / time per run

2.4× / 4.4×

2.1× / 3.0×

1.6× / 3.3×

SAP UI MCP: passed

12/12

12/12

12/12

SAP UI MCP also passed 12/12 on every model through SAP GUI scripting. On Haiku, a successful run cost $0.010 and took 43 s, against $0.024 and 191 s for computer use and $0.076 and 231 s for Playwright MCP. The other options passed most runs too; the difference is cost and time. Method, all tables and caveats: Benchmarks. The harness and raw results are not public yet.

Features

  • Reads SAP's own screen model. Ids, labels, values and what is editable, then only what changed after each action.

  • Configurable write controls. Under SAP_WRITE=confirm, flagged actions require an affirmative MCP client response. Codex Full Access can accept automatically. Use off to refuse flagged writes. Confirm mode

  • No credentials for the agent. Passwords stay in the OS keychain and the extension logs on; the agent never sees one.

  • Parallel sessions across systems and users.

  • A side panel shows each step the agent takes, and what waits for you.

  • Record and replay. Record a run, replay it as a test with no model (guide).

  • Any MCP client, plus a CLI for agents without MCP and an SDK for tests.

  • SAP GUI for Windows by scripting, on par with Web GUI, and an experimental network reader through a local SAProuter.

  • Runs locally. No telemetry, no hosted service (security).

Where it runs

Surface

Windows

macOS

Linux

How it is read

Web GUI

✓

✓

✓

Chrome, through the extension or a window the server opens

Fiori

✓

✓

✓

Chrome, the same ways

SAP GUI for Windows

✓

–

–

SAP GUI scripting; the network reader (experimental) where scripting is not allowed

SAP GUI for Java

–

–

–

not supported

Version 0.5: it works on real ECC and S/4HANA systems, but parts are young. Record and replay are checked live on Web GUI only. Not supported: SAP GUI for Java, Firefox, Safari, SNC-encrypted connections with the network reader.

Without MCP, and for tests

npm install -g sap-ui-automation
sap-gui look                              # the screen, written to a file
sap-gui act set ctxtVBAK-VBELN 4711       # one action

npm install --save-dev sap-ui-automation
npx sap-ui-automation init                # sap.config.ts, an example test, skills
npx sap-ui-automation test

Recordings export to Playwright, VBScript, Gherkin or SAP Cloud ALM.

Documentation

docs.didro.ai/sap-ui-automation, with llms.txt for agents. The same pages ship in the npm package under docs/, so an agent can read them offline.

Getting started · Chrome: Web GUI and Fiori · SAP GUI for Windows · Confirm mode · MCP tools · Configuration · CLI · FAQ · Comparison

Help and contributing

  • Setup does not work: run npx -y sap-ui-automation doctor, read the FAQ, then open a setup problem.

  • Bugs and ideas: issues. Leave real SAP data out.

  • Security issues: privately, as SECURITY.md says.

  • Code: CONTRIBUTING.md. The tests run without an SAP system.

Licence and trademarks

MIT, see LICENSE. Built by Didro.

Didro is a company building AI software that gives IT teams a living model of their SAP systems and business processes. Teams can use it to see what a change could affect, then design and run the tests needed to validate it.

Happy to chat to anyone interested in AI to improve SAP transformation: pierre@didro.eu

This project is not affiliated with, endorsed by or sponsored by SAP SE. SAP, SAP GUI, SAP Fiori, SAPUI5, SAP S/4HANA, ABAP and other SAP products and services mentioned here are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other names are the property of their owners.

Available Tools

7 tools
sap_actAct on the SAP screenA

Acts on the SAP screen; answers with the new screen, on the same screen only the changes ("~" changed line, "+" new, "-" gone, "=" unchanged), so sap_look after it is rarely needed. Ids from the latest view; the last part is enough. "STATUS E": the step did not go through, correct the field it names; W: Enter accepts it; S: done (document numbers). A new "WINDOW wnd[1]" is a popup: answer it before anything else. set only types: fill every field, then one Enter (key 0). Codes: f4 on the field lists them. do and its fields: set id, value; a table cell: id (the table), row, col; "\n" breaks lines in a text editor key key: Enter, Back, Execute, Save, Cancel, Exit, F1-F24, Shift+F3, or SAP's number press id (click too); btn[N] is function key N okcode value: "/nVA03" starts a transaction, "/oVA03" in a new session; it submits on its own (no Enter after it); the command field cannot be typed into select id (tab, radio, menu entry, list item); with row: a table row (value false: deselect) check id, value true|false combo id, key (entry key or text; without: lists them) f4, focus, dblclick id grid id, row, col, how double|select|cell tree id, node, how double|select|expand|collapse toolbar id, button scroll id, to: a row from 0, next, prev, first, last, left, right open app "#SalesOrder-manage" (Fiori launchpad) timeout: seconds per step (default 180). actions: [...] up to 20 in one call, a screen's fields then its key: [{"do":"set","id":"ctxtVBAK-AUART","value":"OR"},{"do":"key","key":0}]. Stops at the first surprise (failure, refusal, a write awaiting yes, popup, E/W/A status, another screen unless the next action's id is on it and it does not write; okcode "/n" and open go on into it). Per step: expect {"screen":"4001"}|{"screen":"*"} (any)|{"popup":true}|{"status":"W"} goes on through it; show:true adds the screen after it; unseen:true lets a write run on a screen first reached in the batch. Do not repeat a failed action unchanged. An action that may write (save, post, delete...) runs only after the user says yes in a dialog the client shows; if they decline, leave the transaction without saving (okcode /n), then ask how to go on. A client that cannot ask the user gets it refused: then tell the user what you would have saved.

Inputs: do, id, to, app, +11 more.

sap_lookLook at the SAP screenA
Read-onlyIdempotent

The SAP screen as compact text: header, one line per control (id, type, label = "value", state), tables as rows, popups as WINDOW, status bar last. Call it first, for the ids; after sap_act it is rarely needed (that answer is the new screen). Again only to read more: a grid or list shows the rows on screen and the total, read others with id and rows (200 at most), never conclude an entry is missing from the rows on screen; a dropdown, tree or text whole: id; menus: id "mbar", one menu whole: id "menu[2]"; toolbar buttons and hidden ids: full. Charts: sap_screenshot.

Inputs: id, cols, diff, full, +2 more.

sap_recordRecord the SAP session as a testA

Turns what you do with sap_act into a test that sap_replay runs without a model. Use it only when the user asks to record, automate or regression-test a flow. In order: start (name), an okcode that opens the transaction, your sap_act steps, assert after the step it checks, stop (writes the file); code gives the steps as a script. {"op":"help"} lists every op with its fields and examples; a call that lacks a field says which. Typed values are written as typed: do not record secrets.

Inputs: op (required), id, to, from, +12 more.

sap_replayReplay a recorded SAP testA

Runs a recording (sap_record) again on the active session with no model, under the same write setting and transaction lists as sap_act. Use it to re-run a recorded flow, also on other data with "variables", e.g. {"order":"4711"}. Answers PASS or FAIL per step; a failure gives the screen there and how to go on (from, repair). Stop a recording first.

Inputs: from, name, format, repair, +4 more.

sap_screenshotScreenshot of the SAP sessionA
Read-onlyIdempotent

A PNG of the session's window or tab, only for what sap_look cannot give as text (charts, areas the view marks opaque) or when the user asks for a picture: it costs several text views. Never to find ids.

Inputs: session.

sap_sessionsList open SAP sessionsA
Read-onlyIdempotent

The SAP sessions open (SAP GUI windows; Web GUI and Fiori tabs in Chrome); * marks the active one. Needed only with several sessions, or when a tool says none matches. Parallel work: one session per task and its session on every call; calls on different sessions run at once, calls on one session wait their turn. An okcode /o opens a new session of the same logon. None: ask the user to open SAP and log on; this server never logs on.

Inputs: no named parameters.

sap_useSwitch the active SAP sessionA
Read-onlyIdempotent

Makes another session the active one and answers with its screen. Only to switch between several sessions; every other tool also takes "session" for one call.

Inputs: session (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 7 tools

    Disambiguation4/5

    Each tool has a mostly distinct role: reading the screen, acting on it, switching sessions, capturing images, recording, replaying, and listing sessions. The only mild overlap is sap_use versus sap_sessions, since both concern session management, but their descriptions clarify the boundary.

    Naming Consistency4/5

    All tools share a predictable sap_ prefix and short action-oriented names. The pattern is not a strict verb_noun form, and sap_sessions is a noun rather than a verb, which is a minor deviation.

    Tool Count5/5

    Seven tools is well-scoped for an SAP UI automation server. Each tool covers a distinct part of the workflow: inspection, interaction, session handling, screenshots, recording, and replay.

    Completeness4/5

    The surface covers the core automation lifecycle well: read screen, act, handle sessions, capture visuals, record flows, and replay them. Minor gaps exist around explicit logon/logoff and file or clipboard operations, but the server intentionally leaves logon to the user.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI clients to inspect and control allowlisted Windows applications using screenshots, mouse actions, Unicode keyboard input, UI Automation, and an Esc/F12 emergency stop.
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to drive SAP GUI for Windows through the SAP GUI Scripting API — connecting to systems, running transactions, reading and writing screen fields, extracting ALV grid, table, tree, and report-list data, and capturing screenshots. Includes server-enforced confirmation points and previews so nothing is written to SAP without explicit user approval.
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents to observe and control local browsers and desktop applications over MCP, including reading UI elements and differences, capturing images, and performing permitted clicks, typing, selections, scrolling, and multi-window operations.
      16
      2
      MIT