An MCP Server over Datasphere and HANA — Hands-On
As of 2026-09-25
The hands-on build behind M350's analytics agent and M327's MCP concepts: a governed MCP server exposing SAP Datasphere and SAP HANA Cloud as agent tools. Opens by correcting a real risk — SAP ships no packaged Datasphere or HANA MCP server; what exists as community open-source projects is unsupported and unreviewed. Builds instead on SAP Integration Suite's own MCP Server artifact: its three source types (API, HTTP endpoint with OpenAPI, RFC), the 30-tool-per-artifact limit, the Integration Cell runtime requirement, and SAP's own API-composition-first tutorial pattern. Covers reaching Datasphere through its documented OData Catalog and Consumption services (three-legged OAuth 2.0, standard OData query options) and reaching HANA Cloud directly via hdbcli when no view exists yet, then registering the server as an MCP-capable BTP destination for Joule Studio. Closes on identity: what principal propagation changes and what a fixed technical-user destination does not protect.
What you will learn
- State correctly that SAP does not ship a packaged Datasphere or HANA MCP server, and name the governed SAP alternative (Integration Suite's MCP Gateway)
- Choose among the three Integration Suite MCP Gateway source types (API, HTTP endpoint with OpenAPI, RFC) for a given Datasphere, HANA Cloud or S/4HANA requirement
- Design a composed MCP tool that respects the 30-tool-per-artifact limit and the Integration Cell runtime requirement
- Connect an MCP tool to Datasphere's OData Consumption API (three-legged OAuth 2.0, $select/$filter/$orderby/$top/$skip) or to HANA Cloud via hdbcli with a narrow, parametrised, read-only surface
- Explain how a calling user's identity does or does not survive to the backend depending on the chosen path, and what principal propagation changes
- Register a working MCP server as an MCP-capable BTP destination so a Joule Studio agent can use it
Who this is for. M327 taught you what MCP is. This module builds one: a governed MCP server that exposes SAP Datasphere and SAP HANA Cloud as tools an agent can call — the tool layer M350's analytics agent depends on. Read the first section before anything else: it corrects an assumption the module title could invite.
1. The honest starting point: SAP does not ship a "Datasphere MCP Server"
Search for one and you will find several: open-source projects on GitHub, Glama and mcpmarket that connect an AI client to Datasphere's metadata, catalog and OData APIs, and separate community HANA MCP servers offering dozens of SQL tools. None of them is an SAP product. They are useful to read for ideas — one documents 45 tools with OAuth 2.0 and PII masking, another wraps hdbcli behind 34 SQL tools — but none carries SAP support, none has been reviewed for this module, and none is something to point at a production tenant without your own security review first. Treat every one of them exactly like any other third-party open-source dependency: read the code before you trust it with a customer's credentials.
Prerequisites
- M327 — MCP & A2A for SAP Systems (protocol fundamentals)
- Working knowledge of OData v4 and OAuth 2.0
- Comfort with a HANA Cloud connection (hdbcli, or an equivalent client) and basic SQL
- Recommended alongside M350 (the analytics agent this server serves) and access to a Datasphere or HANA Cloud trial for the exercises
Outcomes
- Correctly brief a client on what SAP does and does not ship for MCP over Datasphere/HANA, without overstating a community project as an SAP product.
- Choose and justify an Integration Suite MCP Gateway source type for a real requirement.
- Design one composed, well-described tool that stays inside the 30-tool limit and a narrow, parametrised query surface.
- State, per tool, which identity actually reaches the backend and whether that is acceptable for the data it touches.
Full module available to members. The full module adds: the decision framework · the end-to-end scenario walkthrough · the KPI scorecard · the anti-patterns · the code blocks · the knowledge check · the diagrams.