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
12 stars

The SAP HANA MCP Server provides a bridge between AI applications and SAP HANA databases through the Model Context Protocol (MCP). It allows AI agents like Claude Desktop to directly interact with your SAP HANA database using natural language queries, making database exploration and management more intuitive.

Prerequisites

System Requirements

  • Node.js: Version 18.x or higher
  • Memory: Minimum 512MB RAM (2GB recommended)
  • Storage: 100MB available disk space
  • Network: Access to SAP HANA database

Database Requirements

  • SAP HANA: Version 2.0 or higher
  • User Permissions: SELECT, DESCRIBE, and administrative privileges
  • Network Access: TCP/IP connectivity to HANA instance

Installation

Install the package globally using npm:

npm install -g hana-mcp-server

Configuration

Setting Up Claude Desktop Integration

Update your Claude Desktop configuration file:

macOS/Linux: ~/.config/claude/claude_desktop_config.json
Windows: %APPDATA%\claude\claude_desktop_config.json

{
  "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",
        "LOG_LEVEL": "info"
      }
    }
  }
}

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

Environment Variables

The server can be configured using these environment variables:

Variable Required Description Default
HANA_HOST HANA database hostname -
HANA_PORT HANA database port 443
HANA_USER Database username -
HANA_PASSWORD Database password -
HANA_SCHEMA Default schema -
HANA_SSL Enable SSL connection true
HANA_ENCRYPT Enable encryption true
HANA_VALIDATE_CERT Validate SSL certificate true
LOG_LEVEL Logging level info

Using the Server

With Claude Desktop

Once configured, you can interact with your HANA database using natural language queries in Claude Desktop:

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

From Command Line

You can also run the server directly:

# Start with environment variables
HANA_HOST="your-host" HANA_USER="your-user" HANA_PASSWORD="your-pass" hana-mcp-server

# Or set environment variables first
export HANA_HOST="your-host"
export HANA_USER="your-user"
export HANA_PASSWORD="your-pass"
hana-mcp-server

Available Tools

Configuration Tools

Tool Description Parameters
hana_show_config Display current HANA configuration None
hana_test_connection Test database connectivity None
hana_show_env_vars Show environment variables (debug) None

Schema Exploration Tools

Tool Description Parameters
hana_list_schemas List all database schemas None
hana_list_tables List tables in a schema schema_name (optional)
hana_describe_table Show table structure schema_name, table_name
hana_list_indexes List indexes for a table schema_name, table_name
hana_describe_index Show index details schema_name, table_name, index_name

Query Execution Tools

Tool Description Parameters
hana_execute_query Execute SQL queries query
hana_execute_parameterized_query Execute parameterized queries query, parameters
hana_get_sample_data Get sample data from table schema_name, table_name, limit
hana_count_rows Count rows in a table schema_name, table_name

Administrative Tools

Tool Description Parameters
hana_get_system_info Get system information None
hana_get_user_info Get current user information None
hana_get_memory_usage Get memory usage statistics None

Troubleshooting

Common Connection Issues

Issue Cause Solution
"Connection refused" Network connectivity Verify HANA host and port accessibility
"Authentication failed" Invalid credentials Check username/password in configuration
"SSL certificate error" Certificate validation Configure HANA_VALIDATE_CERT=false or install valid certificates

Enabling Debug Logging

# Set debug logging
export LOG_LEVEL="debug"
export ENABLE_FILE_LOGGING="true"
export ENABLE_CONSOLE_LOGGING="true"

# Monitor logs
tail -f hana-mcp-server.log

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