Skip to content

Latest commit

 

History

History
93 lines (65 loc) · 3.6 KB

File metadata and controls

93 lines (65 loc) · 3.6 KB

hana-cli — Claude Code Plugin

MCP Registry npm License

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

Category Tools Examples
Schema exploration 20+ List tables, views, procedures, functions, schemas
Object inspection 10+ Inspect table columns, view definitions, procedure parameters
Data tools 15+ Import CSV/Excel/JSON, export data, profile data quality, validate data
Performance monitoring 15+ Expensive statements, memory analysis, blocking sessions, deadlocks
Security 10+ Users, roles, privilege analysis, security scans, audit logs
Backup & recovery 5+ Create backups, check status, list backups, restore
System admin 10+ Health checks, system info, diagnostics, INI configuration
Developer tools 15+ CDS generation, code templates, test data generation, HDI containers
Discovery & help 15+ 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

Apache License 2.0

Contributing

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