OceanBase

A Model Context Protocol (MCP) server that enables secure interaction with OceanBase databases. This server allows AI assistants to list tables, read data, and execute SQL queries through a controlled interface, making database exploration and analysis safer and more structured.
  • python

3

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "yuanooo-oceanbase_mcp_server": {
      "command": "uv",
      "args": [
        "--directory",
        "path/to/oceanbase_mcp_server",
        "run",
        "oceanbase_mcp_server"
      ],
      "env": {
        "OB_HOST": "localhost",
        "OB_PORT": "2881",
        "OB_USER": "your_username",
        "OB_DATABASE": "your_database",
        "OB_PASSWORD": "your_password"
      }
    }
  }
}

OceanBase MCP Server provides a secure, structured way to interact with OceanBase databases through a Model Context Protocol interface. You can list tables, read data, and run SQL queries in a controlled environment, making database exploration safer and easier for AI-assisted workflows.

How to use

You interact with the OceanBase MCP Server through an MCP client. Start the server locally or integrate it with your MCP-enabled tool suite, then point the client at the server using the provided commands. You can list available OceanBase tables as resources, read table contents, and execute SQL queries while benefiting from built-in error handling and logging. Ensure you configure access with the required environment variables so the server can connect to your OceanBase instance securely.

How to install

Prerequisites: Python and pip must be available on your system.

pip install oceanbase-mcp-server

Additional configuration and usage notes

Configure the MCP server with environment variables to securely connect to your OceanBase database.

OB_HOST=localhost     # Database host
OB_PORT=2881         # Optional: Database port (defaults to 2881 if not specified)
OB_USER=your_username
OB_PASSWORD=your_password
OB_DATABASE=your_database

Starting the server standalone

You can run the MCP server directly after installing dependencies.

# Install dependencies
pip install -r requirements.txt

# Run the server
python -m oceanbase_mcp_server

Available tools

list_tables

Lists available OceanBase tables as resources for exploration.

read_table

Reads and returns rows from a specified OceanBase table.

execute_sql

Executes a SQL query against the OceanBase database with proper error handling.

secure_access

Secures database access by enforcing environment-based credentials and least-privilege permissions.

logging

Provides comprehensive logging of operations for auditing and debugging.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational