Get the FREE Ultimate OpenClaw Setup Guide →

sap-hana -by-cdata

This read-only MCP Server allows you to connect to SAP HANA data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out the first managed MCP platform: CData Connect AI (https://www.cdata.com/ai/).

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio cdatasoftware-sap-hana-mcp-server-by-cdata java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/sap-hana.prp

How to use

This MCP server exposes SAP HANA data through a read-only MCP interface backed by the CData JDBC Driver for SAP HANA. It wraps the JDBC driver in a lightweight MCP server so large language models and clients can query live SAP HANA data without writing SQL directly. After starting the server, clients can discover and call the built-in tools to explore tables, inspect columns, and run queries. The available tools follow the naming convention {servername}_{action}, where {servername} is sap_hana. The tools exposed are sap_hana_get_tables, sap_hana_get_columns, and sap_hana_run_query. When used with Claude Desktop or other MCP clients, you will typically configure a Claude config that points to the Java process and the sap-hana.prp file, so the client can dynamically call the available tools.

Example tool usage from a client:

  • sap_hana_get_tables retrieves a list of tables (CSV output). After discovering tables, call sap_hana_get_columns to list columns for a table, and finally sap_hana_run_query to execute a SELECT. The server runs on stdio, so the client and server must run on the same machine in some environments.

JSON-RPC example names:

  • sap_hana_get_tables
  • sap_hana_get_columns
  • sap_hana_run_query These tools let you explore the data model and retrieve results without writing SQL unless you choose to run a query directly via sap_hana_run_query.

How to install

Prerequisites:

  • Java Runtime Environment (JRE) or JDK installed on the host where the MCP server will run.
  • Maven (for building the MCP server from source).
  • SAP HANA connection via CData JDBC Driver for SAP HANA (download and install per CData instructions).

Installation steps:

  1. Clone the repository and navigate into it: git clone https://github.com/cdatasoftware/sap-hana-mcp-server-by-cdata.git cd sap-hana-mcp-server-by-cdata

  2. Build the MCP server JAR: mvn clean install This will produce CDataMCP-jar-with-dependencies.jar in the build output (typically in target/).

  3. Download and install the CData JDBC Driver for SAP HANA (JDBC): — Link: https://www.cdata.com/drivers/saphana/download/jdbc Follow the driver installation instructions for your OS.

  4. License the JDBC driver (on the host where the driver is installed):

    • Open a terminal and navigate to the driver’s lib directory.
    • Run: java -jar cdata.jdbc.saphana.jar --license
    • Provide your name, email, and a license key (e.g., TRIAL).
  5. Create the .prp configuration file for your SAP HANA connection, for example sap-hana.prp, with properties like: Prefix=saphana ServerName=CDataSAPHANA ServerVersion=1.0 DriverPath=/path/to/cdata.jdbc.saphana.jar DriverClass=cdata.jdbc.saphana.SAPHANADriver JdbcUrl=jdbc:saphana:InitiateOAuth=GETANDREFRESH; Tables=

  6. Run the MCP server: java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/sap-hana.prp Note: The server uses stdio, so the client must run on the same machine or via a compatible bridge.

Additional notes

Tips and notes:

  • The server is read-only by default in this package. To enable full read/write/update/delete capabilities, consider the full MCP server package from CData.
  • Output formats for tools like get_tables and get_columns are CSV, with the first line containing headers.
  • If Claude Desktop (or other clients) cannot see the MCP server, fully quit and restart the client after starting the MCP server.
  • If you encounter connection issues, ensure the JDBC driver is properly licensed and that the sap-hana.prp file contains the correct JdbcUrl and DriverPath.
  • Since the server exposes a limited surface (get_tables, get_columns, run_query), you can still perform ad hoc queries via sap_hana_run_query by supplying a SELECT statement.
  • The JSON-RPC examples in the README show how to call each tool; adapt the names as sap_hana_get_tables, sap_hana_get_columns, and sap_hana_run_query to your config.

Related MCP Servers

Sponsor this space

Reach thousands of developers