HANAPerformanceMCP
An MCP server that gives AI assistants direct access to SAP HANA performance data — query plans, execution stats, memory usage.
README
[!NOTE] This is a read-only mirror. Original repo and development: git.epod.dev/erhan/HANAPerformanceMCP
SAP HANA Performance MCP Server
An MCP server that gives AI assistants direct access to SAP HANA performance data — query plans, execution stats, memory usage.
Built on the Model Context Protocol with hdbcli.
Tools
| Tool | What it does |
|---|---|
analyze_query |
Captures compile-time and runtime query plans, flags bottlenecks |
download_planviz |
Exports query plan data as JSON for offline review |
get_expensive_statements |
Top resource-heavy queries from M_EXPENSIVE_STATEMENTS |
get_plan_cache |
Cached execution plans from M_SQL_PLAN_CACHE |
get_table_statistics |
Table and column-level stats for a schema/table |
get_memory_stats |
Host and per-service memory usage |
get_active_sessions |
Active connections and running statements |
Prerequisites
- Python 3.11+
- A running SAP HANA instance
- A database user with
MONITORINGrole (or at minimum, SELECT onSYS.M_*views)
Setup
Clone the repo and install dependencies with uv:
git clone https://git.epod.dev/erhan/HANAPerformanceMCP.git
cd HANAPerformanceMCP
uv sync
Copy the example env file and fill in your HANA connection details:
cp .env.example .env
HANA_HOST=your-hana-host
HANA_PORT=30015
HANA_USER=DBADMIN
HANA_PASSWORD=your-password
HANA_ENCRYPT=true
HANA_SSLVALIDATECERTIFICATE=false
# Optional — set this to connect to a tenant database instead of the system DB
HANA_DATABASE_NAME=CCQ
Running
Start the server directly:
uv run hana-performance-mcp
Or configure it in your MCP client. Example for Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"hana-performance": {
"command": "uv",
"args": [
"--directory", "/path/to/HANAPerformanceMCP",
"run", "hana-performance-mcp"
],
"env": {
"HANA_HOST": "your-hana-host",
"HANA_PORT": "30015",
"HANA_USER": "DBADMIN",
"HANA_PASSWORD": "your-password",
"HANA_ENCRYPT": "true",
"HANA_SSLVALIDATECERTIFICATE": "false",
"HANA_DATABASE_NAME": "your-tenant-db"
}
}
}
}
For Claude Code, add the same config under mcpServers in .claude/settings.json.
How It Works
The server connects to HANA through a thread-safe connection pool (3 connections by default). Each tool runs read-only queries against system views.
analyze_query runs EXPLAIN PLAN for the compile-time plan, then optionally executes the query and pulls runtime stats from M_EXPENSIVE_STATEMENTS. It checks for full table scans, inefficient joins, memory hotspots, engine mismatches, and cost outliers.
Only SELECT/WITH statements are allowed. Row limits are enforced (max 10,000).
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.