SAP's ADT MCP server with Claude Code, GitHub Copilot and Codex
TL;DR
- The ADT MCP server ships inside SAP's ABAP development tools for VS Code extension (on the Marketplace since May 2026, version 1.2.0 in October 2026). It's off by default and runs locally at http://localhost:2236/mcp.
- Copilot in VS Code finds the server on its own. Claude Code and Codex connect over HTTP with the bearer token that the extension generates.
- Start read-only: keep the edit file tool off, allow one development destination, leave the package list empty and only enable the search, read, check, ATC and ABAP Unit tools.
- "Read-only" in SAP's settings covers the server's own edit tool. Your agent's built-in edit tools, object creation, activation and transports are separate, so restrict them in the agent too.
- The MCP tools are supported only with a SAP Joule for Developers, ABAP AI capabilities licence, and data the tools return can reach your AI provider.
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): the extension appeared on the Visual Studio Marketplace on 29 May 2026, and 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".
This guide covers what the server gives an agent, how to connect GitHub Copilot, Claude Code and Codex to it, and a setup that starts read-only. Everything here 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, all linked under Sources. 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 ADT MCP 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, with 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's only there 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 any 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 Claude Code's 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 your AGENTS.md or CLAUDE.md, Copilot instructions or Cursor rules. Our free lite rules include this core rule:
- 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, which removes the most common failure in AI-written ABAP.
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's what 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, as described in FOR ALL ENTRIES with an empty table and the other guides.
Sources
- SAP Help Portal, ABAP Development Tools for VS Code: Agentic AI for ABAP Development, Enabling ADT MCP Server, Configuring ADT MCP Server, Using MCP Tools, Model Context Protocol Tools and Agent Configuration
- ABAP Development Tools for VS Code on the Visual Studio Marketplace, including its version history and the setting descriptions in extension version 1.2.0
- SAP-samples on GitHub: full-stack AI tutorial, exercise 0.2 and exercise 0.4, and RAP130 exercise 1
- Claude Code: Connect Claude Code to tools via MCP and Configure permissions
- OpenAI Codex: Model Context Protocol
- Free lite rules (MIT), with the read-only MCP rule above: abap-for-agents-lite on GitHub
Get the rules
Start with the free rules: ABAP for Agents Lite (MIT) has the core rules from this guide, ready for Cursor, Claude Code, GitHub Copilot, Windsurf and AGENTS.md, in English and Portuguese.
Need more? The full Rules Pack (v1.1) has 300+ rules across 20 topics (adding performance, security, RAP, CDS, OData and Fiori, ABAP Cloud and clean core, LUW and locks, BAPIs, ABAP Unit and S/4HANA migration) plus 8 agent skills, with free updates. It is 19 € at launch (29 € after).
More guides
ABAP mistakes AI coding assistants make, and how to prevent them
The pillar guide. Nine repeat mistakes, why models make them, and the rule or code pattern that prevents each one.
FOR ALL ENTRIES with an empty table: the trap and the fix
Why an empty driver table reads the whole database table, the one-line guard, the silent duplicate-row trap, and the alternatives.
Cursor rules for SAP ABAP: a setup guide
Project rules in .cursor/rules for ABAP: rule types, glob patterns for abapGit and ADT files, an always-on core rule and a quick test.
Using Claude Code and AGENTS.md with SAP ABAP
One AGENTS.md for every agent, a CLAUDE.md that imports it, an on-demand review skill, and how to check that Claude Code loaded them.
GitHub Copilot custom instructions for ABAP
copilot-instructions.md for the core rules, applyTo-scoped instruction files for ABAP sources, a review prompt file, and where each one works.
Column totals in a Fiori Elements List Report with RAP and CDS
How to get a totals row in an OData V4 List Report from RAP: the two CDS annotations, currencies and units, the table type, and what to check when the sum doesn't show.
Replacing SELECT on BSEG in S/4HANA: ACDOCA, I_JournalEntryItem and I_OperationalAcctgDocItem
Why the ATC flags reads on BSEG in S/4HANA, what BSEG still holds, when to move to I_JournalEntryItem or I_OperationalAcctgDocItem, the ledger trap and when an exemption is the right answer.
Extracting data from SAP S/4HANA Cloud with released CDS views
How SAP S/4HANA Cloud exposes data for extraction: C1-released CDS views with @Analytics.dataExtraction, the CDS_EXTRACTION route into Datasphere, key views and the A_ OData API limits.