Skip to content

Commit de9f16d

Browse files
authored
Merge pull request #6 from aliyun/release_0_1_7
Updated version to 0.1.7, fixed several bugs in Python 3.11
2 parents 9a19f03 + 396ccfe commit de9f16d

File tree

7 files changed

+637
-227
lines changed

7 files changed

+637
-227
lines changed

.DS_Store

6 KB
Binary file not shown.

README.md

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
# Hologres MCP Server
2+
23
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.
34

45
## Configuration
6+
57
### Mode 1: Using Local File
8+
69
#### Download
10+
711
Download from Github
12+
813
```shell
914
git clone https://github.com/aliyun/alibabacloud-hologres-mcp-server.git
1015
```
16+
1117
#### MCP Integration
18+
1219
Add the following configuration to the MCP client configuration file:
20+
1321
```json
1422
"mcpServers": {
1523
"hologres-mcp-server": {
@@ -32,16 +40,21 @@ Add the following configuration to the MCP client configuration file:
3240
```
3341

3442
### Mode 2: Using PIP Mode
43+
3544
#### Installation
45+
3646
Install MCP Server using the following package:
47+
3748
```bash
3849
pip install hologres-mcp-server
3950
```
4051

4152
#### MCP Integration
53+
4254
Add the following configuration to the MCP client configuration file:
55+
4356
```json
44-
"mcpServers": {
57+
"mcpServers": {
4558
"hologres-mcp-server": {
4659
"command": "uv",
4760
"args": [
@@ -62,33 +75,38 @@ Add the following configuration to the MCP client configuration file:
6275
```
6376

6477
## Components
65-
### Tools
66-
* `execute_sql`: Execute queries in Hologres
6778

68-
* `analyze_table`: Collect table statistics
79+
### Tools
6980

81+
* `execute_select_sql`: Execute a SELECT SQL query on the Hologres server
82+
* `execute_dml_sql`: Execute a DML (INSERT, UPDATE, DELETE) SQL query on the Hologres server
83+
* `execute_ddl_sql`: Execute a DDL (CREATE, ALTER, DROP) SQL query on the Hologres server
84+
* `gather_table_statistics`: Collect table statistics
7085
* `get_query_plan`: Get query plan
71-
7286
* `get_execution_plan`: Get execution plan
7387

7488
### Resources
89+
7590
#### Built-in Resources
91+
7692
* `hologres:///schemas`: Get all schemas in the database
7793

7894
#### Resource Templates
79-
* `hologres:///{schema}/tables`: List all tables in a schema
8095

96+
* `hologres:///{schema}/tables`: List all tables in a schema
97+
* `hologres:///{schema}/{table}/partitions`: List all partitions of a partitioned table
8198
* `hologres:///{schema}/{table}/ddl`: Get table DDL
82-
8399
* `hologres:///{schema}/{table}/statistic`: Show collected table statistics
84-
85-
* `system:///{+system_path}`:
100+
* `system:///{+system_path}`:
86101
System paths include:
102+
87103
* missing_stats_tables - Shows the tables that are missing statistics.
88104
* stat_activity - Shows the information of current running queries.
89105
* query_log/latest/ - Get recent query log history with specified number of rows.
90106
* query_log/user// - Get query log history for a specific user with row limits.
91107
* query_log/application// - Get query log history for a specific application with row limits.
108+
* query_log/failed/\<interval>\/ - Get failed query log history with interval and specified number of rows.
92109

93110
### Prompts
94-
None at this time
111+
112+
None at this time

RELEASE_NOTES.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,39 @@
11
# Release Notes
2+
3+
## Version 0.1.7
4+
5+
### Bugfix
6+
7+
Fix some bugs when using in Python 3.11.
8+
9+
## Version 0.1.6
10+
11+
### Enhancement
12+
13+
update psycopg2 to psycopg3.
14+
15+
select, dml, ddl use different tools to execute.
16+
17+
## Version 0.1.5
18+
19+
### Enhancement
20+
21+
Now compatible with Python 3.10 and newer (previously required 3.13+).
22+
223
## Version 0.1.4
24+
325
### Enhancement
4-
The URI of the resource template has been refactored to enable the large language model (LLM) to use it more concisely.
526

27+
The URI of the resource template has been refactored to enable the large language model (LLM) to use it more concisely.
628

729
## Version 0.1.2 (Initial Release)
30+
831
### Description
32+
933
Hologres MCP Server serves as a universal interface between AI Agents and Hologres databases. It enables rapid implementation of seamless communication between AI Agents and Hologres, helping AI Agents retrieve Hologres database metadata and execute SQL for various operations.
1034

1135
### Key Features
36+
1237
- **SQL Execution**
1338
- Execute SQL in Hologres, including DDL, DML, and Queries
1439
- Execute ANALYZE commands to collect statistics
@@ -22,27 +47,34 @@ Hologres MCP Server serves as a universal interface between AI Agents and Hologr
2247
- Query missing statistics
2348

2449
### Dependencies
25-
- Python 3.13 or higher
50+
51+
- Python 3.10 or higher
2652
- Required packages
2753
- mcp >= 1.4.0
2854
- psycopg2 >= 2.9.5
2955

3056
### Configuration
57+
3158
MCP Server requires the following environment variables to connect to Hologres instance:
59+
3260
- `HOLOGRES_HOST`
3361
- `HOLOGRES_PORT`
3462
- `HOLOGRES_USER`
3563
- `HOLOGRES_PASSWORD`
3664
- `HOLOGRES_DATABASE`
3765

3866
### Installation
67+
3968
Install MCP Server using the following package:
69+
4070
```bash
4171
pip install hologres-mcp-server
4272
```
4373

4474
### MCP Integration
75+
4576
Add the following configuration to the MCP client configuration file:
77+
4678
```json
4779
"mcpServers": {
4880
"hologres-mcp-server": {

pyproject.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
[project]
22
name = "hologres-mcp-server"
3-
version = "0.1.4"
3+
version = "0.1.7"
44
description = "A MCP Server for Hologres"
55
readme = "README.md"
6-
requires-python = ">=3.13"
6+
requires-python = ">=3.10"
77
dependencies = [
88
"httpx>=0.28.1",
99
"mcp>=1.4.1",
1010
"python-dotenv>=1.0.1",
11-
"psycopg2>=2.9.5",
11+
"psycopg>=3.1.0",
12+
"psycopg-binary>=3.1.0",
13+
"pglast>=7.5",
1214
]
1315
[[project.authors]]
1416
name = "TimothyDing"

0 commit comments

Comments
 (0)