SAP HANA MCP Server
The SAP HANA MCP Server provides comprehensive, read-oriented SQL and metadata management, performance monitoring, and self-maintenance capabilities for SAP HANA and SAP Business One Service Layer environments — all through the Model Context Protocol.
Connection & Configuration
Test HANA connections, view server configuration and environment variables, and retrieve session info (user, schema, database, version).
Schema & Object Discovery
List schemas, tables, views, synonyms, procedures, functions, sequences, constraints, indexes, and calculation views with prefix filtering and pagination.
Search tables and columns by LIKE pattern across all schemas.
Describe/explain tables (including business semantics from semantic mapping files), views, procedures, and functions.
Retrieve DDL definitions for tables, views, procedures, functions, triggers, and sequences.
SQL Execution & Query Tooling
Execute arbitrary SQL (SELECT/WITH, plus optionally INSERT/UPDATE/DELETE if enabled) with paged reading, row/column caps, timeouts, and prepared-statement parameters.
Continue truncated queries via snapshots (
hana_query_next_page).Fetch sample rows, run EXPLAIN PLAN, and analyze execution plans.
Metadata & Statistics
Get object dependencies (base/dependent/both), partition info, effective privileges, table stats (row count, type, column store, size), and column stats (distinct/null/min/max).
Performance Monitoring & Diagnostics
Run health checks (DB info, services, memory, top tables, blocked transactions).
Monitor indexserver memory with optional CSV history logging.
Get real-time performance snapshots (open transactions, SQL plan cache, long connections, column-store deltas).
Retrieve the most expensive queries from monitoring views.
Knowledge Base Management
Search, read, save, and index knowledge cases (Markdown-based, local + bundled + remote/cloud-synced). Full KB read/search works even in offline (expired-license) mode.
Licensing & Self-Update
View license status, hardware ID, plan, features, and expiration; enter/validate JWT license tokens.
Check for and apply server updates while preserving user KB cases and configuration. Never auto-updates.
Offline Mode
When the license expires, the server continues in read-only offline mode, with KB search/read/index and license info still available.
Provides integration with SAP HANA and SAP HANA Cloud databases, enabling schema discovery, SQL query execution with guardrails, structural analysis, code object inspection, performance monitoring, and health checks.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SAP HANA MCP Server List all tables in the SAPABAP1 schema"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
HANA MCP Server — Distribución cliente
Paquete ejecutable del Model Context Protocol (MCP) server para SAP HANA y SAP Business One Service Layer.
📥 Descarga
Descargá la última versión desde Releases:
hana-mcp-server-v0.3.1-win-x64.zip
Descomprimí el ZIP en una carpeta permanente, por ejemplo:
C:\hana-mcp-client\Related MCP server: SAP Datasphere MCP Server
✅ Requisitos
Windows 10/11 o Windows Server 2019+ (x64)
Acceso de red al servidor SAP HANA
Token de licencia JWT proporcionado por el vendor (si aplica)
No necesitás instalar Node.js: el ejecutable incluye su propio runtime.
🚀 Instalación rápida
Descomprimí el ZIP en la carpeta destino.
Copiá
.env.examplecomo.envy completá al menos:HANA_HOSTHANA_PORTHANA_USERHANA_PASSWORDHANA_SCHEMA
Si recibiste el token JWT como archivo, guardalo como
.hana-licenseen la misma carpeta.Ejecutá
start.bat(doble clic) o configurá tu cliente MCP para que apunte ahana-mcp-server.exe.
⚙️ Configuración de .env
Ejemplo mínimo:
HANA_HOST=tu-servidor-hana
HANA_PORT=30015
HANA_USER=TU_USUARIO
HANA_PASSWORD=TU_PASSWORD
HANA_SCHEMA=TU_SCHEMA
HANA_SSL=false
HANA_VALIDATE_CERT=falseVer .env.example para todas las opciones disponibles.
🔐 Licenciamiento
Obtené tu hardware ID ejecutando el servidor y consultando la tool hana_show_license_info. Enviale ese HWID al vendor para que genere tu token.
{
"name": "hana_show_license_info",
"arguments": {}
}Una vez instalado el token, la misma tool debe reportar:
status: VALID
plan: enterprise
features: ["hana", "knowledge-base"]🔌 Uso con Claude / VS Code / MCP Inspector
Ejemplo de mcp.json:
{
"mcpServers": {
"hana": {
"type": "stdio",
"command": "C:\\hana-mcp-client\\hana-mcp-server.exe"
}
}
}🔄 Actualizaciones
El servidor nunca se actualiza solo. Cuando haya una nueva versión, el vendor la publicará en Releases. Podés consultarla con la tool hana_check_for_updates y aplicarla con hana_apply_update:
{
"name": "hana_apply_update",
"arguments": {
"confirm": true
}
}El proceso preserva tus casos propios (docs/kb/user/), los casos sincronizados desde la nube (docs/kb/remote/) y tu configuración (.env, .hana-license, mcp.json). Los casos incluidos con el producto (docs/kb/bundled/) sí se actualizan.
📁 Contenido del paquete
hana-mcp-server.exe— MCP empaquetado con Node.js.start.bat— lanzador para Windows.docs/kb/bundled/— base de conocimiento incluida con el producto.docs/kb/user/— casos que crees vos (vacío al inicio).docs/kb/remote/— casos sincronizados desde el servidor remoto.node_modules/@sap/hana-client/— driver nativo de SAP HANA.public-key.pem— clave pública para validar licencias..env.example— plantilla de configuración.mcp.json.example— plantilla de configuración MCP.scripts/update-client.ps1/update-client.sh— helpers de actualización.
📴 Modo offline (licencia vencida)
Si la licencia expira, el MCP no se cierra: entra en modo offline y mantiene disponible la base de conocimiento local en modo de solo lectura.
Funcionan:
hana_search_knowledge_basehana_read_kb_casehana_generate_kb_indexhana_show_license_info
No funcionan hasta renovar la licencia:
Todas las tools de consulta y administración de HANA.
Guardar nuevos casos (
hana_save_knowledge_case).Sincronización remota de KB.
🆘 Soporte
Para renovar la licencia, agregar hardware IDs adicionales o reportar problemas, contactá al vendor con el hardware ID mostrado por hana_show_license_info.
Available Tools
44 toolshana_apply_updateApply MCP updateA
Download and install the latest HANA MCP client update. Preserves local KB cases and configuration.
Inputs: confirm (required).
hana_check_for_updatesCheck for MCP updatesARead-onlyIdempotent
Check if a newer version of the HANA MCP client is available from the vendor license server.
Inputs: no named parameters.
hana_describe_functionDescribe a functionARead-onlyIdempotent
Return parameter names, types, data types, and positions for a function from SYS.FUNCTION_PARAMETERS.
Inputs: function_name (required), schema_name, catalog_database.
hana_describe_indexDescribe table indexBRead-onlyIdempotent
Describe the structure of a specific index
Inputs: index_name (required), table_name (required), schema_name, catalog_database.
hana_describe_procedureDescribe a stored procedureARead-onlyIdempotent
Return parameter names, types (IN/OUT/INOUT), data types, and positions from SYS.PROCEDURE_PARAMETERS.
Inputs: procedure_name (required), schema_name, catalog_database.
hana_describe_tableDescribe table structureBRead-onlyIdempotent
Describe the structure of a specific table
Inputs: table_name (required), schema_name, catalog_database.
hana_describe_viewDescribe a viewARead-onlyIdempotent
Return the view definition (SQL) and column metadata from SYS.VIEWS and SYS.VIEW_COLUMNS.
Inputs: view_name (required), schema_name, catalog_database.
hana_execute_queryExecute SQL queryADestructive
Execute SQL against HANA. When HANA_QUERY_LIMITS_ENABLED=true, SELECT/WITH queries are wrapped with LIMIT/OFFSET (HANA_MAX_RESULT_ROWS) and row/column/cell caps apply; results are returned as-is otherwise. INSERT/UPDATE/DELETE are blocked by default; set HANA_ALLOW_INSERT, HANA_ALLOW_UPDATE, HANA_ALLOW_DELETE=true individually to permit each. Use limit, offset, maxRows, includeTotal as needed. If truncated, snapshotId may be returned for hana_query_next_page.
Inputs: query (required), limit, offset, maxRows, +3 more. Returns: kind, rows, offset, columns, +9 more
hana_explain_planExplain query execution planA
Run EXPLAIN PLAN for a SELECT/WITH query and return operator tree from EXPLAIN_PLAN_TABLE. Only SELECT/WITH are accepted.
Inputs: query (required).
hana_explain_tableExplain table with business semanticsARead-onlyIdempotent
Return column metadata merged with optional business semantics from HANA_SEMANTICS_PATH or HANA_SEMANTICS_URL (JSON keys: SCHEMA.TABLE or DB.SCHEMA.TABLE when catalog_database is set). Optional catalog_database reads SYS.* from another MDC database (e.g. HSP).
Inputs: table_name (required), schema_name, catalog_database. Returns: table, schema, columns, catalog_database, +1 more
hana_generate_kb_indexGenerate knowledge base indexA
Regenerate the docs/kb/index.md file from the saved cases (requires knowledge-base license feature).
Inputs: no named parameters.
hana_get_column_statsGet column statisticsARead-onlyIdempotent
Retrieve column statistics (distinct count, null count, min/max) from SYS.COLUMN_STATISTICS (cached) or via live COUNT queries (live=true). With live=true a specific column_name is required.
Inputs: table_name (required), live, column_name, schema_name.
hana_get_ddlGet object DDL definitionARead-onlyIdempotent
Retrieve the DDL (CREATE statement) for a TABLE, VIEW, PROCEDURE, FUNCTION, TRIGGER, or SEQUENCE from SYS.OBJECT_DEFINITION. Requires appropriate privileges.
Inputs: object_name (required), object_type, schema_name.
hana_get_dependenciesGet object dependenciesARead-onlyIdempotent
Show what an object depends on or what depends on it, from SYS.OBJECT_DEPENDENCIES. Capped at 200 rows.
Inputs: object_name (required), direction, schema_name.
hana_get_expensive_queriesGet top expensive queriesARead-only
Return the most expensive statements from M_EXPENSIVE_STATEMENTS ordered by duration. Requires MONITORING privilege.
Inputs: limit.
hana_get_partition_infoGet table partition infoARead-onlyIdempotent
Return partition metadata (type, level, record count, loaded state) from SYS.TABLE_PARTITIONS. Returns empty result for unpartitioned tables.
Inputs: table_name (required), schema_name.
hana_get_sample_dataGet sample rows from a tableARead-onlyIdempotent
Fetch the first N rows from a table using SELECT TOP. Result is shaped by the same row/column/cell caps as hana_execute_query.
Inputs: table_name (required), limit, schema_name. Returns: kind, rows, offset, columns, +9 more
hana_get_session_infoGet current session infoARead-onlyIdempotent
Return CURRENT_USER, CURRENT_SCHEMA, connected database name, SYSTEM_ID, and HANA version from DUMMY and M_DATABASE.
Inputs: no named parameters.
hana_get_table_statsGet table statisticsARead-onlyIdempotent
Return row count, table type, column-store flag, primary key flag, and disk size (requires MONITORING privilege for disk size) from SYS.TABLES and SYS.M_TABLE_SIZES.
Inputs: table_name (required), schema_name.
hana_health_checkRun HANA health checkARead-onlyIdempotent
Run a read-only diagnostic snapshot against the HANA database: database info, services, memory metrics, top tables by size and blocked-transaction count.
Inputs: schema_name.
hana_list_calculation_viewsList SAP calculation viewsARead-onlyIdempotent
List calculation views from the _SYS_BIC schema (SAP BW/S4 analytical views). Supports prefix filter and pagination.
Inputs: limit, offset, prefix.
hana_list_constraintsList table constraintsARead-onlyIdempotent
List primary key, unique, check, and foreign key constraints for a table (SYS.CONSTRAINTS + SYS.REFERENTIAL_CONSTRAINTS).
Inputs: table_name (required), schema_name, catalog_database.
hana_list_foreign_keysList foreign keys on a tableARead-onlyIdempotent
List referential constraints (foreign keys) showing column, referenced table/column, and delete rule from SYS.REFERENTIAL_CONSTRAINTS.
Inputs: table_name (required), schema_name, catalog_database.
hana_list_functionsList functions in a schemaARead-onlyIdempotent
List scalar and table functions from SYS.FUNCTIONS. Supports prefix filter and pagination.
Inputs: limit, offset, prefix, schema_name.
hana_list_indexesList table indexesARead-onlyIdempotent
List all indexes for a specific table
Inputs: table_name (required), schema_name, catalog_database.
hana_list_privilegesList effective privilegesARead-onlyIdempotent
List effective privileges for a user (or CURRENT_USER if omitted) from SYS.EFFECTIVE_PRIVILEGES. Requires CATALOG READ privilege or querying own privileges.
Inputs: grantee.
hana_list_proceduresList stored procedures in a schemaARead-onlyIdempotent
List stored procedures and their parameter counts from SYS.PROCEDURES.
Inputs: limit, offset, prefix, schema_name.
hana_list_schemasList HANA schemasARead-onlyIdempotent
List schemas in the HANA database with optional prefix filter and pagination (HANA_LIST_DEFAULT_LIMIT / offset).
Inputs: limit, offset, prefix. Returns: items, returned, truncated, nextOffset, +1 more
hana_list_sequencesList sequences in a schemaARead-onlyIdempotent
List sequences from SYS.SEQUENCES, showing start, min, max, increment, cycle, and cache settings.
Inputs: limit, offset, prefix, schema_name.
hana_list_synonymsList synonyms in a schemaARead-onlyIdempotent
List synonyms in a schema from SYS.SYNONYMS, showing target object schema, name, and type.
Inputs: limit, offset, prefix, schema_name.
hana_list_tablesList tables in schemaARead-onlyIdempotent
List tables in a schema with optional name prefix and pagination (HANA_LIST_DEFAULT_LIMIT / offset).
Inputs: limit, offset, prefix, schema_name, +1 more. Returns: items, returned, truncated, nextOffset, +1 more
hana_list_viewsList views in a schemaARead-onlyIdempotent
List views in a schema from SYS.VIEWS. Supports prefix filter and pagination.
Inputs: limit, offset, prefix, schema_name.
hana_memory_monitorMonitor HANA indexserver memoryBRead-onlyIdempotent
Take a memory snapshot of the HANA indexserver and compare usage against allocation limits. Optionally append the result to a CSV history file.
Inputs: output_file, save_history.
hana_query_next_pageContinue paged queryARead-only
Fetch the next page of a truncated SELECT using snapshotId from a previous hana_execute_query result (same SQL and parameters; TTL HANA_QUERY_SNAPSHOT_TTL_MS).
Inputs: offset (required), snapshot_id (required), max_rows. Returns: kind, rows, offset, columns, +9 more
hana_read_kb_caseRead knowledge caseARead-onlyIdempotent
Read the full Markdown content of a local or remote knowledge base case by filename. Available even in offline mode when the license is expired.
Inputs: filename (required).
hana_realtime_performanceRealtime HANA performance snapshotARead-onlyIdempotent
Live performance indicators: open transactions, top SQL plan cache queries by total time and frequency, long connections, column-store delta sizes and blocked transactions.
Inputs: schema_name.
hana_save_knowledge_caseSave knowledge caseA
Save a resolved incident or finding to the local Markdown knowledge base (requires active knowledge-base license feature).
Inputs: title (required), tags, cause, status, +9 more.
hana_search_columnsSearch columns by name patternARead-onlyIdempotent
Find all columns matching a LIKE pattern across all tables (or within a schema). Uses SYS.TABLE_COLUMNS. Results capped at 1000.
Inputs: column_pattern (required), limit, schema_name.
hana_search_knowledge_baseSearch knowledge baseARead-onlyIdempotent
Search the local Markdown knowledge base for previous cases (requires knowledge-base license feature).
Inputs: query (required), limit.
hana_search_tablesSearch tables by name patternARead-onlyIdempotent
Find all tables matching a LIKE pattern across all schemas (or within a specific schema). Uses SYS.TABLES. Results capped at 2000.
Inputs: table_pattern (required), limit, schema_name.
hana_show_configShow HANA configurationBRead-onlyIdempotent
Show the HANA database configuration
Inputs: no named parameters.
hana_show_env_varsShow HANA env varsARead-onlyIdempotent
Show all HANA-related environment variables (for debugging)
Inputs: no named parameters.
hana_show_license_infoShow license infoARead-onlyIdempotent
Show current license status, hardware ID, plan and expiration.
Inputs: no named parameters.
hana_test_connectionTest HANA connectionBRead-onlyIdempotent
Test connection to HANA database
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 44 tools
Most tools are clearly distinct by resource (tables, views, indexes, procedures, etc.) and action (list, describe, search). Minor overlap exists between list_constraints and list_foreign_keys, and describe_table vs explain_table, but descriptions clarify the differences.
All tool names follow a consistent hana_verb_noun pattern using snake_case. Verbs like list, describe, get, search, and execute are used systematically across resource types.
At 44 tools, the server is quite large, exceeding the 'heavy' threshold of 25. While each tool has a narrow purpose, the sheer number may overwhelm an agent, though the broad SAP HANA scope partially justifies the count.
The tool set covers a comprehensive range of HANA metadata exploration, querying, performance monitoring, and even knowledge base management. Read-only operations for tables, views, indexes, constraints, procedures, functions, sequences, privileges, and dependencies are all present, leaving few obvious gaps.
Maintenance
Related MCP Connectors
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Cloud-hosted MCP server for secure AI access to enterprise data sources via CData Connect AI.
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- FlicenseBqualityNot gradedmaintenanceAn MCP server that enables AI assistants to interact with SAP systems via the ABAP Development Tools (ADT) REST API. It allows users to read ABAP source code, inspect DDIC objects, and execute SQL queries directly.66-
- AlicenseAqualityCmaintenanceProduction-ready MCP server that enables AI assistants to seamlessly interact with SAP Datasphere environments for real tenant data discovery, metadata exploration, analytics operations, ETL data extraction, database user management, data lineage analysis, and column-level data profiling.3964 npm136 PyPI50MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server for SAP HANA that enables listing tables, columns, running SQL queries, and looking up SAP table descriptions, all through natural language via AI assistants.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI assistants direct access to SAP HANA performance data — query plans, execution stats, memory usage.MIT