bw-modeling-mcp
A live MCP server that gives AI assistants real read, modeling, execution and monitoring capability in SAP BW/4HANA (and largely BW 7.5 on HANA) via SAP's internal BW Modeling, ADT, manage and Push APIs.
Read objects — aDSOs, InfoObjects, InfoAreas, InfoSources, transformations, DTPs, queries, CompositeProviders, CKFs/RKFs/structures, variables, DataSources, source systems, Open Hub destinations, process chains, aggregation levels, planning objects, conversion types, hierarchies, BPF templates/instances, AFO workbooks, query roles and query consistency checks
Find and explore — search, where-used, repository contents, data-flow tracing, dependent DTPs, source systems/DataSources/remote entities, roles and published queries, metadata-table reads, system profile, BPF catalogues
Query and read data — run BW queries or preview InfoProvider data via BICS, look up characteristic values, preview DataSources, read query statistics
Monitor — load requests and request detail, process chain runs/steps/status, remodeling requests, query statistics, BPF process monitor, instances and to-dos
Model / write — create and change aDSOs, InfoObjects and hierarchies, InfoSources, CompositeProviders, transformations (rules, start/end/expert routines, runtime), DTPs and filter routines, DataSources, Open Hub Destinations, queries with reusable components/variables/roles, planning objects, process chains and BPF templates
Write data — push records into write-interface aDSOs, selective deletion (or simulation), save AFO workbooks into BW roles
Activate, check, unlock, delete — objects and process chains
Execute — run DTPs, start process chains, repeat failed steps, activate/delete requests, run/restart/reset remodeling
Run BPF instances — create, start, suspend, resume, reset, finalize, archive, delete, change owners, complete/reopen/approve/reject activities
Manage — create InfoAreas, move objects, change packages, transport requests/tasks, list changeable transports
Self-describe —
bw_describereturns the full parameter definition of every tool operationFlexible deployment — local stdio or hosted on SAP BTP Cloud Foundry with XSUAA OAuth, role-based tool access (Reader/Analyst/Developer) and principal propagation; focused (23 tools) or full tool mode; adapts its surface to BW/4HANA vs BW 7.5
Provides tools for interacting with SAP BW/4HANA systems, enabling reading, creating, and modifying BW modeling objects such as InfoObjects, aDSOs, Transformations, DTPs, queries, DataSources, roles, and more via the internal REST API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bw-modeling-mcp show data flow for DSO ZCUST_DSO"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
bw-modeling-mcp
A Model Context Protocol (MCP) server that enables AI assistants like Claude to work directly inside SAP BW/4HANA or SAP BW 7.5 on HANA systems — reading, creating and modifying BW modeling objects via the same internal SAP APIs that Eclipse BWMT and the BW/4HANA Cockpit use: the BW Modeling REST API (/sap/bw/modeling/) for objects, queries and live data, the ADT API (/sap/bc/adt/) for the ABAP and AMDP routines BW generates, the BW/4HANA manage API for the request monitor and runtime, and the Push API (/sap/bw4/) for data loads.
This is not a simulation. Every tool call connects to a live BW system — write operations produce real changes.
☁️ Running on SAP BTP Cloud Foundry

Besides stdio, the server can run as an HTTP service on SAP BTP Cloud Foundry with XSUAA
OAuth in front and a BTP destination behind — either a shared technical user
(BasicAuthentication) or principal propagation, where each caller reaches BW as
themselves and BW applies their own authorizations.
Three role collections decide what a user is offered: BW MCP Reader (everything that only reads), BW MCP Analyst (a small reporting client — run queries and understand what they return) and BW MCP Developer (everything, including changes).
stdio is unchanged — npm start behaves exactly as before. Setup:
docs/CENTRAL-HOSTING-SETUP.md (step-by-step) and
docs/CLOUD-FOUNDRY.md (reference).
What central hosting changes
Scenario | stdio only | Hosted on BTP |
One analyst, one BW system | runs on the analyst's machine | server-side, the analyst logs in with their own identity |
Several analysts, one server | not possible, no central auth | all log in via BTP, each caller's identity reaches BW |
Tool permissions | none — whoever runs it can call every tool | granted per role, independent of BW authorizations: a BW developer can be read-only in the MCP, or the querying tools can be withheld from someone who may otherwise view data |
BW authorizations | enforced through the user's own credentials | unchanged, still fully enforced — with principal propagation each caller acts as themselves, never as a shared identity |
Audit trail | limited | XSUAA logs every login; with principal propagation the BW session log shows the real user |
A new tool stays unavailable to read-only callers until it is explicitly classified as a
read, so the surface never widens by accident; write implies read, never the reverse.
The three role collections are a starting point and can be split further in xs-security.json.
Principal propagation additionally needs a certificate rule and ICM trust on the BW side.
Related MCP server: abap-adt-mcp
System Compatibility
System | Support |
SAP BW/4HANA (all versions) | ✅ Full support |
SAP BW Bridge (SAP BTP ABAP stack) | ✅ Via cookie authentication ( |
SAP BW on HANA (7.5) | ✅ Modelling reads after a small ABAP enhancement, and modelling writes for every object type that has a REST resource there — InfoObjects, aDSOs, InfoAreas, InfoSources, CompositeProviders, Open Hub Destinations, queries and their reusable components, aggregation levels. The tool surface adjusts to what the system publishes, and the objects without a REST resource — including planning, chain runs and the APD — are read from their metadata tables. |
📖 Further Reading
Overview page: Agentic AI for SAP BW — what the server does, use cases and the hosting options.
Three blog posts about this project (all available in German and English):
April 2026 · Agentic AI meets SAP BW — the full story behind this project: why I built it, what's inside, what happens when Claude walks through a complete BW data lineage on its own. https://www.nextlytics.com/blog/agentic-ai-meets-sap-bw
July 2026 · Agentic AI in practice: MCP server for SAP BW/4HANA — how the server is operated company-wide on SAP BTP Cloud Foundry with role-based access and per-user identity, plus two real customer projects. https://www.nextlytics.com/blog/agentic-ai-in-practice-mcp-server-for-sap-bw/4hana
November 2026 · Agentic Planning with Analysis for Office — a planning model built by an agent in SAP BW, from the aDSO to the planning function, and the workbook that plans on it, built with afo-mcp, the MCP server for Analysis for Office workbooks. https://www.nextlytics.com/blog/agentic-planning-analysis-for-office
🆕 What's New — v2.2.0 · BPC Business Process Flows
The server reaches into embedded BPC for the first time: the process templates of a Business Process Flow and the instances running on them. Queries gain a consistency check and their planning settings. Nothing changes in the configuration, and no existing tool changes its behaviour.
🧭 Business Process Flows
Read a template in full — activities with driving dimension and members, the workspace of each activity, and what every action opens: workbook, query or web application, with the variables it prefills from the context. An action that passes no context is listed as a warning
Change templates — the new tool
bw_write_bpfcreates and copies templates, creates a new version, validates and activates, and maintains activities and their actions. For a workbook or query action it reads the variables itself and builds the assignment. A released template is only changed through a new versionRun process instances — the new tool
bw_run_bpfcreates an instance, assigns performers and reviewers, starts, suspends, resets, finalizes and archives it, and completes, reopens, approves and rejects its activities. Every action is checked against the status first and read back afterwardsMonitor — process monitor, the instances of a template, the to-do list of the calling user and the activities that can be reopened
The Business Process Flow tools use the services of the BPC web client for BW/4HANA and are not offered on SAP BW 7.5.
Queries
Consistency check —
bw_readwith typequery_checkruns the check of the modeling tools on a query or a reusable component: elements that are referenced but not stored, inconsistent entries, and whether the component is linked with copies on other providersPlanning switches and variable order —
bw_update_query_settingssets input mode, new lines and disaggregation, and the order of the variables on the variable screenCreate in a package —
bw_create_querytakes a package and a transport request
Also in this release
Namespaces — objects with a namespaced name (
/NS/OBJECT_NAME) work as inputs of a CompositeProvider, as process chains, as attributes and compounding parents of an InfoObject, and under aggregation levels and planning objectsHosted server — with
BW_OAUTH_SIGNING_SECRETset, client registrations and refresh tokens survive a recreated XSUAA bindingSecurity policy —
SECURITY.mdsays how to report a vulnerability and which versions receive fixesTool surface — 23 focused tools instead of 21, 180 operations instead of 137
Details: CHANGELOG.md.
Earlier releases — the "What's New" notes for v2.1.1 and older are archived in WHATS_NEW.md; the full structured history is in CHANGELOG.md.
What it can do
An overview by area. Every tool in detail — parameters, behaviour, and the sequences it belongs in — is in the Tools Reference (180 operations behind 23 focused tools).
Combining with an ADT MCP Server
bw-modeling-mcp works best alongside an ADT MCP server such as vibing-steampunk or ARC-1. The two do not overlap as much as it may look.
This server owns the BW object and, with it, the body of the ABAP that BW generated for that object: the class behind a transformation routine, the program behind a DTP filter routine. Write those through bw_set_transformation_routine, bw_set_transformation_expert_routine and bw_set_dtp_filter_routine rather than through ADT — they do not only replace the source, they save the transformation master back afterwards, which is what re-registers the code in the transportable metadata. A class-only edit survives until the next regeneration or transport and is then gone.
The ADT MCP server covers ABAP as a subject in its own right: your own reports, classes, function modules and DDIC tables, repository search and navigation, arbitrary table reads, debugging, ATC, unit tests, dumps and transports. Together they cover the full cycle from BW object to ABAP logic.
Requirements
SAP BW/4HANA system with the internal SAP APIs enabled (SAP BW 7.5 works for modeling reads and most modelling writes once the enhancement in bw75/BW75-SUPPORT.md is in place)
Node.js 22 or later
An MCP-compatible AI client (Claude Desktop, Claude Code, etc.)
Installation
Two ways to run. Locally as a stdio server (one user, one machine — the steps below), or centrally hosted on SAP BTP Cloud Foundry behind XSUAA OAuth for a whole team → see docs/CENTRAL-HOSTING-SETUP.md. The installation and configuration below cover local stdio use. Upgrading from 1.x: see Upgrading to 2.0.
# Option 1: Install via npm (recommended)
npm install -g bw-modeling-mcp
# Option 2: Clone and build
git clone https://github.com/dnic-dev/bw-modeling-mcp.git
cd bw-modeling-mcp
npm install
npm run buildConfiguration
For local (stdio) use, the server is configured via environment variables. For central BTP hosting, connection and credentials come from the BTP destination and service bindings instead — see docs/CENTRAL-HOSTING-SETUP.md.
Variable | Description | Required |
| BW system URL (e.g. | yes |
| SAP user name | yes (or |
| SAP password | yes (or |
| SAP client (e.g. | yes |
| Language for object texts (e.g. | no |
| Path to a browser-exported cookie file for SAML-/OAuth-fronted systems (e.g. BW Bridge). Netscape or | no |
| Server name advertised in the MCP | no |
| Free-text label of the connected BW system (e.g. | no |
|
| no |
|
| no |
|
| no |
|
| no |
Cookie authentication (BW Bridge / SAP BTP): For BW systems that sit behind a SAML or OAuth login (such as BW Bridge on the SAP BTP ABAP stack), Basic Auth is not available. Export the authenticated session cookies from your browser into a file and point BW_COOKIE_FILE at it. The login/session approach is analogous to vibing-steampunk and ARC-1. When the session expires, refresh the cookie file and restart the server.
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"bw-modeling-mcp": {
"command": "node",
"args": ["/path/to/bw-modeling-mcp/dist/stdio.js"],
"env": {
"BW_URL": "https://your-bw-host:50001",
"BW_USER": "YOUR_USER",
"BW_PASSWORD": "YOUR_PASSWORD",
"BW_CLIENT": "001",
"BW_LANGUAGE": "EN"
}
}
}
}Claude Code (VS Code extension)
Add .mcp.json to your project root:
{
"mcpServers": {
"bw-modeling-mcp": {
"command": "node",
"args": ["/path/to/bw-modeling-mcp/dist/stdio.js"],
"env": {
"BW_URL": "https://your-bw-host:50001",
"BW_USER": "YOUR_USER",
"BW_PASSWORD": "YOUR_PASSWORD",
"BW_CLIENT": "001",
"BW_LANGUAGE": "EN"
}
}
}
}How it works
The server talks to four SAP APIs, and only one of them needs a protocol worth describing.
The BW Modeling REST API (/sap/bw/modeling/) is a full-document API: there is no way to
change one attribute of an object. Every write therefore runs the same six steps.
Lock — acquires an exclusive lock and returns a
lockHandleRead — fetches the current complete XML of the object
Modify — applies the change to that XML
PUT — sends the whole document back, never a fragment
Activate — promotes the inactive version to the active one
Unlock — releases the lock
Two consequences are worth knowing. Saving and activating are separate: a document the server accepts can still fail to activate, so a successful write proves less than it appears to. And because the whole document travels, a read that came from a stale session buffer will silently write old values back — the tools read fresh for exactly this reason.
The other three need none of it. The ADT API (/sap/bc/adt/) is used narrowly and always for
an object BW generated itself: the body of a transformation routine (its generated class), the
body of a DTP filter routine (its generated program), the DataPreview service behind
bw_read_metadata_tables, plus transport checks and activation runs. Everything else ABAP —
writing your own reports, classes or DDIC tables, searching the repository, reading arbitrary
tables, debugging — is the job of an ABAP ADT MCP server alongside this one, see
Combining with an ADT MCP Server. The BW/4HANA manage API (/sap/bc/http/sap/bw4/) answers the request
monitor, the remodeling monitor and runtime operations. The Push API (/sap/bw4/v1/push/)
takes a JSON record array straight into a write-interface aDSO.
Session cookies and CSRF tokens are handled for all four.
See ARCHITECTURE.md for the full technical architecture and the complete endpoint reference.
Contributing
Issues and feature requests are welcome — please use the Issue templates.
If you have access to a BW/4HANA system and want to help expand coverage, I am happy to hear from you. The best way to contribute is to try it out and report what works, what doesn't, and what's missing.
License
MIT
Available Tools
23 toolsbw_activateCheck and activate objectsADestructive
Activate an object with the lock handle a write returned, check it without activating, release a lock, or activate a process chain. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_activate", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), name, transport, lock_handle, +3 more.
bw_dataRead and write provider dataBDestructive
Work with data rather than definitions: filter values, DataSource preview, push into a write-interface aDSO, selective deletion, save an Analysis for Office workbook. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_data", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), mode, name, role, +18 more.
bw_deleteDelete objectsADestructive
Delete a BW object permanently. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_delete", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), object_name, object_type.
bw_describeDescribe the tools and their operationsARead-only
Describe the focused tools: without arguments the catalogue of every tool and its operations; with tool and the operation value (type for bw_read, operation otherwise) the complete parameter definition of that operation.
Inputs: tool, type, operation.
bw_findFind BW objects and relationsARead-only
Find BW objects and their relations: search by name, cross references, folder contents, data flows, source systems and DataSources, roles and their queries, metadata tables, system profile, Business Process Flow templates and what their actions can open. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_find", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), name, path, role, +22 more.
bw_manageManage transports, locks and settingsADestructive
Repository management: InfoAreas, moving objects, package and transport assignment, transport tasks. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_manage", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), name, user, package, +12 more.
bw_monitorMonitor loads and process chainsBRead-only
Monitor loads and runs: requests, process chain runs and their steps, remodeling requests, query statistics, Business Process Flow instances and to-dos. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_monitor", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), to, top, from, +29 more.
bw_query_dataRun a query or read a providerCRead-only
Run a query or read a provider and return its data. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_query_data", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), state, format, to_row, +6 more.
bw_readRead a BW objectARead-only
Read the definition of one BW object. type selects the object type, name is its technical name. The type enum lists every operation with what it requires; bw_describe(tool: "bw_read", type: "…") gives the complete parameter definition of one.
Inputs: name (required), type (required), kind, node, +12 more.
bw_runRun loads and processesBDestructive
Execute: run a DTP, start a process chain or repeat a failed step, activate or delete a request, run a remodeling request. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_run", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), name, start, action, +13 more.
bw_run_bpfRun Business Process Flow instancesADestructive
Run BPC Business Process Flows: create, start, suspend, resume, reset, finalize, archive and delete process instances, change their owner, and complete, reopen, approve or reject activities. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_run_bpf", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), start, member, owners, +12 more.
bw_write_adsoCreate and change aDSOsBDestructive
Create or change an aDSO: structure, keys, settings, planning mode. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_write_adso", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), mode, label, action, +23 more.
bw_write_bpfCreate and change Business Process Flow templatesADestructive
Create or change a BPC Business Process Flow template: header, versions, activities, the actions in the workspace of an activity, activation, transport. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_write_bpf", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), name, role, alias, +33 more.
bw_write_composite_providerCreate and change CompositeProvidersADestructive
Create or change a CompositeProvider. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_write_composite_provider", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), node, label, action, +35 more.
bw_write_datasourceCreate and change DataSourcesBDestructive
Create a DataSource, set its fields, change its delta process. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_write_datasource", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), fields, transport, description, +6 more.
bw_write_dtpCreate and change DTPsBDestructive
Create or change a DTP, including its filters and a filter routine. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_write_dtp", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), package, dtp_name, transport, +41 more.
bw_write_infoobjectCreate and change InfoObjectsCDestructive
Create or change an InfoObject and its hierarchies. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_write_infoobject", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), name, nodes, length, +52 more.
bw_write_infosourceCreate and change InfoSourcesBDestructive
Create or change an InfoSource. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_write_infosource", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), name, fields, package, +13 more.
bw_write_open_hubCreate and change Open Hub DestinationsADestructive
Create or change an Open Hub Destination. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_write_open_hub", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), fields, package, directory, +25 more.
bw_write_planningCreate and change planning objectsADestructive
Create or change planning objects: aggregation levels, planning functions, sequences, filters, conversion types. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_write_planning", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), kind, name, rule, +33 more.
bw_write_process_chainCreate and change process chainsADestructive
Create or change a process chain: steps, edges, DTP and program steps, error links, decision variants. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_write_process_chain", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), to, dtp, dtps, +39 more.
bw_write_queryCreate and change queriesADestructive
Create or change a query and its reusable components: layout, filter, key figures, characteristics, cells, exceptions, settings, restricted and calculated key figures, structures, variables, role assignments. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_write_query", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), unit, action, formula, +59 more.
bw_write_transformationCreate and change transformationsADestructive
Create a transformation, change the rule of a field, and set or remove its routines and runtime. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_write_transformation", operation: "…") gives the complete parameter definition of one.
Inputs: operation (required), group, action, fields, +43 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
Most tools map to a distinct BW object type or lifecycle action, and the operation-enum plus bw_describe pattern helps clarify boundaries. Some overlap remains among generic execution tools (bw_run, bw_activate, bw_run_bpf, bw_monitor) and data tools (bw_data vs bw_query_data).
All tools use lowercase snake_case with a consistent bw_ prefix, and write tools follow the predictable bw_write_<object> pattern. The few verb-only or noun-like names (bw_data, bw_manage) remain readable and fit the same convention.
23 tools is heavy for a typical MCP surface and sits in the borderline 16-25 range. The breadth is justified by SAP BW modeling, but some object-specific write tools could feel numerous for an agent to navigate.
The surface covers discovery, read, create/change, delete, activation, execution, monitoring, data access, repository/transport management, and self-description across major BW object types. No obvious dead ends appear for core modeling workflows.
Maintenance
Related MCP Connectors
Connect your AI assistants to Keboola and expose your data, transformations, SQL queries, ...
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
Amazon Ads, Seller Central, Vendor Central and AMC data for AI agents. Read-only by default.
Connect assistants to your workspace knowledge, skills, and work tools.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to access SAP ADT APIs for reading, writing, debugging, deploying, and testing ABAP code through natural language or DSL automation.547MIT
- AlicenseAqualityDmaintenanceEnables AI agents to read, write, activate, and transport ABAP code in SAP systems via ABAP ADT REST API, without needing SAP GUI.24MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that enables AI assistants like Claude to work directly inside SAP BW/4HANA systems — reading, creating and modifying BW modeling objects via the internal REST API used by Eclipse BWMT.MIT
- FlicenseBqualityCmaintenanceEnables AI assistants to explore and query SAP BW/4HANA modeling objects and metadata, such as InfoAreas, InfoObjects, ADSOs, CompositeProviders, and Queries.15-