Back to MCP Catalog

OceanBase Database MCP Server

DatabasesPython
Interact with OceanBase database, OCP, and OBCloud through secure MCP servers

The OceanBase MCP provides secure interaction capabilities with OceanBase databases, OceanBase Cloud Platform (OCP), and OBCloud services. It enables AI assistants to perform database operations, manage cloud resources, and execute administrative tasks through a standardized protocol interface. This MCP server collection offers specialized tools for different aspects of the OceanBase ecosystem, allowing for seamless integration with AI workflows while maintaining security and control over database operations.

Overview

The OceanBase MCP Server provides a secure interface for AI assistants to interact with OceanBase databases and related tools. This MCP includes three distinct servers:

  1. OceanBase MCP Server: For direct interaction with OceanBase databases
  2. OCP MCP Server: For managing OceanBase through the OceanBase Cloud Platform (OCP)
  3. OBCloud MCP Server: For interacting with OceanBase cloud services

Installation

To install and run the OceanBase MCP Server:

  1. Clone the repository:

    git clone https://github.com/oceanbase/mcp-oceanbase.git
    cd mcp-oceanbase
    
  2. Set up a Python environment (Python 3.8+ recommended):

    # Using uv (recommended)
    uv venv
    source .venv/bin/activate
    uv pip install -e .
    
    # Or using pip
    pip install -r requirements.txt
    
  3. Configure environment variables:

    • Copy .env.template to .env
    • Edit the .env file to include your database connection details
  4. Run the desired MCP server:

    # For OceanBase MCP Server
    python -m src.oceanbase_mcp_server.server
    
    # For OCP MCP Server
    python -m src.ocp_mcp_server.server
    
    # For OBCloud MCP Server
    python -m src.obcloud_mcp_server.server
    

Configuration

Each MCP server requires specific configuration:

OceanBase MCP Server

Configure database connection details in your .env file:

OCEANBASE_HOST=your_host
OCEANBASE_PORT=your_port
OCEANBASE_USER=your_username
OCEANBASE_PASSWORD=your_password
OCEANBASE_DATABASE=your_database

OCP MCP Server

Configure OCP connection details:

OCP_HOST=your_ocp_host
OCP_PORT=your_ocp_port
OCP_USER=your_ocp_username
OCP_PASSWORD=your_ocp_password

OBCloud MCP Server

Configure OBCloud connection details:

OBCLOUD_API_KEY=your_api_key
OBCLOUD_ENDPOINT=your_endpoint

Usage

Once the MCP server is running, AI assistants can interact with OceanBase databases and tools through the Model Context Protocol. The server provides a secure interface for executing database queries, managing database resources, and performing administrative tasks.

For detailed documentation on each server's capabilities:

Troubleshooting

If you encounter issues:

  1. Check your connection details in the .env file
  2. Ensure you have the necessary permissions to access the databases
  3. Verify that the required ports are open and accessible
  4. Check the server logs for specific error messages

For additional help, you can:

Related MCPs

Milvus Vector Database
DatabasesPython

Connect to Milvus vector database for semantic search and vector operations

MotherDuck DuckDB
DatabasesPython

SQL analytics with DuckDB and MotherDuck for AI assistants

Alibaba Cloud Tablestore
DatabasesJava, Python

Connect to Alibaba Cloud Tablestore for vector search and RAG applications

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.