Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
# Exercise: Enable the ADT MCP Server in ABAP Development Tools for VS Code 💎

Check notice on line 1 in tutorials/abap-dev-adt-mcp-server-tools/abap-dev-adt-mcp-server-tools.md

View workflow job for this annotation

GitHub Actions / checks / checks

content/body-missing-prerequisites

Missing '## Prerequisites' section

Check notice on line 1 in tutorials/abap-dev-adt-mcp-server-tools/abap-dev-adt-mcp-server-tools.md

View workflow job for this annotation

GitHub Actions / checks / checks

content/body-missing-you-will-learn

Missing '## You will learn' section

## Introduction

In this tutorial, you will enable the **ADT MCP Server** that is built into **ABAP Development Tools for VS Code** and verify that the ADT MCP tools are available.

The ADT MCP Server exposes ABAP development capabilities as **Model Context Protocol (MCP)** tools allowing you to create packages, to create transport requests, to generate complete RAP applications, activate objects, and more through natural language prompts.

Check warning on line 7 in tutorials/abap-dev-adt-mcp-server-tools/abap-dev-adt-mcp-server-tools.md

View workflow job for this annotation

GitHub Actions / checks / checks

markdown/MD009

Trailing spaces

> **Further reading**: [Agentic AI for ABAP Development](https://help.sap.com/docs/abap-cloud/abap-development-tools-for-visual-studio-code/agentic-ai-development?locale=en-US) and **[Model Context Protocol (MCP)**](https://modelcontextprotocol.io/)

### Exercises

- [1.1 - Enable the ADT MCP Server in the Visual Studio Code Settings](#exercise-11-enable-the-adt-mcp-server-in-the-visual-studio-code-settings)
- [1.2 - Verify the ADT MCP Server is Running](#exercise-12-verify-the-adt-mcp-server-is-running)
- [1.3 - Verify the ADT MCP Tools in your coding agent](#exercise-13-verify-the-adt-mcp-tools-in-your-coding-agent)
- [Summary & Next Exercise](#summary--next-exercise)

---

## About the ADT MCP Server 💎

The **ADT MCP Server** is a local HTTP server that is integrated in and runs inside the **ABAP Development Tools for Visual Studio Code** extension. It implements the Model Context Protocol (MCP) to call tools in a structured, authenticated way.

When enabled, the ADT MCP server exposes a set of ABAP development tools to any MCP-compatible AI assistant. In this workshop, the exercises use **GitHub Copilot** (see [Quickstart for GitHub Copilot](https://docs.github.com/en/copilot/get-started/quickstart)) as the client. Any coding agent that supports Visual Studio Code's virtual workspace filesystem is compatible — GitHub Copilot is confirmed; others are also supported.

**Key tools available through the ADT MCP Server:**
For example, the following ADT MCP tools are available:

| Tool | Description |

Check warning on line 29 in tutorials/abap-dev-adt-mcp-server-tools/abap-dev-adt-mcp-server-tools.md

View workflow job for this annotation

GitHub Actions / checks / checks

markdown/MD060

Table column style

Check warning on line 29 in tutorials/abap-dev-adt-mcp-server-tools/abap-dev-adt-mcp-server-tools.md

View workflow job for this annotation

GitHub Actions / checks / checks

markdown/MD060

Table column style

Check warning on line 29 in tutorials/abap-dev-adt-mcp-server-tools/abap-dev-adt-mcp-server-tools.md

View workflow job for this annotation

GitHub Actions / checks / checks

markdown/MD060

Table column style

Check warning on line 29 in tutorials/abap-dev-adt-mcp-server-tools/abap-dev-adt-mcp-server-tools.md

View workflow job for this annotation

GitHub Actions / checks / checks

markdown/MD060

Table column style
|------|-------------|
|abap_activate_objects|Activates ABAP objects in the ABAP system|
|abap_atc_apply_ai|Start applying AI fixes for every eligible finding in an ATC worklist result|
|abap_atc_execute_deterministic_quickfixes|Executes the deterministic quick fixes|
|abap_atc_run|Gets the result of an ABAP Test Cockpit (ATC) run by its corresponding worklist|
|abap_createion-crate_object|Executes the creation of ABAP development objects|
|abap_creation-get_all_createable_objects|Gets a list of all ABAP createable objects|
|abap_creation-get_object_type_details|Gets details required for creating an ABAP object such as name, description|
|abap_generators-generate_objects|Validates and generates ABAP RAP objects using the RAP generator|
|abap_generators-list_generators|Lists the available ABAP RAP generators|
|abap_list_destinations|Gets a list of available destinations in an ABAP system|
|abap_run_unit_tests|Runs ABAP unit tests for a given set of objects|
|abap_transport-create|Creates a transport request|
|abap_transport-get|Validates and displays relevant transport requests for a given object|

> **Further reading**: See [ADT MCP Tools](https://help.sap.com/docs/abap-cloud/abap-development-tools-for-visual-studio-code/mcp-tools?locale=en-US) for the complete list of tools available.

Check warning on line 46 in tutorials/abap-dev-adt-mcp-server-tools/abap-dev-adt-mcp-server-tools.md

View workflow job for this annotation

GitHub Actions / checks / checks

markdown/MD028

Blank line inside blockquote
> ⚠ **Warning regarding AI outputs** ⚠
> The ADT MCP Server is an **experimental feature** that may change at any time without notice. It is not intended for productive use. Please back up your data before using it.
> **Further reading**: [Security Considerations and Recommendations](https://help.sap.com/docs/abap-cloud/abap-development-tools-for-visual-studio-code/security-recommendations-and-considerations)

---

## Exercise 1.1: Enable the ADT MCP Server in the Visual Studio Code Settings

Check warning on line 53 in tutorials/abap-dev-adt-mcp-server-tools/abap-dev-adt-mcp-server-tools.md

View workflow job for this annotation

GitHub Actions / checks / checks

markdown/MD022

Headings should be surrounded by blank lines
[^Top of page](#)

Check warning on line 54 in tutorials/abap-dev-adt-mcp-server-tools/abap-dev-adt-mcp-server-tools.md

View workflow job for this annotation

GitHub Actions / checks / checks

markdown/MD042

No empty links

> Enable the built-in ADT MCP Server in the Visual Studio Code extension settings.

<details>
<summary>🔵 Click to expand!</summary>

1. Open **Visual Studio Code Settings** as follows:
a. Open the **Command Palette** with **'Ctrl+Shift+P'** (macOS: **'Cmd+Shift+P'**)
b. Type **Preferences: Open Settings (UI)** and select the finding.

2. In the search bar, type:
```

Check warning on line 66 in tutorials/abap-dev-adt-mcp-server-tools/abap-dev-adt-mcp-server-tools.md

View workflow job for this annotation

GitHub Actions / checks / checks

markdown/MD040

Fenced code blocks should have a language specified

Check warning on line 66 in tutorials/abap-dev-adt-mcp-server-tools/abap-dev-adt-mcp-server-tools.md

View workflow job for this annotation

GitHub Actions / checks / checks

markdown/MD031

Fenced code blocks should be surrounded by blank lines
adt mcp
```
The findings in the **Extensions > ABAP Development** node are displayed.

3. Locate the **Adt: Enable MCP Server** setting (or similar) and enable it by checking the checkbox.

![ADT MCP Server setting enabled](images/ex0_adt_settings_enable_mcp.png)

ℹ️ **Hint**: You can also switch to JSON mode (click the '{}' icon top-right in settings) and add:
```
json 'adt.mcpServer.enabled': true
```

4. Optionally, you can configure the **MCP server port** (default: '2236').
Note that you only change this if port 2236 is occupied on your machine. Proceed as follows:
a. Search for **ADT MCP port** in the settings.
b. Set it to the available port between '0' and '65535'.

5. **Reload Visual Studio Code** if prompted, or close and reopen the application.

![ADT MCP Server setting enabled](images/ex0_mcp_setting.png)

> ⚠️ **Important**: Make sure your system destination is still added to the workspace. The MCP server only starts once a destination is active in the workspace.

</details>

---

## Exercise 1.2: Verify the ADT MCP Server is Running
[^Top of page](#)

> Check and confirm that the ADT MCP Server started successfully.

<details>
<summary>🔵 Click to expand!</summary>

After enabling the setting and having a destination in the workspace, the server should start automatically.

### Method 1: Check for the startup notification

1. Look at the bottom-right corner for a notification in the status bar:
```
ADT MCP Server running on port 2236.
```
![ADT MCP Server running](images/ex0_mcp_running.png)

> ℹ️ If you don't see the notification, proceed to Method 2.

### Method 2: Check via MCP Server list

1. Open the **Command Palette** (**'Ctrl+Shift+P'**).

2. Type ...
```
>MCP:List Servers
```

3. Select **'MCP: List Servers'** from the list.

You should then see an entry for **ADT MCP Server** in the quick pick list.

4. Select it and click **Start Server** if it is not already running.

![MCP Server listed and running](images/ex0_mcp_list_servers.png)

### Method 3: Check the display in the Output view

5. Open the **Output** view beneath the editor.

![MCP Server listed in the Output view](images/ex0_output_server.png)

6. Select **MCP: ADT MCP Servers** from the drop-down list. Then, the status will be displayed in the **Output** view.

![MCP Server listed and running in the Output view](images/ex0_output_verfication_mcp.png)

### Troubleshooting

If the ADT MCP Server does not appear or fails to start:

1. Disable and re-enable the **Adt: Enable MCP Server** setting.

2. Remove the destination folder from the workspace and **add it back** from the Command Palette:
```
ABAP: Add Destination as Folder to the Workspace...
```

3. Restart Visual Studio Code.

</details>

---

## Exercise 1.3: Verify the ADT MCP Tools in your coding agent
[^Top of page](#)

> Open the **Chat** view of your coding agent in the agent mode. Confirm that the ADT MCP tools are loaded and available.

<details>
<summary>🔵 Click to expand!</summary>

1. If the **Chat** view is not displayed by default, open the GitHub Copilot **Chat** view in Visual Studio Code.

![GitHub Copilot Chat view](images/ex0_github_copilot_chat.png)

> ℹ️ **Note**: You have the following possiblities to do this:
>- Click the **Copilot** icon in the **Activity Bar** (left),
>- choose *View* > *Chat* from the menu, or
>- press **'Ctrl+Shift+I'** (macOS: **'Cmd+Shift+I'**)

2. Switch the chat mode to **Agent** in the chat dropdown.

> ℹ️ **Note**: ADT MCP tools are only available in **Agent** mode — not in the standard **Ask** or **Plan** mode.

![Choosing the agent mode in the Chat view](images/ex0_agent_mode.png)

3. Click the **Configure Tools** (tools wrench icon) button in the Copilot chat input bar.
A quick pick list appears showing available tool providers.

![Icon to open the Configure Tools dialog](images/ex0_configure_tools_icon.png)

Here, you see the **ADT MCP Server** node with a list of the available tools, e.g., 'abap_generators-list_generators', 'abap_creation-create_object', and so on.

> ✅ If you see the ADT MCP Server and its tools listed, your setup is complete!

4. Check and ensure the ADT MCP Server tools are **checked/enabled** in the list.

5. Run a **Sanity test**: Type the following prompt in the **Chat** view and press **Enter**:
```
List all available ABAP RAP generators using the MCP tool.
```
The coding agent will request to call the 'abap_generators-list_generators' tool.
> ℹ️ **Note**: **Allow** the tool call when prompted.

You should see a list of available generators returned, including an entry for **OData UI Service from Scratch**.

> ✅ If you see generator names returned, the ADT MCP Server is working correctly with your coding agent!

![Available ABAP RAP Generators](images/ex0_available_generators.png)

</details>

---

## Summary & Next Exercise
[^Top of page](#)

You have successfully:
- Enabeled and checked the availability of the ADT MCP servers and tools

> ℹ️ **Hint**: To test and learn working with Agentic AI in ADT for VS Code, you can follow the [RAP130 - Build SAP Fiori Apps with ABAP Cloud and SAP Joule for Developers in Visual Studio Code](https://github.com/SAP-samples/abap-platform-rap130) tutorial.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading