SAP HANA CLI — Claude Code MCP server: 150+ HANA tools
Wires more than 150 SAP HANA tools into your AI assistant: queries, schema objects, plan analysis. Useful when you build against HANA outside SAP tooling.
claude mcp add hana-cli -- npx -y hana-cliWhat SAP HANA CLI does
SAP HANA CLI wraps hana-cli, a command line tool for local SAP HANA development in editors like VSCode. Over MCP it hands the assistant a long list of commands: inspecting tables and views, reading execution plans, running administrative operations against the database. It starts with npx -y hana-cli — no separate server process to manage.
Some commands talk to SAP Business Technology Platform. Those need SAP's official btp CLI installed and present in PATH; without it they fail outright. Database connectivity comes from default-env.json, the file you already keep around for local work. A local SAP HANA, express edition instance works, and so does a remote one, including SAP HANA Cloud.
Node.js 22 or later is required. The 4.x line moved to Express 5 and reworked connection handling, so unusual setups can hit rough edges — if something breaks, roll back with npm install -g [email protected].
What it helps with
- inspect a table's columns and indexes without leaving the editor
- read an execution plan for a slow query
- export rows from SAP HANA Cloud to a file
- diff schema objects between two HANA instances
- check a database user's roles and privileges
Example prompts for the agent
- Show me the structure of
SALES_ORDERSand its indexes - Walk through the execution plan for this query and point out the bottleneck
- Export the first 100 rows of
CUSTOMERSto CSV
How to install SAP HANA CLI
Platform CLI
claude mcp add hana-cli -- npx -y hana-cliPlatform CLI
codex mcp add sap-hana-cli -- npx -y hana-cliConfig file
{
"mcpServers": {
"sap-hana-cli": {
"command": "npx",
"args": [
"-y",
"hana-cli"
]
}
}
}Config file
{
"servers": {
"sap-hana-cli": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"hana-cli"
]
}
}
}Platform CLI
gemini mcp add sap-hana-cli npx -y hana-cliStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about SAP HANA CLI
How do I install SAP HANA CLI in Claude Code?
Run claude mcp add hana-cli -- npx -y hana-cli. That registers the server in your Claude config, and the tools show up in the session.
What does SAP HANA CLI do?
It exposes hana-cli commands to the assistant for working with a SAP HANA database: queries, schema objects, execution plans, and BTP operations. You stay in the chat instead of switching to a SQL client.
What do the BTP commands require?
SAP's official btp CLI, installed and available in PATH. Commands that reach SAP Business Technology Platform services won't run without it.