Copy-paste examples for connection profiles and optional business/domain JSON. Authoritative variable names, defaults, and limits are in ENVIRONMENT.md.
- Connection profiles (env JSON)
- Business and domain knowledge (
hana_explain_table) - Query caps and paging (pointer)
Use these key/value sets inside your MCP client’s env object (same shape for Claude Desktop, Claude Code, VS Code, etc.). Adjust host, ports, and credentials for your landscape.
Required: HANA_HOST, HANA_USER, HANA_PASSWORD. Optional: HANA_PORT, HANA_SCHEMA.
{
"HANA_HOST": "hana.company.com",
"HANA_PORT": "443",
"HANA_USER": "DBADMIN",
"HANA_PASSWORD": "password",
"HANA_SCHEMA": "SYSTEM",
"HANA_CONNECTION_TYPE": "single_container"
}Required: HANA_HOST, HANA_PORT, HANA_INSTANCE_NUMBER, HANA_USER, HANA_PASSWORD.
{
"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"
}Required: HANA_HOST, HANA_PORT, HANA_INSTANCE_NUMBER, HANA_DATABASE_NAME, HANA_USER, HANA_PASSWORD.
{
"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"
}| Condition | Inferred type |
|---|---|
HANA_INSTANCE_NUMBER + HANA_DATABASE_NAME |
MDC tenant |
HANA_INSTANCE_NUMBER only |
MDC system |
| Neither | Single-container |
Omit HANA_CONNECTION_TYPE or set it to auto to use the table above.
In code and env vars this is semantics: a curated overlay on HANA’s physical schema (descriptions, status/code maps). Same idea as a data dictionary or small custom knowledge file in JSON—not embeddings or RAG.
The server expects a top-level tables object. HANA_SEMANTICS_PATH (file) wins over HANA_SEMANTICS_URL when both are set.
For schema MySchema and table MY_TABLE, lookup order:
- If
catalog_database(orHANA_METADATA_CATALOG_DATABASE) is set when callinghana_explain_table:Db.MySchema.MY_TABLE, then uppercased variant. MySchema.MY_TABLEMYSCHEMA.MY_TABLE(uppercased)MY_TABLE(table name only)
Prefer SCHEMA.TABLE keys aligned with HANA; use DB.SCHEMA.TABLE when semantics apply to objects in another MDC database.
| Field | Role |
|---|---|
description or meaning |
Exposed as semantics.description in tool output |
values or enum |
Code → label map as semantics.values |
HANA column comments stay in dbComments; semantics add your curated layer.
{
"tables": {
"SAPABAP1.ZSALES_HEADER": {
"description": "Sales order header; one row per order.",
"columns": {
"STATUS": {
"description": "Order lifecycle status.",
"values": {
"N": "New",
"O": "Open",
"F": "Fulfilled",
"C": "Cancelled"
}
},
"DOCTYPE": {
"meaning": "SD document category.",
"enum": { "A": "Inquiry", "B": "Quotation", "C": "Order" }
}
}
},
"SAPABAP1.ZSALES_ITEM": {
"description": "Sales order line items.",
"columns": {
"REJECTION_REASON": {
"description": "Rejection code when line is not fulfilled.",
"values": { "01": "Credit block", "02": "Out of stock", "99": "Other" }
}
}
}
}
}Paths resolve from the server process working directory.
{
"HANA_SEMANTICS_PATH": "/etc/hana-mcp/hana-semantics.json",
"HANA_SEMANTICS_TTL_MS": "120000"
}{
"HANA_SEMANTICS_PATH": "./config/hana-semantics.json"
}Use when HANA_SEMANTICS_PATH is unset. Server GETs the URL; response must be HTTP 2xx JSON.
{
"HANA_SEMANTICS_URL": "https://config.example.com/tenant-prod/hana-semantics.json",
"HANA_SEMANTICS_TTL_MS": "300000"
}Sensitive dictionaries: use HTTPS, network restrictions, or signed URLs. There is no env-based auth header for the semantics URL.
HANA_SEMANTICS_TTL_MS: in-memory TTL for URL and file (when TTL > 0).0: URL refetched as needed; file still reloads on mtime change.- Restart MCP after changing semantics env vars.
Relevant variables: HANA_MAX_RESULT_ROWS, HANA_MAX_RESULT_COLS, HANA_MAX_CELL_CHARS, HANA_QUERY_DEFAULT_OFFSET, HANA_QUERY_SNAPSHOT_TTL_MS. Tools: hana_execute_query (offset, maxRows, includeTotal), hana_query_next_page when a snapshot id is returned.
Defaults, bounds, and behavior: ENVIRONMENT.md §3 Query limits and §6 Snapshots.