# SAP's ADT MCP server with Claude Code, GitHub Copilot and Codex

> SAP's ADT MCP server for VS Code with Claude Code, GitHub Copilot and Codex: what it is, setup, a safe read-only-first workflow and pitfalls for ABAP.

By ABAP for Agents · Updated 2026-11-09 · https://abapforagents.com/guides/adt-mcp-server-vs-code-abap/

## 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](#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](https://help.sap.com/docs/abap-cloud/abap-development-tools-for-visual-studio-code/mcp-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

1. 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.
2. 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.
3. 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:

```json
{
  "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](https://help.sap.com/docs/abap-cloud/abap-development-tools-for-visual-studio-code/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](https://help.sap.com/docs/abap-cloud/abap-development-tools-for-visual-studio-code/configuring-adt-mcp-server-ed94320814734d97801f51a5b6deb802) page:

1. Run **MCP: List Servers**, pick the ADT MCP server and choose **Start Server**.
2. Switch the chat to **Agent** mode. SAP's RAP130 tutorial notes that MCP tools aren't available in the Ask or Edit modes.
3. Choose **Configure Tools** in the chat input and tick only the tools you want for this task.
4. 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](https://code.claude.com/docs/en/mcp):

```bash
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:

```json
{
  "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](https://developers.openai.com/codex/mcp). A Streamable HTTP server takes a `url` and can read the bearer token from an environment variable:

```toml
[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:

```text
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_tools` after `enabled_tools`, and `default_tools_approval_mode = "prompt"` asks before each call:

```toml
[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 tools `mcp__<server>__<tool>`, and a deny rule removes the tool from Claude's context, per its [permissions documentation](https://code.claude.com/docs/en/permissions):

```json
{
  "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](https://abapforagents.com/guides/claude-code-agents-md-abap/), [Copilot instructions](https://abapforagents.com/guides/github-copilot-instructions-abap/) or [Cursor rules](https://abapforagents.com/guides/cursor-rules-sap-abap/). Our free lite rules include this core rule:

```markdown
- 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](https://abapforagents.com/guides/ai-abap-mistakes/).

**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 has `abap_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_tests` executes 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](https://abapforagents.com/guides/for-all-entries-empty-table/) and the other guides.

## Sources

- SAP Help Portal, ABAP Development Tools for VS Code: [Agentic AI for ABAP Development](https://help.sap.com/docs/abap-cloud/abap-development-tools-for-visual-studio-code/agentic-ai-development), [Enabling ADT MCP Server](https://help.sap.com/docs/abap-cloud/abap-development-tools-for-visual-studio-code/enabling-adt-mcp-server), [Configuring ADT MCP Server](https://help.sap.com/docs/abap-cloud/abap-development-tools-for-visual-studio-code/configuring-adt-mcp-server-ed94320814734d97801f51a5b6deb802), [Using MCP Tools](https://help.sap.com/docs/abap-cloud/abap-development-tools-for-visual-studio-code/using-mcp-tools), [Model Context Protocol Tools](https://help.sap.com/docs/abap-cloud/abap-development-tools-for-visual-studio-code/mcp-tools) and [Agent Configuration](https://help.sap.com/docs/abap-cloud/abap-development-tools-for-visual-studio-code/agent-configuration)
- [ABAP Development Tools for VS Code on the Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SAPSE.adt-vscode), 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](https://github.com/SAP-samples/fiori-abap-fullstack-ai-tutorial/blob/main/exercises/ch0-setup/0.2-vscode-adt/README.md) and [exercise 0.4](https://github.com/SAP-samples/fiori-abap-fullstack-ai-tutorial/blob/main/exercises/ch0-setup/0.4-verify-mcp/README.md), and [RAP130 exercise 1](https://github.com/SAP-samples/abap-platform-rap130/blob/main/exercises/ex01/README.md)
- Claude Code: [Connect Claude Code to tools via MCP](https://code.claude.com/docs/en/mcp) and [Configure permissions](https://code.claude.com/docs/en/permissions)
- OpenAI Codex: [Model Context Protocol](https://developers.openai.com/codex/mcp)
- Free lite rules (MIT), with the read-only MCP rule above: [abap-for-agents-lite on GitHub](https://github.com/abapforagents/abap-for-agents-lite)

## Get the rules

Start with the free rules: ABAP for Agents Lite (MIT), for Cursor, Claude Code, GitHub Copilot, Windsurf and AGENTS.md: https://github.com/abapforagents/abap-for-agents-lite (ZIP: https://github.com/abapforagents/abap-for-agents-lite/releases/latest/download/abap-for-agents-lite.zip).

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: 19 € at launch (29 € after), https://abapforagents.com/#pricing
