# SAP HANA CLI [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/SAP-samples/hana-developer-cli-tool-example  
**GitHub Stars:** 116  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/sap-hana-cli

## Description
150+ SAP HANA database tools as MCP tools for AI assistants

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/SAP-samples/hana-developer-cli-tool-example), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
npm install -g hana-cli
```

2. Install:

```sh
git clone https://github.com/SAP-samples/hana-developer-cli-tool-example
```

## Documentation

## What SAP HANA CLI MCP server does

The SAP HANA CLI MCP server adds more than 150 SAP HANA database tools to MCP-compatible AI assistants. It is built from the SAP HANA Developer Command Line Interface, a developer-focused command-line tool for grouping common and complex HANA development operations rather than acting as a general-purpose SQL console replacement.

The project is intended for work with local SAP HANA development, remote HANA databases, SAP HANA Express Edition, SAP HANA Cloud, and the SAP HANA service for SAP BTP. It can also run from development environments such as Visual Studio Code, SAP Business Application Studio, Google Cloud Shell, and AWS Cloud9, provided the environment has Node.js and network access to the target database.

## How it works

The CLI runs on Node.js and connects to HANA using connection details available to the local development environment. One supported pattern uses `default-env.json`, a configuration file commonly used with SAP development tooling. The project also documents multiple connection-resolution locations and modes, including an administrative configuration file, so connection behavior depends on the configuration present in the environment.

The MCP-facing database capabilities are supplied as tools for an AI assistant, while the underlying project also provides more than 20 CLI commands, REST API documentation, and BTP-related commands.

## Setup and configuration

The packaged CLI can be installed globally with:

```shell
npm install -g hana-cli
```

Source installation requires Node.js 22 or later. The documented source workflow is to clone the repository, run `npm install`, and then run `npm link` from the project root so that `hana-cli` is available as a command.

A HANA connection must be configured separately. The project primarily uses `default-env.json` for local-development connectivity, but it can also connect to local or remote HANA systems. The target database does not need to run in the same cloud environment as the development shell.

Some CLI functionality depends on SAP's BTP CLI being installed and available on `PATH`. On Linux and macOS, the repository includes `scripts/install-btp.sh`; Windows users are directed to install the BTP CLI through SAP's development tools resources. Running `btp --version` verifies that dependency, and `hana-cli btp` reports configured BTP target information.

## Limitations and notes

This project is positioned as a developer-oriented command-line tool, not as a replacement for `hdbsql` as a generic SQL console. Its focus is on grouped development operations and database tools.

Version 4.x introduces substantial changes, including an Express 5 migration and refactored database connection handling. The project notes that users may encounter environment-specific issues and identifies version `3.202601.0` as the last stable release before those changes. Check the repository changelog and documentation for current setup details, supported commands, and troubleshooting guidance.

The SAP HANA CLI MCP server requires a Node.js runtime and access to the configured HANA system. BTP-specific operations add a separate dependency on the BTP CLI; that dependency is not required merely by the documented HANA database connection model unless those BTP commands are used.

_Full upstream README: https://allmcps.com/mcp/sap-hana-cli/readme_

