The SAP HANA MCP Server enables AI agents and development tools to securely interact with SAP HANA databases through the Model Context Protocol (MCP).
Database Operations:
Execute custom SQL queries, including parameterized queries for prepared statements
Retrieve sample data and count rows in tables
Test database connectivity and view configuration settings
Schema Management:
List all schemas, tables within schemas, and describe table structures
List and describe indexes for tables
Explore database schema through natural language commands
System Administration:
Monitor memory usage statistics and system information
Get current database user information
Debug environment variables
Integration & Security:
Seamlessly integrates with Claude Desktop, VSCode extensions, and custom AI applications
Features enterprise-grade security with SSL/TLS support and secure credential management
Provides both command-line interface and React-based web UI
Uses JSON-RPC 2.0 with modular architecture for easy extension
Uses .env files for configuration management of server settings and connection parameters
Uses Flask to implement the REST API layer of the MCP server architecture
Utilizes pandas as a prerequisite library, likely for data manipulation and analysis within the model execution context
Built on Python 3.8+ as the core programming language for the server implementation
Provides integration with SAP HANA Cloud Database, allowing for machine learning operations and model management directly with the SAP HANA Cloud environment
HANA MCP Server
Model Context Protocol (MCP) server for seamless SAP HANA database integration with AI agents and development tools.
๐ Quick Start
1. Install
2. Configure Claude Desktop
Update your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
3. Restart Claude Desktop
Close and reopen Claude Desktop to load the configuration.
4. Test It!
Ask Claude: "Show me the available schemas in my HANA database"
Related MCP server: Cursor DB MCP Server
๐ฏ What You Get
Database Operations
Schema Exploration: List schemas, tables, and table structures
Query Execution: Run SQL queries with natural language
Data Sampling: Get sample data from tables
System Information: Monitor database status and performance
AI Integration
Natural Language Queries: "Show me all tables in the SYSTEM schema"
Query Building: "Create a query to find customers with orders > $1000"
Data Analysis: "Get sample data from the ORDERS table"
Schema Navigation: "Describe the structure of table CUSTOMERS"
๐ฅ๏ธ Visual Configuration (Recommended)
For easier setup and management, use the HANA MCP UI:
This opens a web interface where you can:
Configure multiple database environments
Deploy configurations to Claude Desktop with one click
Manage active connections
Test database connectivity

๐ ๏ธ Configuration Options
Required Parameters
Parameter | Description | Example |
| Database hostname or IP address |
|
| Database username |
|
| Database password |
|
Optional Parameters
Parameter | Description | Default | Options |
| Database port |
| Any valid port number |
| Default schema name | - | Schema name |
| Connection type |
|
,
,
,
|
| Instance number (MDC) | - | Instance number (e.g.,
) |
| Database name (MDC tenant) | - | Database name (e.g.,
) |
| Enable SSL connection |
|
,
|
| Enable encryption |
|
,
|
| Validate SSL certificates |
|
,
|
| Logging level |
|
,
,
,
|
| Enable file logging |
|
,
|
| Enable console logging |
|
,
|
Database Connection Types
1. Single-Container Database
Standard HANA database with single tenant.
Required: HANA_HOST, HANA_USER, HANA_PASSWORD
Optional: HANA_PORT, HANA_SCHEMA
2. MDC System Database
Multi-tenant system database (manages tenants).
Required: HANA_HOST, HANA_PORT, HANA_INSTANCE_NUMBER, HANA_USER, HANA_PASSWORD
Optional: HANA_SCHEMA
3. MDC Tenant Database
Multi-tenant tenant database (specific tenant).
Required: HANA_HOST, HANA_PORT, HANA_INSTANCE_NUMBER, HANA_DATABASE_NAME, HANA_USER, HANA_PASSWORD
Optional: HANA_SCHEMA
Auto-Detection
When HANA_CONNECTION_TYPE is set to auto (default), the server automatically detects the type:
If
HANA_INSTANCE_NUMBER+HANA_DATABASE_NAMEโ MDC TenantIf only
HANA_INSTANCE_NUMBERโ MDC SystemIf neither โ Single-Container
๐๏ธ Architecture
System Architecture
Component Structure
๐ Available Commands
Once configured, you can ask Claude to:
"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 HANA host and port
"Authentication failed": Verify username/password
"SSL certificate error": Set
HANA_VALIDATE_CERT=falseor install valid certificates
Debug Mode
๐ฆ Package Info
Size: 21.7 kB
Dependencies: @sap/hana-client, axios
Node.js: 18+ required
Platforms: macOS, Linux, Windows
๐ค Support
Issues: GitHub Issues
UI Tool: HANA MCP UI
๐ License
MIT License - see LICENSE file for details.