AI in SAP On-Premises with Cursor, MCP makes React app and uploads it directly to SAP S4HANA hosted On Premises

How to use Cursor + MCP to build AI app in 5 minutes on SAP ERP and S/4HANA On-Premise

The emergence of new AI models and the dynamic changes that are taking place before our eyes in the application development process raise the question of how this new technology can be used to rapidly create products integrated with the SAP platform.

The integration of SAP with AI and development tools such as Cursor offers speed and is becoming a key ingredient for modernizing SAP systems at a moderate cost, on top of which this technology is available today in an On-Premise systems.

In this article, we discuss how to apply the latest AI models like Claude Sonnet 3.7 to create an application connected to SAP using Cursor and the MCP protocol, without the need for a Business Technology Platform or cloud infrastructure.

What is Vibe Coding? 

Vibe Coding is an approach to software development that uses AI to transform natural language descriptions into fully functional program code. Previously, it was a consultant who collected functional requirements and then worked with developers to create an extension.

Now, instead of writing code by hand, users describe verbally what they need and artificial intelligence generates, tests and refines the code itself.

What is Cursor? 

Cursor is a new product, a highly optimized coding assistant designed to create applications together with AI. It allows you to create apps in minutes/hours instead of weeks/months.

Cursor leverages advanced AI models, such as OpenAI GPT-4o, o1, GPT-4-mini, Claude 3.5 Sonnet, or 3.7 Sonnet, and other local LLM models, to speed up coding processes, allowing developers to create applications with AI.

Can Vibe Coding and Cursor be used with SAP?

Vibe Coding, combined with Cursor and MCP (Model Context Protocol), creates a powerful system for SAP development, enabling natural language-driven creation of both ABAP backend elements and modern React frontends, while integrating with SAP On-Premises systems.

Here’s how it works: 

  • Vibe Coding: The developer describes the desired SAP functionality in plain English (e.g., “Create a purchase order approval app with a Fiori-like interface”) to create a functional specification based on business requirements. 
  • Cursor AI: Translates requirements into technical specification using: 
  1. Input provided by the user and pre-defined project rules 
  1. List of available APIs in SAP (for example, ABAP modules that serve the data), 
  1. Utilizing the MCP protocol for custom operations. 
  • MCP Protocol: Acts as middleware between Cursor and SAP systems to access available APIs, list provided services, and deploy configuration to the SAP system. 

Let’s see how it works – we will build an app step by step to visualize the whole process for better understanding. 

Let’s Build an app on SAP On-Premise with AI in 5 minutes

We will build a web application for SAP that displays a list of employees in the SAP HCM module via a web browser, all hosted directly in SAP.

Our goal is to build the application in less than 5 minutes to demonstrate the true value that new AI tools bring to the SAP platform.

Our application will consist of two basic components:

  • An ABAP function module that provides the data for the app, 
  • A React app that utilizes the data from SAP HCM to visualize it 

Step 1: Create function module in ABAP 

Let’s go to Cursor. We will create an ABAP function module needed to serve the data by simply typing a Vibe Coding prompt for Claude Cursor AI. We will use the AI model called Claude Sonnet 3.5: 

“Write a function module that returns information about employees” 

Write a SAP Function Module with the help of Cursor and Claude Sonnnet AI. AI writes ABAP code and deploys it on SAP AS, S4HANA

It took AI 10 seconds! to generate operational ABAP code, which we can now save and activate directly on SAP from Cursor. This function module is automatically available to the Cursor API via our SAP add-on, so Cursor can access it and see how it can use it to retrieve the data. 

Step 2: Create a React App to Display Employee Data 

Let’s create an app that will show us this data. Now, we will ask Claude AI to create the app for us automatically, just by typing: 

Create a React application that shows basic information about employees, then publish it on SAP. 

Create React application for SAP server with automatic deloyment. S/4HANA hosted AI solution.

It takes Cursor and its AI around 2 minutes to set up everything for us, including: 

  • Creating all the needed project files, 
  • Automatically calling SAP to read the description of the API (from step 1), 
  • Writing all the React code needed for the application to work, 
  • Installing all the necessary dependencies and setting up build scripts 
  • Running it, so we don’t have to do it manually 
Cursor creates a SAP app within 2 minutes and deploys it automatically to SAP infrastructure. Cursor for SAP called via MCP.

Step 3: Deploy and Run the App on SAP 

The last step is to publish the app on the SAP Application Server. We will again utilize our MCP add-on, which handles all the steps. We simply ask AI to publish it on SAP by typing: 

publish an app on SAP 

React App created with Cursor for S/HANA. Running on SAP AS with automatic deployment on SAP infrastructure. React + Cursor + MCP + SAP AS.

Let Us Accelerate Your SAP AI Journey!

Are you already familiar with our Add On for SAP On-Premises? Let AI bring value to your team and organization. Contact us today to implement these cutting-edge technologies in your SAP On-Premises system.

We can help you with:

  • Integration of AI tools with SAP infrastructure
  • Custom MCP Add-On development for SAP 
  • Building custom applications hosted on SAP 
  • Building custom AI applications around SAP 

Contact us to see how you can improve your performance with AI!

SEE HOW WE CAN DIGITALIZE YOUR BUSINESS

Let's meet on social media: