Back to Plugins

Sap Hana Cli

150+ SAP HANA database tools for AI assistants. Query tables, import/export data, profile data quality, compare schemas, manage backups, monitor performance, and more. Connects to SAP HANA Cloud and on-premise databases.

databaseperformanceai
By SAP SE
3Updated 2 months ago

Installation

/plugin install sap-hana-cli@claude-plugins-official

How to install

  1. Open Claude Code in your terminal
  2. Run the installation command above
  3. The plugin will be enabled automatically
  4. Use the plugin's features in your Claude Code sessions

hana-cli — Claude Code Plugin

MCP Registry npm License REUSE status

150+ SAP HANA database tools as AI-powered MCP tools for Claude Code.

This plugin connects Claude Code to SAP HANA Cloud and on-premise databases, giving your AI assistant direct access to schema exploration, data import/export, performance monitoring, security audits, backup management, and much more.

Install

In Claude Code, run:

/plugin install https://github.com/SAP-samples/hana-cli-claude-plugin

Or install manually by adding this to your project's .mcp.json:

{
  "hana-cli": {
    "command": "npx",
    "args": ["-y", "-p", "hana-cli", "hana-cli-mcp"]
  }
}

What You Get

CategoryToolsExamples
Schema exploration20+List tables, views, procedures, functions, schemas
Object inspection10+Inspect table columns, view definitions, procedure parameters
Data tools15+Import CSV/Excel/JSON, export data, profile data quality, validate data
Performance monitoring15+Expensive statements, memory analysis, blocking sessions, deadlocks
Security10+Users, roles, privilege analysis, security scans, audit logs
Backup & recovery5+Create backups, check status, list backups, restore
System admin10+Health checks, system info, diagnostics, INI configuration
Developer tools15+CDS generation, code templates, test data generation, HDI containers
Discovery & help15+Search commands, examples, troubleshooting, guided workflows

166 total MCP tools — covering virtually every SAP HANA administration and development task.

Prerequisites

  • Node.js 20.19.0 or later
  • SAP HANA database (Cloud or on-premise) with connection credentials

Database Connection

The plugin connects to your SAP HANA database using standard connection methods. Configure credentials via any of these (checked in order):

  1. default-env-admin.json — admin connections
  2. .cdsrc-private.json — SAP CAP dynamic binding
  3. .env / VCAP_SERVICES — environment variables
  4. default-env.json — default connection file
  5. ~/.hana-cli/default.json — global default

Use the hana-cli connect command to set up credentials interactively:

npx hana-cli connect

Or use the __projectContext parameter on any tool call to specify connection details dynamically.

Example Usage

Once installed, just ask Claude:

  • "What tables are in my HANA database?"
  • "Show me the most expensive SQL statements"
  • "Export the PRODUCTS table to CSV"
  • "Run a health check on my database"
  • "Find duplicate records in the ORDERS table"
  • "Profile the data quality of CUSTOMERS"
  • "What users have excessive privileges?"

Documentation

License

Copyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

Repository Governance

This repository is part of the SAP-samples GitHub organisation. Administrative access is granted at the organisation level (SAP OSPO, SAP-samples maintainers, automation bots) and is not managed per-repository. There are zero direct collaborators on this repository.

The main branch is protected by a repository ruleset:

  • Pull requests required (no direct pushes)
  • Linear history required
  • Force-pushes blocked
  • Branch deletion blocked

Contributing

This plugin wraps hana-cli, an open-source SAP sample project. Issues and contributions are welcome at the main repository.

View source on GitHub