Skip to content

Commit 578239b

Browse files
committed
Adding MySQL Support/Tools [POSTFIX]
Update README with suggested MCP server usage suggestions and additional supported MCP tool. Signed-off-by: Gregory Howe <[email protected]>
1 parent 0e92cfd commit 578239b

File tree

3 files changed

+26
-18
lines changed

3 files changed

+26
-18
lines changed

src/dbtools-mcp-server/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ dbtools-mcp-server.py is a FastMCP-based server that provides various tools for
3535
- HeatWave similarity search and RAG on existing vector stores
3636
- HeatWave AutoML syntax reference helper
3737
- Create HeatWave vector store from objects in Object Store
38+
- [NOTE] MySQL AI is not compatible with DBTools MCP Server
39+
- [NOTE] MySQL MCP Server relies on MySQL connector python and is recommended for new MySQL HeatWave or MySQL AI users
3840

3941
- **Additional Features**
4042
- OCI Object Store list buckets and objects
@@ -145,11 +147,11 @@ python dbtools-mcp-server.py
145147
16. `list_reports(dbtools_connection_display_name)`: Lists all reports for a connection
146148
17. `find_matching_reports(dbtools_connection_display_name, search_text, limit=5)`: Finds similar reports using vector similarity search
147149
18. `ragify_column(dbtools_connection_display_name, table_name, column_names, vector_column_name)`: Creates and populates a vector column for RAG integration
148-
19. `call_nl2ml(dbtools_connection_display_name: string, question: string)`: Ask natural language questions to machine learning help tool to get answers about heatwave ML (AutoML)
149-
20. `ask_ml_rag(dbtools_connection_display_name: string, question: string)`: Ask ml_rag - retrieval augmented generation tool a question. This is the preferred tool for answering questions using vector stores.
150-
21. `call_load_vector_store(dbtools_connection_display_name: string, namespace: string, bucket_name: string, document_prefix: string, schema_name: string, table_name: string)`: Load documents from object storage into a vector store for similarity search and RAG. Path can be file name, prefix, or full path.
151-
22. `call_list_buckets(dbtools_connection_display_name: string, compartment_id: string)`: List all accessible object store buckets
152-
23. `call_list_objects(dbtools_connection_display_name: string, namespace: string, bucket_name: string)`: List objects/files stored in a given object store bucket
150+
19. `heatwave_ask_help(dbtools_connection_display_name: string, question: string)`: Ask natural language questions to machine learning help tool to get answers about heatwave ML (AutoML)
151+
20. `heatwave_ask_ml_rag(dbtools_connection_display_name: string, question: string)`: Ask ml_rag - retrieval augmented generation tool a question. This is the preferred tool for answering questions using vector stores.
152+
21. `heatwave_load_vector_store(dbtools_connection_display_name: string, namespace: string, bucket_name: string, document_prefix: string, schema_name: string, table_name: string)`: Load documents from object storage into a vector store for similarity search and RAG. Path can be file name, prefix, or full path.
153+
22. `object_storage_list_buckets(compartment_id: string)`: List all accessible object store buckets
154+
23. `object_storage_list_objects(namespace: string, bucket_name: string)`: List objects/files stored in a given object store bucket
153155

154156
## Security
155157

src/mysql-mcp-server/README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@ A Python-based MCP (Model Context Protocol) server that provides a suite of tool
44

55
## Overview
66

7-
`mysql_mcp_server.py` is a FastMCP-based server that provides tools for managing MySQL connections, executing SQL, using MySQL AI ML/AI features, and working with OCI Object Storage.
7+
`mysql_mcp_server.py` is a FastMCP-based server that provides tools for managing MySQL connections, executing SQL, using MySQL AI or MySQL HeatWave ML/GenAI features, and working with OCI Object Storage. MySQL MCP Server is the recommended server to get started with MySQL HeatWave or MySQL AI and the only server in this repo that supports MySQL AI.
88

99
## Features
1010

1111
- **Database Connection Management**
1212
- Load connection configs from JSON or environment variables
1313
- List all configured database connections
14-
- Validate connectivity and resolve provider mode (MySQL AI vs. OCI)
14+
- Validate connectivity and resolve provider mode (MySQL AI vs. MySQL HeatWave)
1515

1616
- **Database Operations**
1717
- Execute SQL queries
1818

19-
- **MySQL AI ML and AI Tools**
20-
- `ml_generate`: Text generation with MySQL AI GenAI
19+
- **MySQL AI and MySQL HeatWave ML and GenAI Tools**
20+
- `ml_generate`: Text generation with GenAI
2121
- `ragify_column`: Create/populate vector columns for embeddings
2222
- `ask_ml_rag`: Retrieval-augmented generation from vector stores
23+
- `heatwave_ask_help`: Answers questions about how to use HeatWave ML
2324

2425
- **Vector Store Management**
2526
- List files in `secure_file_priv` (local mode)
@@ -62,14 +63,13 @@ see the [OCI SDK documentation](https://docs.oracle.com/en-us/iaas/Content/API/C
6263
## Required Python Packages
6364

6465
- `oci`
65-
- `requests`
6666
- `fastmcp`
6767
- `mysql-connector-python`
6868

6969
## Supported Database Modes
7070

71-
- **MYSQL_AI** (local MySQL AI AI mode)
72-
- **OCI** (Oracle Cloud Infrastructure-managed databases)
71+
- `MySQL AI`
72+
- `HeatWave`
7373

7474
## MCP Server Configuration
7575

@@ -202,16 +202,17 @@ python mysql_mcp_server.py
202202

203203
1. `list_all_connections()`: List configured database connections and modes
204204
2. `execute_sql_tool_by_connection_id(connection_id, sql, params)`: Execute SQL on a database connection
205-
3. `ml_generate(connection_id, question)`: Generate text via MySQL AI ML
205+
3. `ml_generate(connection_id, question)`: Generate text
206206
4. `ragify_column(connection_id, table, input_col, embedding_col)`: Embed text into a VECTOR column
207207
5. `list_vector_store_files_local(connection_id)`: List available files in `secure_file_priv`
208208
6. `load_vector_store_local(connection_id, file_path)`: Load documents from local filesystem
209209
7. `load_vector_store_oci(connection_id, namespace, bucket, prefix, schema, table)`: Load documents from OCI Object Storage
210210
8. `ask_ml_rag_vector_store(connection_id, question)`: RAG query on default vector store
211211
9. `ask_ml_rag_innodb(connection_id, question, segment_col, embedding_col)`: RAG query restricted to InnoDB tables
212-
10. `list_all_compartments()`: List OCI compartments
213-
11. `object_storage_list_buckets(compartment_name | compartment_id)`: List buckets in a compartment
214-
12. `object_storage_list_objects(namespace, bucket_name)`: List objects in a bucket
212+
10. `heatwave_ask_help(connection_id, question)`: Ask natural language questions about MySQL HeatWave AutoML via NL2ML
213+
11. `list_all_compartments()`: List OCI compartments
214+
12. `object_storage_list_buckets(compartment_name | compartment_id)`: List buckets in a compartment
215+
13. `object_storage_list_objects(namespace, bucket_name)`: List objects in a bucket
215216

216217
## Security
217218

@@ -230,10 +231,10 @@ Here are example prompts you can use to interact with the MCP server, note that
230231
"Add embeddings for 'body' column into 'embedding' column in docs table"
231232
```
232233

233-
### 2. MySQL AI AI
234+
### 2. MySQL AI/MySQL HeatWave
234235

235236
```
236-
"Generate a summary of error logs using MySQL AI ML"
237+
"Generate a summary of error logs"
237238
"Ask ml_rag: Show me refund policy from the vector store"
238239
```
239240

src/mysql-mcp-server/test_mysql_mcp_server.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
Copyright (c) 2025, Oracle and/or its affiliates.
3+
Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
4+
"""
5+
16
import contextlib
27
import importlib.util
38
import json

0 commit comments

Comments
 (0)