Book an AI Check arrow_forward

SAP HANA MCP server: connect AI to HANA cleanly

An MCP server for SAP HANA makes data queryable for AI assistants such as Claude or Microsoft Copilot. Whether that is viable comes down to three questions: Which HANA do you mean, which licence do you have, and which path does SAP allow? This guide assesses all three, with sources, as of October 2026.

Book an AI Check arrow_forward Access paths compared
Overview of all MCP topics The complete MCP server guide brings together architecture, tools, security and GDPR — the pillar page for this cluster.
Go to the MCP server guide arrow_forward

What is an SAP HANA MCP server?

An SAP HANA MCP server is a program that provides an AI assistant, via the Model Context Protocol, with tools for queries on an SAP HANA database. The assistant picks a tool, the server runs the query and returns the result.

Most freely available HANA MCP servers work at the SQL level: they sign in with a database user, let the model explore tables and run SQL. For developers, that is convenient. For business data under S/4HANA, it is the riskiest path, for technical, licensing and contractual reasons. For a standalone HANA Cloud database holding your own data, on the other hand, a well-built server can make sense.

In short: If “HANA” means your S/4HANA, the path leads through the application layer, that is, through published interfaces. If HANA Cloud is your own database, you build an MCP server with fixed tools instead of free-form SQL.

SAP HANA or SAP HANA Cloud: what is the difference?

SAP HANA is the database that S/4HANA runs on. SAP HANA Cloud is a standalone database service on the SAP Business Technology Platform (BTP), managed by SAP.

The tie between S/4HANA and HANA is set by contract: under the SAP Software Use Rights, S/4HANA packages may only be run on an SAP HANA database (SAP Software Use Rights v.4-2026, section 2.1). In this case, tables, data model and authorizations belong to the S/4HANA application, and the database is its storage.

SAP describes SAP HANA Cloud as a cloud-native database service that forms the basis of database management on the SAP BTP (SAP Help: Data Persistence Using SAP HANA Cloud). As a managed service, it needs little administration according to SAP (SAP Help: Administration Guide). Here you create schemas, tables and views yourself, for example for your own applications on the BTP or as an analytics database.

FeatureSAP HANA under S/4HANASAP HANA Cloud as your own database
RoleDatabase of the S/4HANA applicationStandalone database service on the SAP BTP
Data modelBelongs to the application; tables are not a published interfaceBelongs to you; you define schemas and views
Permissions of business usersChecked by the application server (roles, authorization objects)Defined by you in the database or in your application
Licence questionA runtime or full-use licence determines access by third-party softwareGoverned by your HANA Cloud contract
MCP via SQLNot recommendedDefensible with fixed tools and clear boundaries

Why does direct SQL access bypass the application layer?

Because S/4HANA checks business users’ permissions, client separation and business logic in the application server and not in the database. Anyone who reads via SQL bypassing the application gets raw data without these checks.

“SAP HANA authorization applies only to technical and administrative database users managed in the database. […] Applications connect to the database using a technical user, and direct access to the database is only possible for database administrators.”

SAP HANA Security Guide, section “SAP HANA in a Classic 3-tier Architecture” (SAP HANA Platform 2.0 SPS 08). Source: help.sap.com

For an AI agent with SQL access, this means in concrete terms:

Does your HANA licence allow direct access by an AI tool?

With a runtime licence, the wording of SAP’s terms of use argues against it. Only your contract with SAP can settle this authoritatively, which is why the question belongs before the first line of code.

SAP governs usage rights in the SAP Software Use Rights. The current English version (v.4-2026) distinguishes between a runtime database, which may only be used together with certain SAP applications, and a full-use licence. For the SAP HANA enterprise edition, it states that it may be used with an unlimited number of licensed data sources (section 19.2.1).

“Customer may only Use the runtime database licensed pursuant an Order Form referencing these Use Terms in conjunction with its Use of the Packages licensed pursuant to such Order Form. In the event Customer Uses the licensed runtime database other than as specified in this paragraph, a full use license, including programming tools, must be licensed directly from an authorized vendor.”

SAP Software Use Rights v.4-2026, section 8.1.1. Source: SAP Trust Center (PDF)

For the widespread runtime variant “SAP HANA, runtime edition for applications and SAP BW” (HANA REAB), the 2026 version is even clearer (section 19.15.4): HANA Studio, Cockpit, Web IDE and Business Application Studio may only be used to administer, monitor and create your own views. Analyses must run through the supported SAP software or through such views, and according to the text, SAP BI tools may access those views.

A self-built or third-party MCP server is neither an SAP BI tool nor part of the licensed SAP application. Going by the wording, SQL access by it to a runtime database is therefore not covered. Notably, the 2021 version still allowed, at the same place, access to your own views by non-SAP BI tools certified by SAP (SUR 2021, section 11.16). Which version applies to you depends on the date and wording of your contract.

Our assessment, not legal advice: Here we read SAP’s terms, not your contract. Before an AI tool accesses a HANA database beneath an SAP application, you should have SAP answer these questions in writing.

  1. Which HANA licence is in your order form: runtime (for example HANA REAB) or full use (enterprise edition)?
  2. Which version of the Software Use Rights forms part of the contract?
  3. Does an MCP server that issues SQL against your own views count as use “other than as specified”, triggering a full-use licence?
  4. How does SAP count, for licensing purposes, the people who access the data indirectly through an AI assistant?
  5. Does your operating model (for example RISE or private cloud) give you database access for your own software at all?

What does the SAP API Policy mean for SQL access?

The SAP API Policy allows only published interfaces and prohibits AI systems that plan calls themselves, as well as systematic or high-volume data extraction, unless a path recognised by SAP is used.

The provisions of Policy v.4.2026a that matter for database access (PDF at SAP):

Whether SQL access to the database falls under the term “API” is not expressly answered by the Policy text. It covers programming interfaces, extensions and “related data transmission interfaces made available as part of SAP solutions”. Two things are clear nonetheless: S/4HANA tables are not a published interface, and an MCP server through which a model plans its own queries matches exactly the scenario in section 2.2.2 (a). SQL is therefore not a way out of the Policy but rather an additional risk. Which paths SAP expressly recognises for AI agents is covered in detail in the guide SAP MCP server and API Policy.

Which paths are better for AI analysis of SAP data?

For operational questions, published OData services; for metrics, analytical CDS queries; and for large data volumes, a data platform such as SAP Datasphere or SAP Business Data Cloud. What they all have in common: access runs through a layer that SAP intends for the purpose.

Operational information

Published OData services

Order status, open items, master data: via services from the SAP Business Accelerator Hub, with the permissions of the user asking. The MCP Gateway of the Integration Suite can turn them into MCP tools, according to SAP documentation even from RFC-based modules (SAP Help).

Fits if
individual transactions are queried.
Concerns
Clarify the policy question in advance for a custom server.
Metrics

Analytical CDS queries

Analyses such as revenue by region are modelled as a CDS query and released via a service binding, for example as an InA service (SAP Help) or as a generated OData service (SAP support content). The application’s authorization check stays in play.

Fits if
recurring metrics are needed.
Concerns
Modelling in the SAP system required.
Large data volumes

SAP Datasphere or Business Data Cloud

Data is transferred to an analytics platform by an SAP route, for example via the communication scenario “SAP Datasphere – ABAP CDS Extraction”. Released views there can be read by third-party tools through a database user via ODBC or JDBC (SAP Help). SAP describes Business Data Cloud data products as managed, ready-to-use business data sets with metadata (SAP Help).

Fits if
a lot of data is analysed over long periods.
Concerns
Own platform with licence and operation; Policy and contract apply here too.

For bulk data, the Policy is clear in its direction: high-volume extraction only via SAP-recognised paths and within the documented limits. Which path is intended for your volume is stated in the documentation of the respective product and belongs in your discussion with SAP.

Access paths compared: suitability and risk

The table summarises which paths suit which purpose and where the main risk lies. It does not replace a review of your contract.

Access pathSuitable forMain riskOur assessment
Free-form SQL on the S/4HANA databaseNo productive purposeBypasses authorizations and logic; licence and policy question openNot recommended
SQL on your own views in a runtime databaseAt most analysesLicence wording refers to SAP BI tools, not third-party softwareOnly after written clarification with SAP
Own MCP server on published OData APIsOperational informationSection 2.2.2 of the Policy, full responsibility with the operatorPossible with an assessment from SAP
MCP Gateway of the Integration SuiteOperational information, agentsAdditional SAP licence and BTP operationPath recognised by SAP
Analytical CDS queries via service bindingMetrics, reportsModelling effort; policy question for AI accessGood path for analyses
Datasphere or Business Data Cloud, MCP on released viewsLarge analysesPlatform effort; mind the contractGood path for bulk data
HANA Cloud with your own data, MCP with fixed toolsOwn data setsBuild quality of the serverDefensible with the rules below
Community server with free-form SQLDevelopment, test dataFree-form SQL; limits often not presetNot for production data

HANA Cloud as your own database: what does a clean MCP server look like?

A clean MCP server for HANA Cloud uses a dedicated read user, released views, fixed tools with bound parameters, hard limits and an audit log of every call. That keeps the database protected even if the model makes a mistake or is manipulated.

Are there ready-made MCP servers for SAP HANA?

Yes, from the community and from third-party vendors. As of October 2026, we have not found a standalone SAP product that gives AI assistants direct database access to HANA via MCP.

The same applies to all of them: a third-party MCP server runs with the permissions you give it and sees whatever the model sees. Check origin, version and permissions before it touches real data. What such an approval looks like is described in the guide MCP server security and GDPR. Several systems behind one assistant are covered in the guide on MCP clusters.

Frequently asked questions

Is there an official SAP HANA MCP server from SAP?

As of October 2026, we have not found a standalone SAP product that gives AI assistants direct database access to HANA via MCP. There is a sample project in the SAP-samples area on GitHub for developers, as well as community servers and offerings from driver vendors. For business data, SAP offers MCP through the MCP Gateway of the Integration Suite, that is, through the application layer.

May an AI agent access the S/4HANA database via SQL?

We advise against it. Direct SQL access bypasses the authorizations and business logic of the application layer, S/4HANA tables are not a published API within the meaning of the SAP API Policy, and with a runtime licence the wording of SAP’s terms of use argues against access by third-party software. Clarify the individual case with SAP in writing.

What is the difference between a HANA runtime licence and a full-use licence?

According to the SAP Software Use Rights, a runtime database may only be used together with the licensed SAP applications. According to SAP, anyone who uses it otherwise needs a full-use licence. The SAP HANA enterprise edition may be used with any number of licensed data sources. Which licence you hold is stated in your order form.

Does direct SQL access fall under the SAP API Policy?

The Policy text does not answer this expressly. It covers programming interfaces and related data transmission interfaces of SAP solutions, allows only published APIs, and prohibits circumventing controls through custom developments, proxies or gateways. Anyone planning SQL as a detour around the Policy should clarify this with SAP beforehand.

When is an MCP server directly on HANA Cloud defensible?

When HANA Cloud serves as a standalone database with your own data and not as the database of an SAP application. The usual care then applies: a dedicated read user, released views, fixed tools with bound parameters, row and time limits, IP approval only for the server, and an audit log of every call.

How do I stop the model from running arbitrary SQL?

By not offering a tool for free-form SQL in the server. Each tool contains a fixed query with placeholders, and the model supplies only values such as customer number or period. The database user may only read, and only the released views.

Which path suits large data volumes from SAP?

For bulk data, the SAP API Policy requires paths recognised by SAP and refers to the limits in the product documentation. For analyses, SAP Datasphere or data products of the SAP Business Data Cloud are suitable. Which path fits your contract, we clarify before building.

Can Microsoft Copilot access HANA data via MCP?

Technically yes: Copilot Studio connects MCP servers via Streamable HTTP with OAuth 2.0 or an API key. Whether the server accesses HANA directly or through SAP interfaces determines the licensing and policy questions. For S/4HANA data, we recommend the path via published interfaces.

Which path suits your HANA?

Briefly tell us which HANA you use and which questions the AI assistant should answer. You will receive a written assessment of the path, licensing and policy questions, with no appointment and no sales call.

Thank you, your enquiry has arrived.

You will receive a written assessment by email within one working day.

check_circle Free
check_circle Written reply
check_circle No call needed

Prefer to talk directly? Book a 30-minute AI Check