Skip to content
NextLytics
Megamenü_2023_Über-uns

Shaping Business Intelligence

Whether clever add-on products for SAP BI, development of meaningful dashboards or implementation of AI-based applications - we shape the future of Business Intelligence together with you. 

Megamenü_2023_Über-uns_1

About us

As a partner with deep process know-how, knowledge of the latest SAP technologies as well as high social competence and many years of project experience, we shape the future of Business Intelligence in your company too.

Megamenü_2023_Methodik

Our Methodology

The mixture of classic waterfall model and agile methodology guarantees our projects a high level of efficiency and satisfaction on both sides. Learn more about our project approach.

Products
Megamenü_2023_NextTables

NextTables

Edit data in SAP BW out of the box: NextTables makes editing tables easier, faster and more intuitive, whether you use SAP BW on HANA, SAP S/4HANA or SAP BW 4/HANA.

Megamenü_2023_Connector

NextLytics Connectors

The increasing automation of processes requires the connectivity of IT systems. NextLytics Connectors allow you to connect your SAP ecosystem with various open-source technologies.

IT-Services
Megamenü_2023_Data-Science

Data Science & Engineering

Ready for the future? As a strong partner, we will support you in the design, implementation and optimization of your AI application.

Megamenü_2023_Planning

SAP Planning

We design new planning applications using SAP BPC Embedded, IP or SAC Planning which create added value for your company.

Megamenü_2023_Dashboarding

Business Intelligence

We help you with our expertise to create meaningful dashboards based on Tableau, Power BI, SAP Analytics Cloud or SAP Lumira. 

Megamenü_2023_Data-Warehouse-1

SAP Data Warehouse

Are you planning a migration to SAP HANA? We show you the challenges and which advantages a migration provides.

Business Analytics
Megamenü_2023_Procurement

Procurement Analytics

Transparent and valid figures are important, especially in companies with a decentralized structure. SAP Procurement Analytics allows you to evaluate SAP ERP data in SAP BI.

Megamenü_2023_Reporting

SAP HR Reporting & Analytics

With our standard model for reporting from SAP HCM with SAP BW, you accelerate business activities and make data from various systems available centrally and validly.

Megamenü_2023_Dataquality

Data Quality Management

In times of Big Data and IoT, maintaining high data quality is of the utmost importance. With our Data Quality Management (DQM) solution, you always keep the overview.

Career
Megamenü_2023_Karriere-2b

Working at NextLytics

If you would like to work with pleasure and don't want to miss out on your professional and personal development, we are the right choice for you!

Megamenü_2023_Karriere-1

Senior

Time for a change? Take your next professional step and work with us to shape innovation and growth in an exciting business environment!

Megamenü_2023_Karriere-5

Junior

Enough of grey theory - time to get to know the colourful reality! Start your working life with us and enjoy your work with interesting projects.

Megamenü_2023_Karriere-4-1

Students

You don't just want to study theory, but also want to experience it in practice? Check out theory and practice with us and experience where the differences are made.

Megamenü_2023_Karriere-3

Jobs

You can find all open vacancies here. Look around and submit your application - we look forward to it! If there is no matching position, please send us your unsolicited application.

Blog
NextLytics Newsletter
Subscribe for our monthly newsletter:
Sign up for newsletter
 

Agentic AI in Practice: MCP Server for SAP BW/4HANA

Back in April, I introduced the bw-modeling-mcp here—an open-source MCP server that allows AI assistants to work directly within SAP BW/4HANA. The server was already capable of a lot back then. What it lacked was real-world validation. We had tested it exclusively against our own demo systems. There was still no experience from actual customer environments.

Three months later, my day-to-day work in BW looks different than ever before. The server is in daily use in two customer projects, covers the entire BW/4HANA lifecycle, and can now also be operated centrally on SAP BTP. And it doesn’t stop with BW. For SAP Datasphere, we’re currently developing our own plugin that derives the appropriate Datasphere models from the data the MCP server reads in BW and creates them immediately. You can see for yourself what this looks like at the very bottom of this post, in an interactive lineage analysis from this very plugin.

In this post, I’ll walk you through all of this step by step, from the server itself to centralized deployment to the two customer projects. As always, you can find the MCP server in the GitHub repository: https://github.com/dnic-dev/bw-modeling-mcp.

Check out our blog series "Agentic AI meets SAP BW":

1. Agentic AI meets SAP BW
2. Agentic AI in Practice

 

An MCP server that understands, builds, and operates

Three dimensions define the MCP Server. Only together do they form a tool you can actually work with, rather than just experiment with.

1.mcp-server_dimensionen-EN

Understanding. The agent reads not just objects, but relationships. Search, where-used analysis, data flow lineage across all levels - every object type down to the routine level, including planning models. Plus live data via BICS and the DataSource preview. This allows the agent to autonomously trace back through load chains of any depth, from the query all the way to the source system.

Building. Everything that occurs in day-to-day modeling: InfoObjects and InfoAreas, aDSOs, DataSources and InfoSources, transformations with ABAP and AMDP routines, DTPs, queries, and process chains. Create, modify, activate, assign packages, transport. The result is not a suggestion in the chat window, but an activated object on the transport request. Created via the same REST API and using the same locking protocol that Eclipse BWMT uses.

Operations. Execute DTPs, activate requests, load data via the Push API, start and monitor process chains, and analyze load runs by status, errors, and history. Only then is the circle complete: What the agent builds, it can also load, check, and analyze in greater depth in the event of an error.

MCP server centralized on SAP BTP: From local script to enterprise-wide operation

Until now, the MCP server could only be run locally. Local mode is designed for individual developers. A Node.js process on your own computer, with access credentials stored in a local configuration file. This is perfect for testing. But it’s no longer sufficient for an entire development team with the same requirements. It lacks a central location for operation, a shared login, and the ability for IT to control who has access to what.

Version 1.2 closes this very gap. The server can now run either locally or centrally as an HTTP service on SAP BTP Cloud Foundry. Login is handled via XSUAA, the BTP authentication service that the company uses anyway. Behind the scenes, a BTP destination connects to BW via the Cloud Connector. The MCP client only needs the URL; the rest is handled by the browser login. This was made possible by the groundwork laid by Marian Zeis. He had already extracted the XSUAA authentication mechanism for his ABAP MCP server ARC-1 as a standalone package and contributed it as a completed pull request. bw-modeling-mcp now builds on this same foundation.
2.mcp-server-central-on-SAP-BTP

 A direct comparison illustrates what this means in practice: 

Scenario Before After
One developer, one BW local process on their machine central service, login with their own identity
Multiple users, one server not possible, no central authentication

all via BTP, each identity flows through to BW

Tool permissions whoever starts the server may use every tool granted per role, independent of the BW authorization concept
BW authorizations enforced via the user's own credentials enforced unchanged, every call in the name of the real user
Traceability limited XSUAA logs every login, BW sees the real user

The server provides two roles as suggestions: one with the reading tools (BW MCP Reader) and one with the full toolbox (BW MCP Developer). Not only are write tools denied to a Reader, but they also disappear from the tool list; the AI therefore does not even suggest an unauthorized call in the first place. Underneath this, BW continues to apply its own authorizations via Principal Propagation. The MCP role is the first gate; the BW authorization is the second.


Watch the recording of our webinar "Bridging Business and Analytics: The Plug-and-Play future of Data Platforms"


The First Project: Recreating Customer Exits with Agentic AI in SAP BW

The first example comes from a customer project in which a large-scale platform migration is currently ongoing. A regional energy supplier is replacing its SAP IS-U environment - which has evolved over decades - and migrating its utilities billing to S/4HANA for Utilities, which is centrally operated by a service provider. The underlying BW/4HANA remains in place, but the source system beneath it is being completely replaced. This also means the old customer exit logic is gone, since there is no longer any room for customer-specific enrichment in the source system under standardized operations. The new loading path simply no longer provides the data that BW has been obtaining from these exits for years.

Closing this gap is a painstaking task, and that’s exactly what the agent tackles. It runs through the entire process itself - from discovery to production loading - using the BW-MCP for modeling and the ABAP-MCP for reading the legacy logic.

3. Use-Case_Agentic_AI

  1. First, the agent connects the DataSources from the new source system to the existing providers and maps the fields that arrive in the standard setup.
  2. This forms the basis for the comparison for each DataSource: Which fields were actually imported and mapped previously, and which of these are missing in the new loading path? This difference is the gap. For each gap field, the agent reads the legacy exit logic directly from the system to be replaced via the ABAP-MCP server, field by field: which source table, which derivation, and which ABAP logic underlies it.
  3. Then it searches for the new path to the same data. For each lookup table from the customer exit, it finds a suitable CDS-based DataSource, with an SAPI-ODP extractor as a fallback. It connects these sources to BW/4HANA and sets up a staging load chain for them. In the actual loading chains, each affected field receives a lookup routine in AMDP that replicates the old exit on the new foundation.
  4. Finally, the entire system goes live. The agent implements the loading steps, extends the process chains, triggers the test load, and checks the results directly in the system. What he builds, he can also load and verify.

“Automatic” here does not mean “unsupervised.” At critical points, the agent initially paused and output clear, readable interim results, which we could use to verify that everything was functioning correctly up to that point. Only then did it continue.
This is because these are not individual object requests, but multi-step, complex workflows that would take consultants weeks to complete manually. For the AI to run through them reliably, they must be specified just as precisely. We store both in a knowledge repository: the contextual knowledge about the landscape and the workflows as robust runbooks - essentially a directory of Markdown files that each new run draws upon.

The second project: Agentic AI migrates BW models to SAP Datasphere

The second example from an ongoing project is also a migration; this time, however, it is not the source system but the target system that is changing. The models should be migrated from the SAP BW Bridge to SAP Datasphere. The goal here is to create a clean, redesigned model on the target platform, rather than a 1:1 mapping of logic and persistence objects. Before this can be built, however, one must have a complete understanding of what the legacy BW model actually does today.

4.Use-Case_Agentic-AI_SAP_Datasphere

This understanding is again provided by the combination of BW-MCP and ABAP-MCP. The agent reads the model end-to-end and reveals all the complexity that has accumulated over the years: transformation logic with ABAP routines at multiple levels, lookups to additional tables with their own lineage, and Customizing tables. This results in a complete lineage within BW, plus a second one on the Datasphere side that shows what already exists there. Both can be combined into a comprehensive picture.

The crucial intermediate step is to translate this technical logic into a language that the business department can understand. The agent extracts the custom logic and describes it in business terms. Only then can we verify whether a rule still applies today or whether the business department has a delta that should be incorporated immediately. After all, the goal is not to migrate the old state 1:1, but rather the understood and refined version. Based on this verified understanding, the AI derives a clean, SQL-based concept for Datasphere, initially as a draft. From this, our own Datasphere plugin creates the models and puts them into operation via replication flows and task chains.

5.Lineage-to-Datasphere

For Datasphere, we’re working on our own plugin, which we’re developing during this project. While there are already several open-source MCP servers, they rely almost exclusively on the OData Consumption API; as a result, they only see the published models and not the underlying remote tables, and are primarily read-only. There are skills based on the Datasphere CLI for creating objects. However, this is still not enough for reliable automation - manual intervention is required too often - and, most importantly, it lacks what makes a model stable in the first place: our modeling standards. Our plugin provides exactly that - best practices from numerous projects, fixed naming conventions, and the implications of an object change for dependent objects, all neatly encapsulated in skill descriptions. This ensures that every new model integrates into the existing landscape rather than standing alone as an island.

The AI itself requires only Markdown files to orchestrate this workflow. However, whoever is responsible for the model wants to be involved in the decision-making process, make their own adjustments, and truly understand what’s happening. That’s why our Datasphere plugin also generates a lineage analysis that can be linked to the one from BW and shows the complexity of an evolved model at a glance. You can click through the example below to see what this looks like — specifically, a demo model from our own system. Using the Details panel, you can display complete information for each step, from the fields to the routine logic. The legend can be toggled interactively, and in the header, you can choose whether to display Datasphere associations or, in the BW section, lookup objects from transformations and virtual objects.

Why Context is more important than individual AI tools: Our conclusion

The BW-MCP server now includes 85 tools covering the entire BW/4HANA lifecycle. This breadth wasn’t conceived on the drawing board, but rather because these two projects pushed the server to its limits week after week - and each limit often meant a new tool. The sheer number of tools has now become an issue in itself; the next step is to consolidate them into fewer, but more broadly configurable, tools.

However, it is not the tools alone that determine whether agent-based workflows are suitable for everyday use, but rather the context - that is, everything the AI knows about the system before the first task is specified. An agent that is expected to work confidently within a mature customer system needs this knowledge to be permanently available, not re-explained for every task. We organize this as a versioned knowledge repository, based on the Open Knowledge Format - a relatively new, open standard from Google for AI-readable knowledge bases.

How to quickly set up such a repository, keep it up to date, and clearly define its scope is a major topic in its own right, which we’d like to explore in more depth in our next post.

Would you like to find out exactly what Agentic AI can do in your SAP data landscape? Contact us - we’ll guide you from the initial secure environment all the way to day-to-day agent-based operations.

 

FAQ - Agentic AI meets SAP BW in Practice

Here you will find some of the most frequently asked questions on MCP-Server for SAP BW/4HANA.

What is the difference between an MCP server and a skill? An MCP server is a running service that provides specific tools to an AI agent and communicates directly with a system’s interface - in the case of bw-modeling-mcp, the BW Modeling API. A skill, on the other hand, is curated knowledge on how to solve a task; it uses existing tools and is loaded only when needed. The difference depends heavily on how accessible a system already is. If there is a command line interface, as with Datasphere, the AI can execute the commands itself using its Bash tool and only needs the instructions - that is, a skill. If such access is lacking, as with the BW Modeling API, an MCP server must first properly encapsulate the access. Simply put, the MCP server is the standardized access - that is, the tool - and the skill is the included know-how - that is, the recipe. Both can be combined.
Do I have to run bw-modeling-mcp centrally now, or can I still run it locally? Both. Local mode as a Node.js process on the developer’s computer remains unchanged and is still the fastest way to get started. Starting with version 1.2, the server can also be run centrally as an HTTP service on SAP BTP Cloud Foundry for teams that need shared, IT-managed access. Which approach is best depends on whether a single person is trying something out or an entire team is working with it on a long-term basis.
In a centralized setup, how is it determined who is allowed to use which tools? Two predefined roles are provided as suggestions: BW MCP Reader, which includes read-only tools, and BW MCP Developer, which includes the full toolkit; more granular roles can be added. A Reader is not only denied access to write tools - they disappear from the tool list entirely, so that the AI does not even suggest an unauthorized call in the first place. This MCP role determines, independently of BW, which tools are available at all.
Is the SAP authorization concept retained in a centralized operation? Yes, and it remains unchanged. Through Principal Propagation, each user accesses BW as themselves, with their own authorizations, not via a shared technical ID. The MCP role is thus the first gate, the BW authorization the second, and XSUAA logs every login so that the real user remains visible in the log.
Does the MCP also help with migration to SAP Datasphere? Yes, that is one of the two customer cases in the article. The BW-MCP reads an established model end-to-end and provides the foundation; the actual translation into an SQL-based Datasphere concept and the creation of the models are handled by AI using our Datasphere plugin. The Datasphere component of this plugin is currently being developed in this very project. If you’re interested or have any questions, please feel free to contact us.
Why develop our own Datasphere plugin, since there are already MCP servers and skills for that? The existing open-source MCP servers are primarily based on the OData Consumption API and are designed for analysis and reporting. They only see shared models and are predominantly read-only. While there are skills based on the Datasphere CLI for creating objects, they are rather rudimentary and, above all, do not cover modeling best practices. Neither of these is sufficient for reliable, automated modeling. Our plugin incorporates the standards from many Datasphere projects, including fixed naming conventions and the consequences that a change to one object has on dependent objects, ensuring that every new model integrates seamlessly into the landscape
What’s the deal with the knowledge repository? For an agent to work reliably in a mature customer system, it needs context that is permanently available and doesn’t have to be re-explained for every task. We organize this context as a versioned knowledge repository - essentially a directory of Markdown files containing system knowledge, verified domain expertise, modeling conventions, and runbooks for recurring processes. How to quickly set up such a repository, keep it up to date, and define its scope effectively is a major topic in its own right, which we’ll explore in more depth in a follow-up post.

,

avatar

David

David has 13 years of experience as an SAP consultant in the areas of SAP Data & Analytics and the energy industry. His expertise includes customer support and consulting as well as IT conception, architecture and development of SAP solutions. He is particularly specialized in SAP Planning (BPC and SAP Analytics Cloud), SAP BW/4HANA and SAP Datasphere. In his spare time, David enjoys freediving and is an enthusiastic home barista.

Got a question about this blog?
Ask David

Agentic AI in Practice: MCP Server for SAP BW/4HANA
13:07

Blog - NextLytics AG 

Welcome to our blog. In this section we regularly report on news and background information on topics such as SAP Business Intelligence (BI), SAP Dashboarding with Lumira Designer or SAP Analytics Cloud, Machine Learning with SAP BW, Data Science and Planning with SAP Business Planning and Consolidation (BPC), SAP Integrated Planning (IP) and SAC Planning and much more.

Subscribe to our newsletter

Related Posts

Recent Posts