This MCP server is not intended for production use but as a proof of concept for exploring models using MCP Servers.
Overview
The DBTools MCP Server bridges the Model Context Protocol with Oracle Cloud Infrastructure’s Database Tools service, enabling:- Database operations through OCI DBTools connections
- Autonomous Database management
- HeatWave ML and RAG capabilities
- Report management with vector similarity search
- OCI Object Storage integration
When to Use This Server
Use DBTools MCP Server if:- You have existing OCI Database Tools connections configured
- You need to manage Autonomous Databases via OCI
- You’re exploring legacy HeatWave ML features
- MySQL MCP Server: For MySQL HeatWave or MySQL AI (recommended for new projects)
- Oracle DB MCP Toolkit: For Oracle Database with custom tools and production deployment
Features
Compartment Management
- list_all_compartments: List all compartments in tenancy
- get_compartment_by_name_tool: Get compartment details by name
Database Operations
- list_autonomous_databases: List databases in specific compartments
- list_all_databases: List all databases across tenancy
- execute_sql_tool: Execute SQL scripts on database connections
- get_table_info: Retrieve table information (Oracle and MySQL)
- list_tables: List all tables in a database
Database Tools Connection Management
- list_dbtools_connection_tool: List connections in a compartment
- list_all_connections: List all database connections
- get_dbtools_connection_by_name_tool: Get connection details by name
Report Management
- bootstrap_reports: Ensure report_definitions table exists
- create_report: Create new report definition with SQL
- execute_report: Execute report with bind values
- get_report: Retrieve report definition
- delete_report: Delete report definition
- list_reports: List all reports for a connection
- find_matching_reports: Vector similarity search for reports
- ragify_column: Create and populate vector columns for RAG
HeatWave ML and AI Tools
- heatwave_ask_help: Ask questions about HeatWave ML (AutoML)
- heatwave_ask_ml_rag: Retrieval-augmented generation on vector stores
- heatwave_load_vector_store: Load documents from Object Storage into vector stores
Object Storage
- object_storage_list_buckets: List accessible buckets
- object_storage_list_objects: List objects in a bucket
Prerequisites
- Python 3.x
- OCI SDK (installed via requirements.txt)
- FastMCP (installed via requirements.txt)
- Valid OCI configuration file (
~/.oci/config) with credentials
Installation
- Clone the repository
- Install dependencies:
- Configure OCI credentials at
~/.oci/config
Configuration
MCP Client Configuration (Claude Desktop)
Windows:Environment Variables
| Variable | Description | Default |
|---|---|---|
PROFILE_NAME | OCI configuration profile name | DEFAULT |
TENANCY_ID_OVERRIDE | Override tenancy ID from config | None |
MODEL_NAME | Embedding model name | MINILM_L12_V2 |
MODEL_EMBEDDING_DIMENSION | Vector embedding dimension | 384 |
The
MODEL_NAME may need to be prefixed with the database schema (e.g., ADMIN.MINILM_L12_V2) depending on your database user.Supported Database Types
- Oracle Database (including Autonomous Database)
- MySQL (including HeatWave)
Usage Examples
Database Administration
Creating and Managing Tables
Querying Data
HeatWave ML Tools
Compartment Management
Object Storage
Replace placeholder names (like “HR database”, “production compartment”) with your actual Database Tools connection names and compartment names.
Complete Tool Reference
| Tool | Parameters | Description |
|---|---|---|
list_all_compartments | None | Lists all compartments in tenancy |
get_compartment_by_name_tool | name | Get compartment details by name |
list_autonomous_databases | compartment_name | List databases in compartment |
list_all_databases | None | List all databases in tenancy |
list_dbtools_connection_tool | compartment_name | List DBTools connections |
list_all_connections | None | List all database connections |
get_dbtools_connection_by_name_tool | display_name | Get connection by name |
execute_sql_tool | dbtools_connection_display_name, sql_script | Execute SQL |
get_table_info | dbtools_connection_display_name, table_name | Get table info |
list_tables | dbtools_connection_display_name | List all tables |
bootstrap_reports | dbtools_connection_display_name | Create report_definitions table |
create_report | dbtools_connection_display_name, name, sql_query, description, bind_parameters | Create report |
execute_report | dbtools_connection_display_name, report_name, bind_values | Execute report |
get_report | dbtools_connection_display_name, report_name | Get report definition |
delete_report | dbtools_connection_display_name, report_name | Delete report |
list_reports | dbtools_connection_display_name | List all reports |
find_matching_reports | dbtools_connection_display_name, search_text, limit | Vector similarity search |
ragify_column | dbtools_connection_display_name, table_name, column_names, vector_column_name | Create vector embeddings |
heatwave_ask_help | dbtools_connection_display_name, question | Ask about HeatWave ML |
heatwave_ask_ml_rag | dbtools_connection_display_name, question | RAG query on vector stores |
heatwave_load_vector_store | dbtools_connection_display_name, namespace, bucket_name, document_prefix, schema_name, table_name | Load documents from Object Storage |
object_storage_list_buckets | compartment_id | List Object Storage buckets |
object_storage_list_objects | namespace, bucket_name | List objects in bucket |
Report Management with Vector Search
The DBTools MCP Server includes a unique report management system with vector similarity search:1. Bootstrap Reports
Create the report_definitions table:2. Create Reports
Define reusable SQL queries:3. Execute Reports
Run saved reports with optional parameters:4. Find Similar Reports
Use vector similarity search to find related reports:5. Create Vector Embeddings
Generate embeddings for text columns:Migration Guide
From DBTools MCP Server to MySQL MCP Server
If you’re using DBTools for MySQL HeatWave: Old (DBTools):From DBTools MCP Server to Oracle DB Toolkit
If you need custom tools or production deployment for Oracle Database: Benefits:- YAML-based custom tool framework
- HTTP deployment with OAuth2
- No OCI dependency for core features
- Better performance analysis tools
Security
The server uses OCI’s built-in authentication:- OCI config file-based authentication: Uses
~/.oci/config - Signer-based authentication: For specific endpoints
- IAM policies: Controlled by OCI IAM
Limitations
Troubleshooting
OCI Configuration Errors
Symptom: “Could not load OCI config” Solutions:- Verify
~/.oci/configexists - Check API key file path and permissions
- Ensure tenancy, user, and fingerprint are correct
Connection Not Found
Symptom: “No connection found with name ‘X’” Solutions:- List all connections:
"Show me all database connections" - Check connection name spelling
- Verify connection exists in OCI Database Tools
HeatWave ML Errors
Symptom: HeatWave tools not working Solutions:- Ensure you’re using HeatWave (not MySQL AI)
- Verify HeatWave cluster is active
- Check
MODEL_NAMEenvironment variable - For MySQL AI, use MySQL MCP Server
Next Steps
MySQL MCP Server
Recommended for new MySQL projects
Oracle DB Toolkit
For Oracle Database with custom tools
Database Servers
Compare all database servers
OCI Configuration
Set up OCI credentials
