sap-mcp
Provides tools for interacting with SAP S/4HANA via the ADT API, enabling management of ABAP development objects such as classes, interfaces, tables, structures, function modules, CDS views, and more. Includes capabilities for reading, creating, updating, syntax checking, where-used analysis, ATC checks, and transport management.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sap-mcp query table T000 for MANDT and MTEXT"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
sap-mcp
MCP server for SAP S/4HANA via the ADT API. Runs locally over stdio.
Setup on a new machine
Prerequisites (install these first):
Node.js >= 20.12 (needs
process.loadEnvFile; also providesnpm) — requiredClaude Code — required to use the server (only the registration step needs it)
Network/VPN reachability to your SAP hosts (e.g.
fiori-dev...) — requiredgit — optional; only used for
git clone. No git? See below. (To install on Windows:winget install --id Git.Git -e, then reopen your terminal. macOS:brew install git. Verify withgit --version.)
Then, open a terminal, navigate to the folder where you want to keep sap-mcp (we recommend your home directory), and clone:
OS | Recommended location | Command to get there |
Windows |
|
|
macOS / Linux |
|
|
# Windows (PowerShell or Command Prompt) — clone into your home folder:
cd $env:USERPROFILE
git clone https://github.com/abap-studio/sap-mcp.git
cd sap-mcp
# macOS / Linux — clone into your home folder:
cd ~
git clone https://github.com/abap-studio/sap-mcp.git
cd sap-mcpAfter cloning, continue:
npm install
cp .env.example .env # PowerShell/CMD: copy .env.example .envNo git? Instead of
git clone, download the repo from GitHub: green Code button -> Download ZIP, unzip it into your home folder (so the result isC:\Users\<name>\sap-mcpon Windows or~/sap-mcpon Mac/Linux), thencdinto the folder and continue fromnpm install. (git is only nicer later, for pulling updates withgit pull.)
Now edit .env and fill in the real HOST/CLIENT for each system plus
your own SAP USER/PASS. The real hostnames are intentionally not in this
repo — get them from whoever maintains it. Then verify and register:
node test.mjs # PASS = install OK (does NOT check credentials)
node test.mjs --live # PASS = credentials + SAP reachable <-- the real proof
# Register with Claude Code (use the ABSOLUTE path to server.js on this machine):
claude mcp add sap-adt --scope user -- node C:\Users\<name>\sap-mcp\server.jsStart a fresh Claude Code session afterwards for the server to load.
node test.mjsreports PASS even before you edit.env— it only checks that the server boots and loads profiles.node test.mjs --liveis what actually confirms your credentials and SAP connectivity.
Related MCP server: adt-mcp
Updating an existing install
If you already have sap-mcp set up, pull the latest and restart Claude Code:
cd sap-mcp
git pull # no git? re-download the ZIP over your folder (keep your .env)
npm install # only needed if dependencies changed; harmless to run anyway
node test.mjs # confirm it still bootsYou do not need to re-run claude mcp add — the registration persists. Your
.env is never touched by an update (it's gitignored), so your credentials and
profiles carry over.
Important — quit and restart Claude Code after updating. New tools are only discovered when a Claude Code session starts. If an update adds a tool (like
create_programbelow), a reconnect or/mcprefresh is not enough: fully quit Claude Code and open a fresh session. (Behaviour-only changes to existing tools just need the server to respawn, which a new session also does.)
To confirm the update loaded, start a fresh session and ask Claude to run
list_servers, or check that the new tool is available.
What's new (2026-07)
This release roughly doubles the toolset (25 → 45). These are new tools, so you must fully quit and restart Claude Code after updating (see the note above).
Source editors for the objects that were create-only. You could previously create a class but never edit one — that's fixed:
update_class/patch_class,update_bdef/patch_bdef,update_srvd/patch_srvd,update_cds/patch_cds,update_function_module. Each locks → writes → unlocks and can activate; thepatch_*variants do a surgical exact-string replace and refuse to write when the target text matches zero or more than one time.syntax_check— run ADT's syntax/consistency check on an object without activating it. Read-only and safe on any profile, including production. Use it after writing source and beforeactivate_object; passversion:"inactive"to check source you have saved but not yet activated.New object types:
create_structure/update_structure/patch_structure(DDIC structures),create_interface/update_interface/patch_interface,create_ddlx/update_ddlx/patch_ddlx(CDS metadata extensions — the UI annotations a Fiori Elements app needs),create_domain,create_data_element,create_function_group,create_function_module.where_used— the ADT where-used list: find everything that depends on an object before you change or delete it. Read-only; results are capped and the true total is always reported (a common table can have tens of thousands).run_atc— run an ATC (ABAP Test Cockpit) static-analysis check on an object and report the findings. Read-only. Picks up the system's configured check variant automatically. Usesyntax_checkfor fast error checking andrun_atcbefore releasing a transport.list_transports— find your open transport requests, so you can pass a real request number to the create/update tools.Fix:
get_object_infonow sendsAccept: */*, so DDIC metadata (domains, data elements, tables) is readable instead of failing with HTTP 406.update_table/patch_table— modify an EXISTING DDIC table's source:update_tableoverwrites the whole definition,patch_tabledoes a surgical exact-string replace (add/change a field). Both lock → write → unlock and optionally activate; blocked on production. Mirrors theupdate_program_source/patch_program_sourcepair. New tools — restart Claude Code after updating (see above).create_program— create a brand-new classic ABAP report (executable program,PROG/P) and activate it in one call. Previously the server could only edit an existing program; now it can create one from scratch. Refuses to run on production profiles. This is a new tool, so you must restart Claude Code after updating (see above).insert_table_record/update_table_record— insert or update one row in a customZ*/Y*table through a temporary ABAP classrun. Updates require key fields that match exactly one row; both tools requireconfirm: trueand are blocked on read-only profiles. Restart the MCP client after updating so it discovers the new tools.Data-driven profiles — profiles are now discovered from your
.env: everySAP_<KEY>_HOSTyou define becomes a switchable profile named<KEY>, with no code change needed to add a system. Profile switching is case-insensitive.Production write-block widened — writes are now blocked on both
ABLP(production) andABLQ(QAS). Read access still works on every profile.
Streamable HTTP transport (Microsoft Copilot Cowork)
By default sap-mcp runs over stdio — the mode used by Claude Code and ABAP
Studio. If you need to connect a client that requires Streamable HTTP (such
as Microsoft Copilot Cowork), set two environment variables in .env before
starting the server:
MCP_HTTP_PORT=3100
MCP_HTTP_TOKEN="change-me-to-a-long-random-secret"When MCP_HTTP_PORT is set the server binds to http://127.0.0.1:<port>/ and
requires every request to carry Authorization: Bearer <token>. Stdio mode is
used automatically when the variable is absent or 0.
Security note: The server binds to
127.0.0.1(localhost) only — it is not reachable from other machines. To expose it externally (e.g. to Microsoft Copilot Cowork in the cloud) you need a tunnel such as devtunnel:devtunnel host --port 3100Always set a strong, random
MCP_HTTP_TOKENbefore tunnelling.
Connecting Copilot Cowork
Add the variables above to your
.envand start the server:npm run start-httpCreate a tunnel and copy the public URL (e.g.
https://abc123.devtunnels.ms/).In Copilot Cowork, add an MCP server with:
URL:
<tunnel-url>Authentication: Bearer token → paste your
MCP_HTTP_TOKENvalue
Testing your install
The node test.mjs / node test.mjs --live steps above are the self-check
(npm test runs the structural one). The bundled harness talks to the server
over stdio — no Claude Code needed.
Once registered, you can also verify through Claude Code — ask it to run
list_servers, or a query_table with SELECT MANDT, MTEXT FROM T000.
Credentials
Each person uses their own named SAP user per system. All connection
details and credentials live in .env (gitignored); server.js contains no
real hostnames. Never commit or share .env — sharing a service account breaks
the SE24/transport audit trail and usually violates license terms.
Fill in HOST, CLIENT, USER and PASS for each profile in .env. Every
SAP_<KEY>_HOST you define becomes a switchable profile named <KEY> — the
list below is illustrative, not fixed, so add or rename systems freely:
Profile | Role |
| Development |
| Development (client 120) |
| QA/Test |
| QAS (read-only) |
| Production |
| S/4HANA on-prem |
Protecting a system from writes
Add a READONLY (or PROD) flag next to any profile in .env and every write
on it — create, edit, activate — is refused. Reads keep working:
SAP_PRD2_HOST="https://sap-prd2.example.com:44300"
SAP_PRD2_CLIENT="100"
SAP_PRD2_USER=""
SAP_PRD2_PASS=""
SAP_PRD2_READONLY=true # or SAP_PRD2_PROD=trueAccepted values: true / 1 / yes / y / X. Do this for every
production system you add — no code change needed. Add
SAP_PRD2_LABEL="Production" to control how the profile is described by
list_servers.
The flag protects a profile, not a system. If two profiles point at the same host and client, flag both — otherwise writes still reach that client through the unflagged one.
ABLP and ABLQ are also blocked by a built-in list in server.js, so they
stay protected even if the flag is missing. The two sources are additive: a
missing flag can never unblock a system that was protected before.
Run list_servers to confirm — protected profiles are shown as [read-only].
A blocked write reports which rule stopped it.
Disclaimer
This software is provided "as is", without warranty of any kind, express or implied. You use it entirely at your own risk.
No liability. The author accepts no responsibility for any damage, data loss, downtime, security incident, or other harm — to your computer, your SAP systems, or your data — arising from the use, misuse, or inability to use this software.
Your access, your responsibility. You supply your own SAP credentials in
.env. Keep that file private, use your own named user, and connect only to systems you are authorized to access.Production risk remains. Writes to the
ABLP(production) profile are blocked, but the tool can still read from any system you configure. Use it at your own discretion.Compliance is on you. Ensure your use complies with your organization's policies and your SAP license terms before connecting.
Not affiliated with SAP. SAP and S/4HANA are trademarks of SAP SE. This is an independent, unofficial tool and is not endorsed by or affiliated with SAP SE.
License
MIT. The license text includes the binding "as is" / no-warranty / no-liability terms; the Disclaimer above restates them in plain language.
Available Tools
93 toolsactivate_objectA
Activate one or more existing ABAP objects and report the raw activation result. Pass a single object (objectUri + objectName), or several at once via objects - activating together is required for mutually-dependent RAP objects, e.g. a behavior definition and its behavior implementation class. Blocked on production profiles.
Inputs: objects, objectUri, objectName.
check_transport_lockA
Check whether an object is ALREADY locked/registered in some other open transport request - the thing that causes 'object is locked in request X' conflicts. Also lists which of your own open requests the object could be assigned to. This is a dry-run check (verified against the ADT 'transportchecks' endpoint abap-adt-api uses) - it changes nothing. Read-only and safe on any profile.
Inputs: objectUri (required), devclass, operation.
create_bdefA
Create a new Behavior Definition (BDEF) in SAP and activate it. Refuses to run on production profiles. bdefName must equal the root entity the behavior is for, and that entity must already exist. Provide the complete source (e.g. 'managed implementation in class unique; define behavior for ... { ... }'). A managed BDEF needs its persistent table + implementation class to exist for activation to succeed. Needs a transport unless package is $TMP.
Inputs: source (required), bdefName (required), description (required), packageName (required), +2 more.
create_cdsA
Create a new CDS view (Data Definition / DDLS) in SAP and activate it. Refuses to run on production profiles. Provide the complete CDS source (e.g. 'define view entity as select from ... { ... }'); the entity name in the source must match cdsName. Needs a transport unless package is $TMP.
Inputs: source (required), cdsName (required), description (required), packageName (required), +2 more.
create_classA
Create a new ABAP class in SAP and activate it. Refuses to run on production profiles. Needs the full source (CLASS...DEFINITION...ENDCLASS. CLASS...IMPLEMENTATION...ENDCLASS.) and a transport request when the package is transportable.
Inputs: source (required), className (required), description (required), packageName (required), +2 more.
create_data_elementA
Create a new DDIC data element (DTEL/DE) and optionally activate it. Either point it at a domain (typeKind='domain', typeName=) or give a built-in type (typeKind='predefinedAbapType' with dataType/length). Field labels are what users see on screens. Refuses to run on production profiles.
Inputs: description (required), packageName (required), dataElementName (required), length, +10 more.
create_dclA
Create a new Access Control / DCL source (DCLS) for a CDS view and activate it. Refuses to run on production profiles. Provide the complete DCL source, e.g. "define role { grant select on where () = aspect pfcg_auth(, , ACTVT = '03'); }" - the role name must match dclName. Needs a transport unless package is $TMP.
Inputs: source (required), dclName (required), description (required), packageName (required), +2 more.
create_ddlxC
Create a new CDS metadata extension (DDLX) - the object that carries UI annotations for a CDS view, which a Fiori Elements app needs. Refuses to run on production profiles. Source looks like: @Metadata.layer: #CORE annotate view ZI_FOO with { @UI.lineItem: [{position: 10}] field; }
Inputs: source (required), ddlxName (required), description (required), packageName (required), +2 more.
create_domainB
Create a new DDIC domain (DOMA/DD) and optionally activate it. A domain defines the technical type (datatype/length/decimals) and optional fixed values. Refuses to run on production profiles.
Inputs: length (required), datatype (required), domainName (required), description (required), +6 more.
create_enhoA
Create a new hook Enhancement Implementation (ENHO/XHH) in SAP and activate it. Refuses to run on production profiles. The source must contain at least one ENHANCEMENT block. Example: 'ENHANCEMENT 1 <enho_name>. " code ENDENHANCEMENT.' For BAdI implementations (ENHO/XHB) create the implementing class instead. Needs a transport unless package is $TMP.
Inputs: source (required), enhoName (required), description (required), packageName (required), +2 more.
create_function_groupA
Create a new function group (the container that holds function modules). Refuses to run on production profiles. Add modules afterwards with create_function_module. Needs a transport unless package is $TMP.
Inputs: description (required), packageName (required), functionGroup (required), transport.
create_function_moduleA
Create a new function module inside an EXISTING function group, write its source, and optionally activate. Refuses to run on production profiles. Create the group first with create_function_group. Provide the full source/main text (FUNCTION . ... ENDFUNCTION.).
Inputs: source (required), description (required), functionGroup (required), functionModule (required), +2 more.
create_includeA
Create a new classic ABAP INCLUDE program (type PROG/I) in SAP and activate it - a SEPARATE ADT collection from create_program's executable reports (PROG/P), verified against the open-source abap-adt-api client rather than guessed: /sap/bc/adt/programs/includes, not /programs/programs. Refuses to run on production profiles. No INCLUDE statement is added to any main program here - do that separately with patch_program_source on the program that should include it.
Inputs: source (required), description (required), includeName (required), packageName (required), +2 more.
create_interfaceA
Create a new ABAP interface and optionally activate it. Refuses to run on production profiles. Needs the full source (INTERFACE PUBLIC. ... ENDINTERFACE.).
Inputs: source (required), description (required), packageName (required), interfaceName (required), +2 more.
create_message_classA
Create a new empty Message Class (MSAG) and optionally activate it. A message class is a named container for numbered messages (T100 texts) used by MESSAGE/RAISE statements and RAP failed/reported responses. Creates the empty class only - add messages afterwards with patch_message_class. Refuses to run on production profiles.
Inputs: description (required), packageName (required), messageClassName (required), activate, +1 more.
create_programA
Create a new classic ABAP program (executable report, type PROG/P) in SAP and activate it. Refuses to run on production profiles. Needs the full report source (REPORT ... / logic) and a transport request when the package is transportable (omit for $TMP local programs).
Inputs: source (required), description (required), packageName (required), programName (required), +2 more.
create_sfpfA
Create a new Adobe Form Layout (SFPF) in SAP and write its initial XDP source. Requires an existing Form Interface (SFPI) — create that first with create_sfpi. Refuses to run on production profiles. If no source is supplied, writes a minimal A4 XDP shell with one page and a text placeholder.
Inputs: package (required), formName (required), description (required), interfaceName (required), +3 more.
create_sfpiA
Create a new Adobe Form Interface (SFPI) in SAP and write its initial context XML. Refuses to run on production profiles. The interface defines parameters (IMPORT/EXPORT) and global data available to the form layout. After creation, create the matching form layout with create_sfpf.
Inputs: package (required), description (required), interfaceName (required), source, +2 more.
create_smartformA
Create a new Smartform (STXFORMS) in SAP with an initial XML definition. Refuses to run on production profiles. If no source is supplied a minimal single-page shell is written. The Smartform XML must include the root SMARTFORMS element with FORMATTRIB, PAGES, and WINDOWS sections.
Inputs: package (required), description (required), smartformName (required), source, +2 more.
create_srvbA
Create a Service Binding (SRVB) that exposes a service definition as an OData service, then activate and publish it. Refuses to run on production profiles. The service definition must already exist and be active. Publishing may require a transport on clients set to auto-record; if it can't publish, the binding is still created and active.
Inputs: srvbName (required), description (required), packageName (required), serviceDefinition (required), +4 more.
create_srvdA
Create a new Service Definition (SRVD) in SAP and activate it. Refuses to run on production profiles. Provide the complete source (e.g. 'define service { expose ; }'); the service name must match srvdName. Needs a transport unless package is $TMP.
Inputs: source (required), srvdName (required), description (required), packageName (required), +2 more.
create_structureA
Create a new DDIC structure (TABL/DS) from DDL source and optionally activate it. Refuses to run on production profiles. Source looks like: define structure zst_foo { field : abap.char(10); }
Inputs: source (required), description (required), packageName (required), structureName (required), +2 more.
create_tableA
Create a new DDIC transparent table (TABL) in SAP and activate it. Refuses to run on production profiles. Provide the complete DDL source (define table { ... }) INCLUDING the standard annotations (@AbapCatalog.tableCategory : #TRANSPARENT, @AbapCatalog.deliveryClass, @AbapCatalog.dataMaintenance), else the source is rejected. The table name in the source must match tableName. Needs a transport unless package is $TMP.
Inputs: source (required), tableName (required), description (required), packageName (required), +2 more.
create_table_typeA
Create a new DDIC table type (TTYP/DA) - the ABAP type for an internal table - and optionally activate it. Point it at a dictionary type (structure/data element/table) with rowTypeKind='dictionaryType' and rowTypeName, or at a built-in type with rowTypeKind='predefinedAbapType' plus dataType/length. Refuses to run on production profiles.
Inputs: description (required), packageName (required), tableTypeName (required), length, +8 more.
create_transportA
Create a NEW transport request (a workbench request, CTS type K) for a package - the write counterpart to list_transports/get_transport_details. Use this when list_transports found no suitable open request and an object needs a request number before it can be created/updated. Refuses to run on production/read-only profiles. Returns the new request number, ready to pass as transport to the create/update tools.
Inputs: devclass (required), description (required), transportLayer.
get_bsp_fileA
Read the raw content of a single file inside a deployed BSP/UI5 repository app (e.g. Component.js, a controller, manifest.json). Use list_bsp_files first to confirm the exact relative path. Read-only, safe on any profile including production.
Inputs: bspName (required), filePath (required).
get_cds_sourceB
Read the DDL source of a CDS view from SAP S/4HANA
Inputs: cdsName (required).
get_class_sourceB
Read the ABAP source code of a class's main include (definition + implementation) from SAP S/4HANA
Inputs: className (required).
get_ddlx_sourceA
Read the source of an existing CDS metadata extension (DDLX) from SAP. Use this before update_ddlx or patch_ddlx to see what is already there. Read-only, safe on any profile.
Inputs: ddlxName (required).
get_enho_sourceA
Read the ABAP source of a hook Enhancement Implementation (ENHO/XHH) from SAP. Returns the full implementation source with all ENHANCEMENT blocks. Only ENHO/XHH (hook) objects have a text source - for BAdI implementations (ENHO/XHB) read the implementing class with get_class_source instead.
Inputs: enhoName (required), subtype.
get_function_module_sourceA
Read the source of an existing ABAP function module. Use this before update_function_module or patch_function_module to see what is already there. Pass the function group WITHOUT the SAPL prefix (e.g. ZFOO, not SAPLZFOO). Read-only, safe on any profile including production.
Inputs: functionGroup (required), functionModule (required).
get_object_infoB
Get metadata/details about an ABAP object (program, function group, class, etc.)
Inputs: objectUri (required).
get_outlineA
Get the structural outline of an ABAP object — lists its components such as includes, FORM routines, local class definitions, selection screens, and events without reading the full source. Essential for navigating large standard SAP programs before deciding which includes to fetch. Pass the object's ADT URI without '/source/main', e.g. /sap/bc/adt/programs/programs/myprog or /sap/bc/adt/oo/classes/zcl_myclass.
Inputs: objectUri (required).
get_program_sourceC
Read the ABAP source code of a program from SAP S/4HANA
Inputs: programName (required).
get_selection_textsA
Read the raw SELECTION TEXTS (the labels shown next to PARAMETERS and SELECT-OPTIONS on the selection screen) for an existing ABAP program or function group. This is a separate ADT sub-resource from text symbols (get_text_elements) - the two must be written independently. Returns line-based NAME=Label pairs as ADT stores them. Read-only, safe on any profile including production.
Inputs: objectName (required), objectType.
get_sfpf_sourceA
Read the XDP layout source of an Adobe Form (SFPF object, SFP transaction). Returns the XFA/XDP XML that defines pages, subforms, fields, and layout. Safe on any profile.
Inputs: formName (required).
get_sfpi_sourceA
Read the source XML of an Adobe Form Interface (SFPI object, SFP transaction). Returns the interface context XML that defines parameters, global data, and data bindings. Safe on any profile.
Inputs: interfaceName (required).
get_smartform_sourceA
Read the XML source of an existing SAP Smartform (STXFORMS object, SE71 transaction). Returns the full Smartform definition XML including form attributes, pages, windows, text nodes, and graphic nodes. Safe on any profile.
Inputs: smartformName (required).
get_table_infoA
Get structure and field definitions of a SAP DDIC table or structure (e.g. EKKO, MARA, BSEG). Works for both transparent tables (TABL/TRANSP) and structures (TABL/DS) - falls back automatically.
Inputs: tableName (required).
get_text_elementsA
Read the raw TEXT SYMBOLS (TEXT-xxx) text-pool content for an existing ABAP program, class, or function group - the read-only counterpart to patch_text_elements (which can only write, not read). Returns the exact raw content ADT returns (line-based id=text pairs, with an @MaxLength:n marker where set) - useful for seeing precisely what's stored when debugging a mismatch, rather than guessing from patch_text_elements' own merge log. Read-only, safe on any profile including production.
Inputs: objectName (required), objectType.
get_transport_detailsA
Inspect ONE transport request: its description/owner/status, its tasks (with their own owners/status), and every ABAP object registered under it. Use this to see what a transport actually contains before releasing it, or to check who owns which task. Read-only and safe on any profile.
Inputs: transport (required).
insert_table_recordA
Insert one record into a customer Z*/Y* table through ABAP Open SQL. Requires confirm:true and a writable SAP profile.
Inputs: values (required), confirm (required), tableName (required).
list_bsp_filesA
List the files/folders inside a deployed BSP/UI5 repository app (e.g. a Fiori app's webapp folder) - read-only. Use this to find the exact relative path of a file before calling get_bsp_file/update_bsp_file. This is a SEPARATE repository from PROG/CLAS/CDS - no other tool can browse it.
Inputs: bspName (required), folderPath.
list_class_includesA
List a class's separate ADT includes - e.g. local types (the CCIMP include / 'Local Types' tab in ADT), macros, test classes - each a DIFFERENT source object from the class's own main source (/source/main = DEFINITION/IMPLEMENTATION only). Run this BEFORE patch_class_include: it reports the exact includeType string THIS system uses (never guessed) so you can target the right one. Read-only, safe on any profile including production.
Inputs: className (required).
list_package_objectsC
List all repository objects inside an SAP package (programs, classes, CDS views, tables, structures, data elements, domains, function groups, and everything else in it)
Inputs: packageName (required), maxResults.
list_serversB
List all available SAP server profiles and show which one is currently active
Inputs: no named parameters.
list_transportsA
List transport requests for a user (default: the profile's own user). Read-only and safe on any profile. Use it to find an open request number to pass as transport to the create/update tools.
Inputs: user, status.
patch_bdefA
Modify PART of an existing behavior definition (BDEF) without resending the whole source. Reads the current source, replaces oldString with newString (must match EXACTLY ONCE), then locks, PUTs, unlocks, and optionally activates. Refuses to run on production profiles.
Inputs: bdefName (required), newString (required), oldString (required), activate, +1 more.
patch_bsp_fileA
Modify PART of an existing BSP/UI5 repository file without resending the whole content. Reads the current content, replaces oldString with newString (must match EXACTLY ONCE), then writes it back. Prefer this over update_bsp_file for small edits. Refuses to run on production profiles.
Inputs: bspName (required), filePath (required), newString (required), oldString (required), +1 more.
patch_cdsA
Modify PART of an existing CDS view's DDL without resending the whole source. Reads the current source, replaces oldString with newString (must match EXACTLY ONCE), then locks, PUTs, unlocks, and optionally activates. Prefer this over update_cds for small edits like adding a field or annotation. Refuses to run on production profiles.
Inputs: cdsName (required), newString (required), oldString (required), activate, +1 more.
patch_classA
Modify PART of an existing ABAP class without resending the whole source. Reads the current source, replaces oldString with newString (must match EXACTLY ONCE), then locks, PUTs, unlocks, and optionally activates. Prefer this over update_class for small edits like changing one method body. Refuses to run on production profiles.
Inputs: className (required), newString (required), oldString (required), activate, +1 more.
patch_class_includeA
Modify PART of a class's SEPARATE include - local types (CCIMP / 'Local Types' tab), macros, or test classes - none of which live in /source/main (patch_class/update_class cannot reach these). Run list_class_includes FIRST to get the exact includeType string. Reads the include's current source, replaces oldString with newString (must match EXACTLY ONCE), locks the class, PUTs to the discovered include source, unlocks, and optionally activates the class. Refuses to run on production profiles.
Inputs: className (required), newString (required), oldString (required), includeType (required), +2 more.
patch_dclA
Modify PART of an existing Access Control / DCL source (e.g. change one condition). Replaces oldString with newString (must match EXACTLY ONCE). Refuses to run on production profiles.
Inputs: dclName (required), newString (required), oldString (required), activate, +1 more.
patch_ddlxA
Modify PART of an existing CDS metadata extension (e.g. add one @UI annotation). Replaces oldString with newString (must match EXACTLY ONCE). Refuses to run on production profiles.
Inputs: ddlxName (required), newString (required), oldString (required), activate, +1 more.
patch_enhoA
Modify PART of an existing hook Enhancement Implementation (ENHO/XHH) without resending the whole source. Reads the current source, replaces oldString with newString (must match EXACTLY ONCE), then locks, PUTs, unlocks, and optionally activates. Refuses to run on production profiles. Use this to add/change a single ENHANCEMENT block or a few lines inside one. For BAdI implementations use patch_class on the implementing class.
Inputs: enhoName (required), newString (required), oldString (required), activate, +1 more.
patch_function_moduleA
Modify PART of an existing ABAP function module. Function-module source lives inside a function group, so it must be locked/written through the fmodules URI - patch_program_source CANNOT do it (SAP rejects locking LU as R3TR PROG). Reads the current source, replaces oldString with newString (must match EXACTLY ONCE), then locks, PUTs, optionally activates, and unlocks. Refuses to run on production profiles. Look up the group first if unsure: SELECT FUNCNAME, PNAME FROM TFDIR - PNAME 'SAPLZFOO' means group 'ZFOO'.
Inputs: newString (required), oldString (required), functionGroup (required), functionModule (required), +2 more.
patch_interfaceA
Modify PART of an existing ABAP interface (e.g. add one method signature). Replaces oldString with newString (must match EXACTLY ONCE). Refuses to run on production profiles.
Inputs: newString (required), oldString (required), interfaceName (required), activate, +1 more.
patch_message_classA
Add or update ONE numbered message (T100 text) in an existing Message Class, then optionally activate. Writes directly to that message's own sub-resource - confirmed against the ADT discovery document (/sap/bc/adt/messageclass/{name}/messages/{msgno}), the same endpoint the atom:link on a GET of the class points to for each message. PUT is an upsert: works whether the number already exists or not. Use &1 &2 &3 &4 in text as placeholders for MESSAGE ... WITH values. Refuses to run on production profiles.
Inputs: text (required), msgno (required), messageClassName (required), activate, +2 more.
patch_program_sourceA
Modify PART of an existing ABAP program or include without resending the whole object. Reads the current source, replaces oldString with newString (must match EXACTLY ONCE), then locks, PUTs, optionally activates, and unlocks. Prefer this over update_program_source for edits - it removes any risk of corrupting the object by re-transmitting untouched code. Refuses to run on production profiles.
Inputs: newString (required), oldString (required), programName (required), activate, +1 more.
patch_selection_textsA
Add or update SELECTION TEXTS (the labels shown next to PARAMETERS / SELECT-OPTIONS on the selection screen) for an existing ABAP program or function group. This is a SEPARATE ADT sub-resource from text symbols (patch_text_elements) - the two cannot be written in one call. Reads the current selection texts, merges in the given ones (matched by parameter/select-option name, case-insensitive; existing entry is overwritten, new one is added), then writes the merged result back. Existing entries not mentioned are left untouched. No activation needed - selection texts take effect immediately once saved. Refuses to run on production profiles.
Inputs: objectName (required), selections (required), transport, objectType.
patch_sfpfA
Modify part of an existing Adobe Form Layout (SFPF) by replacing an exact string in the XDP. oldString must match exactly once. Use to add fields, change text, or update bindings without resending the entire XDP. Refuses to run on production profiles.
Inputs: formName (required), newString (required), oldString (required), activate, +1 more.
patch_sfpiA
Modify part of an existing Adobe Form Interface (SFPI) by replacing an exact string. oldString must match exactly once. Refuses to run on production profiles.
Inputs: newString (required), oldString (required), interfaceName (required), activate, +1 more.
patch_smartformA
Modify part of an existing Smartform (STXFORMS) by replacing an exact string in its XML. oldString must match exactly once. Refuses to run on production profiles.
Inputs: newString (required), oldString (required), smartformName (required), activate, +1 more.
patch_srvdA
Modify PART of an existing service definition (SRVD) without resending the whole source - e.g. exposing one more entity. Reads the current source, replaces oldString with newString (must match EXACTLY ONCE), then locks, PUTs, unlocks, and optionally activates. Refuses to run on production profiles.
Inputs: srvdName (required), newString (required), oldString (required), activate, +1 more.
patch_structureA
Modify PART of an existing DDIC structure's DDL (e.g. add one field). Replaces oldString with newString (must match EXACTLY ONCE). Refuses to run on production profiles.
Inputs: newString (required), oldString (required), structureName (required), activate, +1 more.
patch_tableA
Modify PART of an existing DDIC database table's DDL without resending the whole definition. Reads the current source, replaces oldString with newString (must match EXACTLY ONCE), then locks, PUTs, unlocks, and optionally activates. Prefer this over update_table for small edits like adding a field. Refuses to run on production profiles. Activating a structure change may convert the DB, so activate defaults to false.
Inputs: newString (required), oldString (required), tableName (required), activate, +1 more.
patch_table_typeA
Modify PART of an existing DDIC table type's XML definition (e.g. change accessType, keyKind, or the row type). Replaces oldString with newString (must match EXACTLY ONCE) in the object's raw XML - read it first with get_object_info to see the exact text to target. Refuses to run on production profiles.
Inputs: newString (required), oldString (required), tableTypeName (required), activate, +1 more.
patch_text_elementsA
Add or update TEXT SYMBOLS (TEXT-xxx) for an existing ABAP program, class, or function group. This is a SEPARATE ADT object from the source code - update_program_source/update_class etc. cannot touch it. Reads the current text symbols, merges in the given ones (matched by 3-character id, case-insensitive; an existing id is overwritten, a new one is added), then writes the merged result back. Existing symbols not mentioned are left untouched. No activation needed - text elements take effect immediately once saved. Refuses to run on production profiles.
Inputs: symbols (required), objectName (required), transport, objectType.
query_tableC
Run a SQL SELECT query against SAP tables and return results as a formatted table
Inputs: sql (required), maxRows.
release_transportA
Release a transport request (or task) - the write counterpart to get_transport_details. Runs SAP's standard release checks and moves it from modifiable to released, so it can be imported into the next system. Refuses to run on production/read-only profiles. Use get_transport_details first to see what's actually registered under it before releasing.
Inputs: transport (required), ignoreLocks, ignoreAtcCheck.
run_atcA
Run an ATC (ABAP Test Cockpit) static-analysis check on an object and report the findings. Read-only and safe on any profile. Use it before releasing a transport, or after building something, to catch the issues your team's ATC variant enforces. Slower than syntax_check - use syntax_check for quick error checking.
Inputs: objectUri (required), maxFindings, checkVariant.
search_programsB
Search ABAP programs in SAP S/4HANA by name pattern (use * as wildcard)
Inputs: query (required), maxResults, objectType.
switch_serverB
Switch the active SAP server profile by name
Inputs: profile (required).
syntax_checkA
Run the ABAP syntax/consistency check (the same check ADT runs) on an existing object WITHOUT activating it. Read-only and safe on any profile, including production. Use this after writing source and BEFORE activate_object - it reports errors and warnings so you can fix them first. To check source you have just written but not yet activated, pass version="inactive".
Inputs: objectUri (required), version.
update_bdefA
Overwrite the source of an EXISTING behavior definition (BDEF). Locks, PUTs the whole new source, unlocks, then optionally activates. Refuses to run on production profiles. REPLACES the whole BDEF - read it first, edit that text, and send the complete result back. Prefer patch_bdef for small edits.
Inputs: source (required), bdefName (required), activate, transport.
update_bsp_fileA
Overwrite the WHOLE content of an EXISTING file inside a deployed BSP/UI5 repository app. Unlike source objects there is no lock/unlock step and no activation - the write takes effect immediately. Read the file first with get_bsp_file, edit that text, and send the complete result back. Refuses to run on production profiles.
Inputs: bspName (required), content (required), filePath (required), transport.
update_cdsA
Overwrite the source of an EXISTING CDS view (DDLS). Locks, PUTs the whole new DDL source, unlocks, then optionally activates. Refuses to run on production profiles. IMPORTANT: this REPLACES the whole CDS source - read it first, edit that text, and send the complete result back. Keep the entity name unchanged. Prefer patch_cds for small edits.
Inputs: source (required), cdsName (required), activate, transport.
update_classA
Overwrite the source of an EXISTING ABAP class. Locks, PUTs the whole new source, unlocks, then optionally activates. Refuses to run on production profiles. IMPORTANT: this REPLACES the whole class - read it first with get_object_info (.../source/main), edit that text, and send the complete result back (both the DEFINITION and IMPLEMENTATION parts). Prefer patch_class for small edits.
Inputs: source (required), className (required), activate, transport.
update_class_includeA
Overwrite the WHOLE source of a class's SEPARATE include - local types (CCIMP / 'Local Types' tab), definitions, implementations, macros, or test classes - none of which live in /source/main (update_class/patch_class cannot reach these). Run list_class_includes FIRST to get the exact includeType string. Use this instead of patch_class_include when the include is empty/new (nothing to pattern-match against) or you're replacing all of it. Locks the class, PUTs the whole new source to the discovered include, unlocks, and optionally activates the class. Refuses to run on production profiles.
Inputs: source (required), className (required), includeType (required), activate, +1 more.
update_dclA
Overwrite the source of an EXISTING Access Control / DCL source. REPLACES the whole definition - read it first and send the complete result back. Refuses to run on production profiles. Prefer patch_dcl for small edits.
Inputs: source (required), dclName (required), activate, transport.
update_ddlxA
Overwrite the source of an EXISTING CDS metadata extension (DDLX). REPLACES the whole source. Refuses to run on production profiles. Prefer patch_ddlx for small edits.
Inputs: source (required), ddlxName (required), activate, transport.
update_enhoA
Overwrite the source of an EXISTING hook Enhancement Implementation (ENHO/XHH). Locks, PUTs the whole new source, unlocks, then optionally activates. Refuses to run on production profiles. REPLACES the whole source - read it first with get_enho_source and send the complete result back. Prefer patch_enho for small edits. For BAdI implementations use update_class on the implementing class.
Inputs: source (required), enhoName (required), activate, transport.
update_function_moduleA
Overwrite the whole source of an EXISTING function module. Locks, PUTs, unlocks, then optionally activates. Refuses to run on production profiles. REPLACES the entire FM (FUNCTION ... ENDFUNCTION.) - read it first and send the complete result back. Prefer patch_function_module for small edits. Pass the group WITHOUT the SAPL prefix.
Inputs: source (required), functionGroup (required), functionModule (required), activate, +1 more.
update_interfaceA
Overwrite the source of an EXISTING ABAP interface. REPLACES the whole interface - read it first and send the complete result back. Refuses to run on production profiles. Prefer patch_interface for small edits.
Inputs: source (required), interfaceName (required), activate, transport.
update_program_sourceA
Overwrite the source of an EXISTING ABAP program or include (report, include, module pool). Resolves program-vs-include automatically, then locks, PUTs the source, optionally activates, and unlocks. Refuses to run on production profiles. IMPORTANT: this replaces the WHOLE object - always read it first with get_program_source, edit that text, and send the complete result back.
Inputs: source (required), programName (required), activate, transport.
update_sfpfA
Replace the entire XDP layout source of an existing Adobe Form (SFPF). Locks, PUTs, unlocks, and optionally activates. Refuses to run on production profiles.
Inputs: source (required), formName (required), activate, transport.
update_sfpiA
Replace the entire source of an existing Adobe Form Interface (SFPI) with new XML. Locks, PUTs, unlocks, and optionally activates. Refuses to run on production profiles.
Inputs: source (required), interfaceName (required), activate, transport.
update_smartformA
Replace the entire XML source of an existing Smartform (STXFORMS). Locks, PUTs, unlocks, and optionally activates. Refuses to run on production profiles.
Inputs: source (required), smartformName (required), activate, transport.
update_srvdA
Overwrite the source of an EXISTING service definition (SRVD). Locks, PUTs the whole new source, unlocks, then optionally activates. Refuses to run on production profiles. REPLACES the whole definition - read it first, edit that text, and send the complete result back. Prefer patch_srvd for small edits.
Inputs: source (required), srvdName (required), activate, transport.
update_structureA
Overwrite the DDL source of an EXISTING DDIC structure. REPLACES the whole definition - read it first and send the complete result back. Refuses to run on production profiles. Prefer patch_structure for small edits.
Inputs: source (required), structureName (required), activate, transport.
update_tableA
Overwrite the source (field definitions) of an EXISTING DDIC database table. Locks, PUTs the whole new DDL source, unlocks, then optionally activates. Refuses to run on production profiles. IMPORTANT: this REPLACES the whole table definition - read it first, edit that text, and send the complete result back. Activating a structure change triggers a DATABASE CONVERSION when the table holds data, so activate defaults to false; review and activate in SE11. Prefer patch_table for small edits.
Inputs: source (required), tableName (required), activate, transport.
update_table_recordA
Update exactly one record in a customer Z*/Y* table using keyFields as the WHERE condition. Requires confirm:true and a writable SAP profile.
Inputs: values (required), confirm (required), keyFields (required), tableName (required).
where_usedA
Find where an object is used (the ADT 'where-used list'). Read-only and safe on any profile. Use it before changing or deleting something to see what depends on it. Results can be huge, so they are capped - the total count is always reported.
Inputs: objectUri (required), maxResults.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 93 tools
Every tool pairs a distinct action with a distinct SAP object type (CDS, class, program, table, structure, DDLX, BDEF, SRVD, SFPI/SFPF, Smartform, transport, etc.), and the descriptions explicitly disambiguate look-alikes such as create_program vs create_include, patch_class vs patch_class_include, syntax_check vs run_atc, and get_program_source vs get_outline. Even the update_* vs patch_* pairs are clearly framed (whole replace vs exact single-match edit). An agent can reliably pick the right tool.
The surface follows a strong verb_noun convention (get_/create_/update_/patch_/list_/query_ + object), with object suffixes consistent across families (e.g. _cds, _class, _table, _structure, _bsp_file). A few outliers break the pattern slightly: syntax_check (noun_verb), where_used, and activate_object/switch_server, but they remain readable and unambiguous.
93 tools is very heavy and pushes well past any reasonable single-server surface, with near-identical CRUD quartets repeated per object type (get/create/update/patch for CRUD on ~15+ object families). While the SAP breadth is real, the repetition suggests consolidation (e.g. generic object operations) rather than 90+ discrete endpoints, making the surface intimidating and costly to navigate.
Coverage is unusually thorough for a development server: read/write/patch across many object types, activation, syntax check, ATC, where-used, transport lifecycle, text/selection elements, BSP files, forms, and enhancements. The main gaps are the total absence of any delete operation and no way to execute a program or run ABAP Unit tests, though agents can largely work around these by not deleting.
Maintenance
Related MCP Connectors
MCP server for Product Management
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
MCP server for the Seline Analytics API
Related MCP Servers
- AlicenseCqualityNot gradedmaintenanceAn MCP server that facilitates seamless interaction with SAP ABAP systems to manage development objects, transport requests, and source code. It provides a comprehensive suite of tools for performing syntax checks, object searches, and code modifications via the ADT API.100-
- AlicenseNot gradedqualityBmaintenanceMulti-system MCP server for reading and writing ABAP source via SAP ADT, with write safety controls and a local web admin.MIT
- AlicenseBqualityDmaintenanceMCP server for SAP ABAP development that enables AI assistants and code editors to interact with SAP systems via ABAP Developer Toolkit (ADT) APIs, supporting read, create, update, and delete of ABAP objects.100MIT
- AlicenseBqualityBmaintenanceA local MCP server that connects to SAP ABAP systems via ADT HTTP API, enabling AI assistants to search, read, and manage ABAP objects securely without SAP GUI.5948 npm9MIT