In 2026 SAP shipped an official MCP server for ABAP. It's part of the ABAP development tools for VS Code extension (SAPSE.adt-vscode), which appeared on the Visual Studio Marketplace on 29 May 2026. Version 1.2.0, released on 16 October 2026, is the one SAP's own tutorials now ask for. SAP describes the ADT MCP server as an implementation of the Model Context Protocol "offering MCP tools for ABAP development tasks such as creating ABAP development objects, creating transports, and generating complete RAP applications".
For an AI agent, the useful part is not code generation. It's that the agent can ask your system instead of guessing: does this class exist, what's its signature, does the syntax check pass, what does ATC say. Missing objects and wrong signatures are the most common failure in AI-written ABAP.
This post covers what the server gives an agent, how to connect GitHub Copilot, Claude Code and Codex, and a setup that starts read-only. Everything comes from SAP's documentation on the SAP Help Portal, SAP's tutorials on GitHub, the setting descriptions shipped with extension version 1.2.0, and the MCP documentation of Claude Code and Codex. The full source list is in the original guide. We haven't tested this setup against a real SAP system. Setting labels and tool names change between releases, so check them against your installed version.
What the server is
MCP is an open standard that lets an AI agent call tools in other systems. The ADT MCP server runs inside the VS Code extension, on your machine, and uses the extension's own connection to your ABAP system (a "destination"). When you enable it, the extension starts a local HTTP server at http://localhost:<port>/mcp, port 2236 by default, and generates a bearer token for it. SAP's RAP130 workshop describes it as "a local HTTP server that runs inside the ADT for Visual Studio Code extension", so it only exists while VS Code is running.
The extension connects over RFC to on-premise systems and SAP S/4HANA Cloud Private Edition, and over HTTP to the SAP BTP ABAP environment and SAP S/4HANA Cloud Public Edition, according to its Marketplace page.
SAP's Model Context Protocol Tools page lists the tools. Grouped by what they do:
| Group | Tools (as named in SAP's list) | Changes the system? |
|---|---|---|
| Look up |
abap_destination_list, abap_repository_search_object, abap_object_get_file_uri, abap_object_list_file_uris, abap_object_read_file, abap_object_get_aff_specification, abap_business_service_list, abap_business_service_get_info, abap_transport_get_request, abap_transport_get_unified_diff, abap_object_list_actions
|
No |
| Check and test |
abap_object_check, abap_atc_run_start, abap_atc_run_get_result, abap_unit_run_tests
|
Doesn't change code |
| Change |
abap_object_edit_file, abap_object_create (with abap_object_validate_creation, abap_object_get_creatable_type_detail, abap_repository_list_creatable_types), abap_object_activate, abap_objects_generator_run, abap_transport_create_request, abap_atc_quickfixes_apply, abap_atc_ai_start_fix, abap_atc_exemption_request, abap_object_run_action
|
Yes |
| Runtime data |
abap_feed_query (short dumps, gateway error log, system messages) |
No, but see the data note below |
The same page marks a few tools as needing a Joule licence and token consumption: abap_explain_object, abap_docs_dcp and the AI-based ATC fixes. It also notes that the tool names were updated in a recent release, so older tutorials, skills and agent files can still use the old names.
Before you start
- Licence. SAP's tool page says: "Support for the MCP tools is only provided if the customer possesses a valid SAP Joule for Developers, ABAP AI capabilities license." Check this with your SAP contact before rolling it out.
- A development system. SAP's RAP130 workshop calls the server "an experimental feature" that "is not intended for productive use". Connect a development or sandbox client, never production.
- Your own authorizations. The server works through your logon, so the agent can reach what you can. Use a user whose authorizations fit what you want the agent to do.
-
Data privacy. For
abap_feed_query, SAP warns that connecting the server to a third-party AI service "may expose the processed data to that AI service provider", including business data such as personal data in the gateway error log. The same applies to any source code or data the agent reads.
Setup in VS Code
- Install ABAP Development Tools for VS Code from the Marketplace (extension ID
SAPSE.adt-vscode). SAP's full-stack tutorial asks for version 1.2.0 or later. - Create a destination with ABAP: New Destination... (RFC or HTTP, depending on the system), then run ABAP: Add Destination as Folder to Workspace... and log on. SAP's RAP130 tutorial notes that the server only starts once a destination is active in the workspace.
- Open the settings (Preferences: Open Settings (UI)) and search for ADT MCP Server. Set the restrictions first, then switch the server on.
In settings.json, the setting IDs from extension version 1.2.0 look like this:
{
"adt.mcpServer.accessRestrictionsEnabled": true,
"adt.mcpServer.accessRestrictions": {
"destinations": "DEV_100",
"packages-objectChanges": ""
},
"adt.mcpServer.enableEditFileToolForABAPObjects": false,
"adt.mcpServer.port": 2236,
"adt.mcpServer.enabled": true
}
DEV_100 stands for your destination's name. What each setting does, according to SAP's Enabling ADT MCP Server page and the setting descriptions:
- Access restrictions are on by default. The server can then only reach the listed destinations, for reads and writes. If you switch the central setting off, nothing is restricted, "even if the preference defines values for the individual destinations and packages".
- Packages restrict only object creation and changes. SAP's note is explicit: "Reading from all packages is allowed irrespective of the access restrictions defined." For a read-only start, leave this list empty, as shipped.
- Edit file tool is off by default "to prevent unintentional changes to ABAP objects".
- Token: the extension generates a bearer token when the server starts and stores it in the Adt > MCP Server: Token setting. SAP advises against editing it by hand.
SAP's own tutorials label the restriction settings slightly differently (one says Allowlist), so search for "mcp" in the settings if a label doesn't match.
Connect GitHub Copilot in VS Code
The extension registers the server with VS Code, so Copilot Chat sees it without a configuration file. Following SAP's Configuring ADT MCP Server page:
- Run MCP: List Servers, pick the ADT MCP server and choose Start Server.
- Switch the chat to Agent mode. SAP's RAP130 tutorial notes that MCP tools aren't available in the Ask or Edit modes.
- Choose Configure Tools in the chat input and tick only the tools you want for this task.
- When a tool needs approval, VS Code shows the details and lets you approve it once, for the session, for the workspace or always. Keep change tools on "once".
The extension also ships an abap-developer custom agent. Its instructions tell the agent to create, edit and activate objects, so don't use it for a read-only start.
Connect Claude Code
SAP's documentation says any MCP host can use the server over HTTP with an Authorization: Bearer <token> header, and that "the configuration format may differ across MCP hosts". In Claude Code, add an HTTP server with a header, as described in its MCP documentation:
claude mcp add --transport http sap-adt http://localhost:2236/mcp \
--header "Authorization: Bearer <token from the VS Code setting>"
This stores the server in local scope (~/.claude.json), which Claude Code recommends for credentials you don't want in version control. To share the definition in a project .mcp.json instead, keep the token out of the file with variable expansion:
{
"mcpServers": {
"sap-adt": {
"type": "http",
"url": "http://localhost:2236/mcp",
"headers": { "Authorization": "Bearer ${ADT_MCP_TOKEN}" }
}
}
}
Keep VS Code open with the destination logged on, then run /mcp in Claude Code to check that sap-adt is connected.
Connect Codex
Codex reads MCP servers from ~/.codex/config.toml or a project .codex/config.toml, per the Codex MCP documentation. A Streamable HTTP server takes a url and can read the bearer token from an environment variable:
[mcp_servers.sap_adt]
url = "http://localhost:2236/mcp"
bearer_token_env_var = "ADT_MCP_TOKEN"
Run codex mcp list to see the configured servers.
A safe "read-only first" workflow
SAP's settings make the server's own edit tool opt-in, but read-only in the agent is a separate decision. SAP's agentic loop example has the agent create a transport request, create the class with abap_object_create, add code with the "built-in edit tool from MCP host (Not from ADT MCP Server)" and activate it. The extension's setting description also warns that built-in edit tools of Copilot or other hosts can conflict with the ADT edit tool. So switching off the edit file tool alone doesn't make an agent read-only. Restrict the tools in the agent as well.
Phase 1: look up and check only. Allow these tools and nothing else:
abap_destination_list abap_repository_search_object
abap_object_get_file_uri abap_object_list_file_uris
abap_object_read_file abap_object_get_aff_specification
abap_object_check abap_unit_run_tests
abap_atc_run_start abap_atc_run_get_result
abap_business_service_list abap_business_service_get_info
abap_transport_get_request abap_transport_get_unified_diff
- Copilot: in Configure Tools, untick everything else from the ADT server, and keep the extension's edit file setting off.
-
Codex: add an allow list to the server's table. Codex applies
disabled_toolsafterenabled_tools, anddefault_tools_approval_mode = "prompt"asks before each call:
[mcp_servers.sap_adt]
url = "http://localhost:2236/mcp"
bearer_token_env_var = "ADT_MCP_TOKEN"
default_tools_approval_mode = "prompt"
enabled_tools = [
"abap_destination_list", "abap_repository_search_object",
"abap_object_get_file_uri", "abap_object_list_file_uris",
"abap_object_read_file", "abap_object_get_aff_specification",
"abap_object_check", "abap_unit_run_tests",
"abap_atc_run_start", "abap_atc_run_get_result",
"abap_business_service_list", "abap_business_service_get_info",
"abap_transport_get_request", "abap_transport_get_unified_diff",
]
-
Claude Code: deny the change tools in
.claude/settings.json. Claude Code names MCP toolsmcp__<server>__<tool>, and a deny rule removes the tool from Claude's context, per its permissions documentation:
{
"permissions": {
"deny": [
"mcp__sap-adt__abap_object_edit_file",
"mcp__sap-adt__abap_object_create",
"mcp__sap-adt__abap_object_activate",
"mcp__sap-adt__abap_objects_generator_run",
"mcp__sap-adt__abap_transport_create_request",
"mcp__sap-adt__abap_atc_quickfixes_apply",
"mcp__sap-adt__abap_atc_ai_start_fix",
"mcp__sap-adt__abap_atc_exemption_request",
"mcp__sap-adt__abap_object_run_action"
]
}
}
Then tell the agent how to use the server in its instruction file (AGENTS.md/CLAUDE.md, Copilot instructions or Cursor rules). A rule along these lines works:
- If an ABAP MCP server is connected, use it to look up objects,
signatures and release state, and to run the syntax check, ATC
and ABAP Unit before answering.
- Read-only by default: never enable or use write tools without
the user's explicit consent.
In this phase the agent writes code in its answer or in local files, and you paste it into the editor. What it gains is that it can check that a class, BAPI or CDS view really exists before using it.
Phase 2: changes in one package. When the read-only results are good, add one sandbox package (or $TMP) to the package restriction, switch on the edit file tool if you want the agent to edit through the server, and allow the change tools one at a time with per-call approval. Review every change as you would a colleague's. SAP's tool list includes abap_transport_get_unified_diff, which gives you a diff of a transport before release.
Pitfalls
-
Old tool names. SAP renamed the tools. RAP130's exercise still shows names such as
abap_activate-objects, while SAP's current list hasabap_object_activate. Skills, agent files and allow lists that use the old names silently match nothing, so re-check them after each extension update. - Tools missing after an update. SAP's full-stack tutorial says a stale cache is the likely cause: restart the MCP server and start a new chat.
- Server doesn't start. RAP130's troubleshooting: switch the setting off and on, remove and re-add the destination folder, or restart VS Code. If the ABAP system node shows a yellow warning triangle, you aren't logged on.
- VS Code must stay open. The server runs inside the extension, so Claude Code and Codex lose it when VS Code closes or the destination logs off.
- The token is a credential. It authorizes calls to a server that acts with your logon. Keep it out of committed files and pass it through an environment variable. The extension generates it when the server starts, so check it again if the connection starts failing.
- Packages don't limit reads. The agent can read every package your user can read, whatever the package restriction says.
-
Unit tests run code.
abap_unit_run_testsexecutes test classes on the server. Tests that use test doubles are harmless, but a badly written test that writes to the database will do so. - Rules still matter. The server checks facts, but the agent still decides what to write. Keep ATC and ABAP Unit as the gate for everything AI-generated before it reaches a transport.
The longer version of this post, with all sources linked, is on abapforagents.com. If you want ready-made rules for this setup, the free, MIT-licensed ABAP for Agents Lite on GitHub has the core rules (including the read-only MCP rule above) for Cursor, Claude Code, Copilot, Windsurf and AGENTS.md, in English and Portuguese. The full Rules Pack (v1.1.0, 19 €) adds 300+ rules across 20 topics and 8 agent skills, in English and Portuguese.
Top comments (0)