Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 

Introduction:

 
This blog describes an approach for connecting Claude to an SAP system through a Model Context Protocol (MCP) server and accessing SAP development objects from Visual Studio Code. The article walks through the overall architecture, configuration steps, and examples of interacting with SAP objects, including reading existing ABAP artifacts and creating new development objects through the established connection.

Business Challenge: 

SAP developers often spend considerable time in

  • Understanding complex custom code
  • Analyzing legacy ABAP developments
  • Creating technical documentation
  • Developing reports and enhancements
  • Performing code remediation and modernization
  • Writing test cases and technical specifications

Solution Overview: The solution combines:

  • Claude Code via AWS Bedrock
  • Visual Studio Code
  • MCP (Model Context Protocol)
  • SAP ABAP System

Prerequisites

  • Claude subscription
  • Visual Studio Code installed in the laptop
  • An active SAP system (S/4HANA Cloud, or on premises)
  • SAP ADT service activated in your system: transaction SICF → /sap/bc/adt must be active.
  • SAP development user credentials (username, password, client number, hostname/IP, port)

Architecture diagram

 

Ravi_choutipalli_0-1791268519453.png

 

Configuration Steps

  1. Install VS Code and add the Claude Code Extension
  • Open VS Code and press Ctrl+Shift+X to open the Extensions panel
  • Search for Claude Code (published by Anthropic) and install it
  • Once installed, the Claude icon appears in the Activity Bar and connects automatically to your Anthropic account
  • Ravi_choutipalli_0-1791006677089.png
  1. Install and configure the ABAP Remote Filesystem (ABAP FS) Extension: This extension connects VS Code to your SAP system using the same ADT REST API that Eclipse uses, allowing Claude Code to read, write, and review ABAP objects directly.
  • In VS Code Extensions (Ctrl+Shift+X), search for ABAP remote filesystem by Marcello Urbani → Install
  • Ravi_choutipalli_1-1791006677102.png
  • Press Ctrl+Shift+P → type ABAP FS: Connection Manager → open it and add a new connection with the following fields:  Connection Name, Server Url, Authentication Method, Client, Username.
  • Ravi_choutipalli_2-1791006677110.pngSave the connection
  • Press Ctrl+Shift+P → ABAP FS: Connect to an SAP system → select your connection → enter your password
  1. MCP configuration: Enable the ADT MCP Server Via ABAP FS Extension

       Steps:

  • Press Ctrl+Shift+P → search ABAP FS MCP → select it → enable AutoStart
  • The ABAP FS extension spins up a local MCP server (default port 4847)
  • A VS Code notification confirms: ABAP MCP Server running on port 4847
  • The server is accessible at: http://localhost:4847/mcp

Ravi_choutipalli_3-1791006677118.png

  1. Register the MCP Server with Your AI Client

For Claude Code CLI, run the following in the VS Code integrated terminal:

claude mcp add --transport http abap-remote-fs http://localhost:4847/mcp

Ravi_choutipalli_4-1791006677121.png

 

Ravi_choutipalli_5-1791006677127.png

 

Start MCP server

Ravi_choutipalli_6-1791006677129.png

 

  1. Verify the connection

Run the following in the terminal to confirm the MCP server is registered and reachable:

claude mcp list

Ravi_choutipalli_7-1791006677132.png

Once the connection is established, run the Claude command in the terminal and provide the requirement as a prompt to generate the ABAP code.

Best Practices

  • Always review AI-generated code before deployment.
  • Follow Clean Core principles.
  • Use ATC checks and code reviews.
  • Restrict access to sensitive SAP data.
  • Validate generated code in development systems.

Review and validate the generated ABAP code, then instruct Claude to push the code to the SAP system by providing the connection ID and the necessary deployment instructions.

Benefits

  • Faster code understanding
  • Reduced documentation effort
  • Accelerated development
  • Improved onboarding of new developers
  • Better productivity for SAP teams
Conclusion: 
In this blog, we examined the technical setup required to connect Claude with an SAP system using an MCP server in Visual studio. We discussed the architecture, configuration process, and validation scenarios involving SAP development objects. These examples illustrate how MCP can be used to facilitate communication between AI assistants and SAP environments.

Thank you.

@claude @developer 

 

Labels in this area