Hologres MCP Server
About
# Hologres MCP Server Hologres MCP Server serves as a universal interface between AI Agents and Hologres databases. It enables seamless communication between AI Agents and Hologres, helping AI Agents retrieve Hologres database metadata and execute SQL operations. ## Features - **Dual Transport Mode Support**: Run in…
Details
- License
- Apache-2.0
Explore
- Dual Transport Mode Support: Run in either STDIO or SSE mode
- Database Metadata Access: Retrieve schema and table information
- SQL Execution: Execute SQL queries and analyze results
- Statistics Management: Collect and view table statistics
- Query Planning: Get query plans and execution plans
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Hologres MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
- Python 3.10 or higher
- uv for package management
The server is configured through environment variables:
| Variable | Description | Default |
|----------|-------------|---------|
| SERVER_HOST | Host address for SSE mode | 0.0.0.0 |
| SERVER_PORT | Port number for SSE mode | 8001 |
| HOLOGRES_HOST | Hologres database host | localhost |
| HOLOGRES_PORT | Hologres database port | 5432 |
| HOLOGRES_USER | Hologres database username | (required) |
| HOLOGRES_PASSWORD | Hologres database password | (required) |
| HOLOGRES_DATABASE | Hologres database name | (required) |
1. Install the MCP Server package:
pip install hologres-mcp-server
2. Add the following configuration to the MCP client configuration file:
"mcpServers": {
"hologres-mcp-server": {
"command": "uv",
"args": [
"run",
"--with",
"hologres-mcp-server",
"hologres-mcp-server",
"--transport",
"sse" // or "stdio" for STDIO mode
],
"env": {
"HOLOGRES_HOST": "host",
"HOLOGRES_PORT": "port",
"HOLOGRES_USER": "access_id",
"HOLOGRES_PASSWORD": "access_key",
"HOLOGRES_DATABASE": "database",
"SERVER_HOST": "0.0.0.0", // Only needed for SSE mode
"SERVER_PORT": "8001" // Only needed for SSE mode
}
}
}
export HOLOGRES_HOST=your_host
export HOLOGRES_PORT=your_port
export HOLOGRES_USER=your_user
export HOLOGRES_PASSWORD=your_password
export HOLOGRES_DATABASE=your_database
export SERVER_HOST=0.0.0.0
export SERVER_PORT=8001
bash
python examples/test_server.py
```
execute_sql
Execute queries in Hologres
analyze_table
Collect table statistics
get_query_plan
Get query plan
get_execution_plan
Get execution plan
execute_sql: Execute queries in Hologres
analyze_table: Collect table statistics
get_query_plan: Get query plan
get_execution_plan: Get execution plan
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"hologres mcp server": {
"hologres-mcp-server-sse": {
"command": "python",
"args": [
"examples/test_server.py"
]
}
}
}
}
McpServers
{
"hologres-mcp-server-sse": {
"command": "python",
"args": [
"examples/test_server.py"
]
}
}
Hologres MCP Server serves as a universal interface between AI Agents and Hologres databases. It enables seamless communication between AI Agents and Hologres, helping AI Agents retrieve Hologres database metadata and execute SQL operations.
Features
- Dual Transport Mode Support: Run in either STDIO or SSE mode
- Database Metadata Access: Retrieve schema and table information
- SQL Execution: Execute SQL queries and analyze results
- Statistics Management: Collect and view table statistics
- Query Planning: Get query plans and execution plans
Transport Modes
Hologres MCP Server supports two transport modes:
1. STDIO Mode: Uses standard input/output streams for communication. This is the traditional mode used by many MCP servers.
2. SSE Mode (Server-Sent Events): Uses HTTP-based streaming for communication. This mode allows for easier integration with web applications and cloud environments.
By default, the server runs in SSE mode. You can specify the mode using the --transport command-line argument.
Configuration
Environment Variables
The server is configured through environment variables:
| Variable | Description | Default |
|----------|-------------|---------|
| SERVER_HOST | Host address for SSE mode | 0.0.0.0 |
| SERVER_PORT | Port number for SSE mode | 8001 |
| HOLOGRES_HOST | Hologres database host | localhost |
| HOLOGRES_PORT | Hologres database port | 5432 |
| HOLOGRES_USER | Hologres database username | (required) |
| HOLOGRES_PASSWORD | Hologres database password | (required) |
| HOLOGRES_DATABASE | Hologres database name | (required) |
Installation Methods
Method 1: Using Local Repository
1. Clone the repository:
git clone https://github.com/aliyun/alibabacloud-hologres-mcp-server.git
2. Add the following configuration to the MCP client configuration file:
"mcpServers": {
"hologres-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/path/to/alibabacloud-hologres-mcp-server",
"run",
"hologres-mcp-server",
"--transport",
"sse" // or "stdio" for STDIO mode
],
"env": {
"HOLOGRES_HOST": "host",
"HOLOGRES_PORT": "port",
"HOLOGRES_USER": "access_id",
"HOLOGRES_PASSWORD": "access_key",
"HOLOGRES_DATABASE": "database",
"SERVER_HOST": "0.0.0.0", // Only needed for SSE mode
"SERVER_PORT": "8001" // Only needed for SSE mode
}
}
}
Method 2: Using PIP Installation
1. Install the MCP Server package:
pip install hologres-mcp-server
2. Add the following configuration to the MCP client configuration file:
"mcpServers": {
"hologres-mcp-server": {
"command": "uv",
"args": [
"run",
"--with",
"hologres-mcp-server",
"hologres-mcp-server",
"--transport",
"sse" // or "stdio" for STDIO mode
],
"env": {
"HOLOGRES_HOST": "host",
"HOLOGRES_PORT": "port",
"HOLOGRES_USER": "access_id",
"HOLOGRES_PASSWORD": "access_key",
"HOLOGRES_DATABASE": "database",
"SERVER_HOST": "0.0.0.0", // Only needed for SSE mode
"SERVER_PORT": "8001" // Only needed for SSE mode
}
}
}
Running the Server
Running in SSE Mode (Default)
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



