This MCP server is not intended for production use but as a proof of concept for exploring models using MCP Servers. MySQL MCP Server is the recommended server to get started with MySQL HeatWave or MySQL AI and the only server in this repository that supports MySQL AI.
Features
Database Connection Management
- Load connection configs from JSON or environment variables
- List all configured database connections
- Validate connectivity and resolve provider mode (MySQL AI vs. MySQL HeatWave)
Database Operations
- Execute SQL queries with parameterized statements
- Support for multiple connection configurations
MySQL AI and HeatWave ML/GenAI
- Text Generation: Generate text using GenAI models
- Vector Embeddings: Create and populate vector columns for semantic search
- RAG (Retrieval-Augmented Generation): Query vector stores with natural language
- NL2SQL: Convert natural language questions into SQL queries and execute automatically
- HeatWave Help: Get answers about using HeatWave ML features
Vector Store Management
- List files in
secure_file_privdirectory (local mode) - Load documents into vector stores from local filesystem
- Load documents from OCI Object Storage into vector stores
OCI Object Storage Tools
- List all compartments in your tenancy
- Get compartment by name
- List buckets in a compartment
- List objects in a bucket
MySQL AI vs MySQL HeatWave
The server automatically detects which MySQL provider you’re connected to:MySQL AI
- Cloud-native MySQL service with integrated AI capabilities
- Runs on MySQL Database Service instances
- Vector processing happens within the database service
- Supports local filesystem for document loading
- Works without OCI config for pure database operations
MySQL HeatWave
- In-memory analytics engine on Oracle Cloud Infrastructure
- Distributed cluster architecture for high performance
- Vector operations executed on HeatWave cluster
- Integrates with OCI Object Storage for document loading
- Requires OCI config for cloud features
Many tools work with both MySQL AI and HeatWave, but some are platform-specific. The server provides clear error messages when a tool is used with an unsupported connection type.
Prerequisites
- Python 3.8+ with
uvpackage manager - Database connection file: JSON file with connection details
- Path from
MYSQL_MCP_CONFIGenvironment variable (absolute or relative) - Or
local_config.json(default)
- Path from
- OCI configuration file (
~/.oci/config) - only required for OCI Object Storage features
Quick Start
- Create a connection configuration file (see Configuration)
- Install dependencies and run:
- Configure in your MCP client (e.g., Claude Desktop):
Example Use Cases
Database Operations
ML and GenAI
Object Storage
Vector Store
Next Steps
Configuration
Set up database connections and OCI config
API Tools
Explore all available tools and their parameters
Vector Stores
Load documents and perform RAG queries
ML & GenAI
Use text generation, NL2SQL, and embeddings
