Get the FREE Ultimate OpenClaw Setup Guide →

hana

Model Context Server Protocol for your HANA DB

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio hatrigt-hana-mcp-server hana-mcp-server \
  --env HANA_SSL="true" \
  --env HANA_HOST="Database hostname or IP address" \
  --env HANA_PORT="443" \
  --env HANA_USER="Database username" \
  --env LOG_LEVEL="info" \
  --env HANA_SCHEMA="Default schema name" \
  --env HANA_ENCRYPT="true" \
  --env HANA_PASSWORD="Database password" \
  --env HANA_DATABASE_NAME="HQQ" \
  --env HANA_VALIDATE_CERT="true" \
  --env ENABLE_FILE_LOGGING="true" \
  --env HANA_CONNECTION_TYPE="auto" \
  --env HANA_INSTANCE_NUMBER="10" \
  --env ENABLE_CONSOLE_LOGGING="false"

How to use

This MCP server provides a bridge between your SAP HANA database and AI agents and development tools. It supports database exploration (schemas, tables, and structures), query execution driven by natural language, data sampling, and system information retrieval such as status and performance metrics. The server exposes tools for schema discovery, query construction, data analysis, and table/constraint navigation, enabling Claude or other MCP clients to interact with HANA using natural language and structured requests. You can also leverage the HANA MCP UI to manage connections, configure multiple environments, and deploy configurations to Claude Desktop with a single click.

Once configured, you can ask Claude to perform tasks like listing all schemas, describing a table structure, running a query generated from a natural language prompt, or retrieving sample data from a table. The UI and command-line options provide streamlined management, including testing connectivity and toggling logging levels for debugging.

How to install

Prerequisites:

  • Node.js 18+ installed on your system
  • Access to npm (npm install -g)

Step-by-step installation:

  1. Install the MCP server globally:
npm install -g hana-mcp-server
  1. (Optional) Install the HANA MCP UI for a web-based configuration interface:
npx hana-mcp-ui
  1. Prepare your environment variables as described in the configuration (HANA_HOST, HANA_USER, HANA_PASSWORD, etc.).
  2. Start the MCP server:
hana-mcp-server
  1. Validate that the server is running and listening on the expected port. You can then configure Claude Desktop or Claude Desktop-like clients to consume the MCP endpoints.

Additional notes

Tips and common considerations:

  • Use HANA_CONNECTION_TYPE set to auto to let the server detect whether you’re using a single-container, MDC system, or MDC tenant database.
  • Ensure HANA_VALIDATE_CERT is set appropriately for your certificate setup; for self-signed certs, you may disable validation (not recommended for production).
  • Enable LOG_LEVEL to debug when troubleshooting connection or tool execution issues.
  • If you encounter SSL-related errors, verify HANA_SSL and HANA_ENCRYPT are consistent with your DB configuration.
  • The available commands include schema exploration, table description, and natural-language query execution; combine these with the UI for easier workflow management.

Related MCP Servers

Sponsor this space

Reach thousands of developers