HANA Cloud ML Bridge MCP server

Bridges SAP HANA Cloud databases with machine learning operations through a three-layer architecture that enables model management, execution contexts, and standardized communication for both inference and training workflows.
Back to servers
Setup instructions
Provider
HatriGt
Release date
Mar 08, 2025
Language
Python
Stats
22 stars

The HANA MCP Server enables seamless integration between SAP HANA databases and AI agents like Claude, allowing you to interact with your database using natural language through the Model Context Protocol (MCP).

Installation

Install the Server

Install the HANA MCP Server globally using npm:

npm install -g hana-mcp-server

Configure Claude Desktop

To connect Claude with your HANA database, update your Claude Desktop configuration file located at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\claude\claude_desktop_config.json
  • Linux: ~/.config/claude/claude_desktop_config.json

Add the following configuration to the file:

{
  "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"
      }
    }
  }
}

Activate the Configuration

After updating the configuration file, restart Claude Desktop to load the new settings.

Visual Configuration Tool

For easier setup, you can use the HANA MCP UI tool:

npx hana-mcp-ui

This web interface allows you to:

  • Configure multiple database environments
  • Deploy configurations to Claude Desktop with one click
  • Test database connectivity

Configuration Options

Required Parameters

Parameter Description Example
HANA_HOST Database hostname or IP address hana.company.com
HANA_USER Database username DBADMIN
HANA_PASSWORD Database password your-secure-password

Optional Parameters

Parameter Description Default Options
HANA_PORT Database port 443 Any valid port number
HANA_SCHEMA Default schema name - Schema name
HANA_CONNECTION_TYPE Connection type auto auto, single_container, mdc_system, mdc_tenant
HANA_INSTANCE_NUMBER Instance number (MDC) - Instance number (e.g., 10)
HANA_DATABASE_NAME Database name (MDC tenant) - Database name (e.g., HQQ)
HANA_SSL Enable SSL connection true true, false
HANA_ENCRYPT Enable encryption true true, false
HANA_VALIDATE_CERT Validate SSL certificates true true, false
LOG_LEVEL Logging level info error, warn, info, debug
ENABLE_FILE_LOGGING Enable file logging true true, false
ENABLE_CONSOLE_LOGGING Enable console logging false true, false

Database Connection Types

Single-Container Database

For standard HANA databases with a single tenant:

{
  "HANA_HOST": "hana.company.com",
  "HANA_PORT": "443",
  "HANA_USER": "DBADMIN",
  "HANA_PASSWORD": "password",
  "HANA_SCHEMA": "SYSTEM",
  "HANA_CONNECTION_TYPE": "single_container"
}

MDC System Database

For multi-tenant system databases that manage tenants:

{
  "HANA_HOST": "192.168.1.100",
  "HANA_PORT": "31013",
  "HANA_INSTANCE_NUMBER": "10",
  "HANA_USER": "SYSTEM",
  "HANA_PASSWORD": "password",
  "HANA_SCHEMA": "SYSTEM",
  "HANA_CONNECTION_TYPE": "mdc_system"
}

MDC Tenant Database

For specific multi-tenant tenant databases:

{
  "HANA_HOST": "192.168.1.100",
  "HANA_PORT": "31013",
  "HANA_INSTANCE_NUMBER": "10",
  "HANA_DATABASE_NAME": "HQQ",
  "HANA_USER": "DBADMIN",
  "HANA_PASSWORD": "password",
  "HANA_SCHEMA": "SYSTEM",
  "HANA_CONNECTION_TYPE": "mdc_tenant"
}

Using with Claude

Once configured, you can ask Claude questions about your database:

  • "List all schemas in the database"
  • "Show me tables in the SYSTEM schema"
  • "Describe the CUSTOMERS table structure"
  • "Execute: SELECT * FROM SYSTEM.TABLES LIMIT 10"
  • "Get sample data from ORDERS table"
  • "Count rows in CUSTOMERS table"

Troubleshooting

Connection Issues

  • "Connection refused": Check your HANA host and port settings
  • "Authentication failed": Verify your username and password
  • "SSL certificate error": Set HANA_VALIDATE_CERT=false or install valid certificates

Debug Mode

To run the server with debug logging:

export LOG_LEVEL="debug"
export ENABLE_CONSOLE_LOGGING="true"
hana-mcp-server

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "hana-mcp-server" '{"command":"python","args":["app.py"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "hana-mcp-server": {
            "command": "python",
            "args": [
                "app.py"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "hana-mcp-server": {
            "command": "python",
            "args": [
                "app.py"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later