Home / MCP / HANA MCP Server

HANA MCP Server

Provides an MCP server to connect SAP HANA databases with AI agents for schema exploration, querying, data sampling, and analysis.

javascript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "hana_mcp": {
            "command": "hana-mcp-server",
            "args": [],
            "env": {
                "HANA_HOST": "hana.company.com",
                "HANA_PORT": "443",
                "HANA_USER": "DBADMIN",
                "HANA_PASSWORD": "your-secure-password",
                "HANA_SCHEMA": "SYSTEM",
                "HANA_SSL": "true",
                "HANA_ENCRYPT": "true",
                "HANA_VALIDATE_CERT": "true",
                "HANA_CONNECTION_TYPE": "auto",
                "HANA_INSTANCE_NUMBER": "10",
                "HANA_DATABASE_NAME": "HQQ",
                "LOG_LEVEL": "info",
                "ENABLE_FILE_LOGGING": "true",
                "ENABLE_CONSOLE_LOGGING": "false"
            }
        }
    }
}

You set up the HANA MCP Server to connect SAP HANA databases with AI agents and development tools, enabling natural language queries, schema navigation, and data exploration from your preferred MCP client.

How to use

You connect your MCP client (such as Claude Desktop) to the HANA MCP Server to access database capabilities. Start the server, configure your client with the provided MCP entry, and then ask for database actions as if you were talking to a person. You can explore schemas and tables, run SQL via natural language, sample data, and monitor basic system information. Build queries in natural language, request data analyses, and describe table structures to navigate large schemas quickly.

How to install

Prerequisites: you need Node.js installed on your machine to install and run the MCP server.

Install the MCP server globally using npm:

npm install -g hana-mcp-server

Configure Claude Desktop

Add an MCP server entry named β€œHANA Database” in your Claude Desktop configuration and provide the required environment settings for your HANA connection.

{
  "mcpServers": {
    "HANA Database": {
      "command": "hana-mcp-server",
      "env": {
        "HANA_HOST": "your-hana-host.com",
        "HANA_PORT": "443",
        "HANA_USER": "your-username",
        "HANA_PASSWORD": "your-password",
        "HANA_SCHEMA": "your-schema",
        "HANA_SSL": "true",
        "HANA_ENCRYPT": "true",
        "HANA_VALIDATE_CERT": "true",
        "HANA_CONNECTION_TYPE": "auto",
        "HANA_INSTANCE_NUMBER": "10",
        "HANA_DATABASE_NAME": "HQQ",
        "LOG_LEVEL": "info",
        "ENABLE_FILE_LOGGING": "true",
        "ENABLE_CONSOLE_LOGGING": "false"
      }
    }
  }
}

Restart Claude Desktop

Close Claude Desktop and reopen it to load the new MCP server configuration.

Test it

Ask Claude to show available schemas in your HANA database to verify connectivity and configuration.

What you can do with the server

You can perform database operations and AI-assisted actions: explore schemas, view table structures, run SQL queries via natural language, sample data, and monitor basic system information. Use natural language prompts to navigate, describe, and analyze data across your SAP HANA environments.

Visual configuration (recommended)

For easier setup and management, use the HANA MCP UI to configure environments, deploy configurations to Claude Desktop with one click, manage connections, and test connectivity.

npx hana-mcp-ui

Troubleshooting

Common issues include connection problems, authentication failures, and SSL certificate errors. Verify host and port, confirm username and password, and ensure SSL certificate validation is appropriate for your setup.

If you need debug output while diagnosing problems, enable verbose logging and console messages.

Notes

This server supports multiple HANA connection types and can auto-detect whether you are connecting to a single-container, MDC system, or MDC tenant database based on the provided connection details.

Available tools

schema_explore

Explore database schemas, list schemas, tables, and table structures

query_execute

Execute SQL queries using natural language prompts and view results

data_sample

Retrieve sample data from tables for quick inspection

system_info

Monitor basic database status and performance metrics

nl_query

Interpret natural language prompts into SQL queries or data requests

build_query

Assist in constructing complex SQL queries from user intent

analyze_data

Provide data analysis or summarization based on a dataset

describe_schema

Describe the structure of a specified table or schema