OceanBase MCP Server

by yuanoOo

3 stars
316 downloads
Not rated
GitHub

About

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.

Details

Author
yuanoOo
GitHub stars
3
Downloads
316
Categories
Database, Other

- List available OceanBase tables as resources
- Read table contents
- Execute SQL queries with proper error handling
- Secure database access through environment variables
- Comprehensive logging

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name OceanBase MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via pip install oceanbase-mcp-server, set environment variables (OB_HOST, OB_PORT (defaults to 2881), OB_USER, OB_PASSWORD, OB_DATABASE), then either configure in Claude Desktop's claude_desktop_config.json or run standalone with python -m oceanbase_mcp_server.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "oceanbase mcp server": {
            "oceanbase_mcp_server": {
                "command": "python",
                "args": [
                    "-m",
                    "oceanbase_mcp_server"
                ]
            }
        }
    }
}

McpServers

{
    "oceanbase_mcp_server": {
        "command": "python",
        "args": [
            "-m",
            "oceanbase_mcp_server"
        ]
    }
}

Interact with OceanBase databases, allowing AI assistants to list tables, read data, and execute SQL queries securely.

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.

- List available OceanBase tables as resources
- Read table contents
- Execute SQL queries with proper error handling
- Secure database access through environment variables
- Comprehensive logging

Set the following environment variables:

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

Add this to yourclaude_desktop_config.json:

{ "mcpServers": { "oceanbase": { "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_PASSWORD": "your_password", "OB_DATABASE": "your_database" } } } }
# Install dependencies pip install -r requirements.txt # Run the server python -m oceanbase_mcp_server
# Clone the repository git clone https://github.com/yourusername/oceanbase_mcp_server.git cd oceanbase_mcp_server # Create virtual environment python -m venv venv source venv/bin/activate # or venv\Scripts\activate on Windows # Install development dependencies pip install -r requirements-dev.txt # Run tests pytest

- Never commit environment variables or credentials
- Use a database user with minimal required permissions
- Consider implementing query whitelisting for production use
- Monitor and log all database operations

This MCP server requires database access to function. For security:
- Create a dedicated OceanBase userwith minimal permissions
- Never use root credentialsor administrative accounts
- Restrict database accessto only necessary operations
- Enable loggingfor audit purposes
- Regular security reviewsof database access

SeeOceanBase Security Configuration Guidefor detailed instructions on:

- Creating a restricted OceanBase user
- Setting appropriate permissions
- Monitoring database access
- Security best practices

⚠️ IMPORTANT: Always follow the principle of least privilege when configuring database access.

Apache License - see LICENSE file for details.
- Fork the repository
- Create your feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -m 'Add some amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request

Multi-database agent access (PostgreSQL, SQLite, MySQL, Oracle, SQL Server) with batch queries, pre-configured connections, and SQLGlot-enforced read-only safety

MCP servers that give AI clients safe, structured access to SQL databases. One installable package per database engine. Every package exposes the same minimal two-tool surface, execute_sql and search_objects, with guardrails on by default: read-only mode, row caps, and statement timeouts.

Guardrails for natural-language database queries.

Provides read-only access to Apache Iceberg tables via Apache Impala, allowing LLMs to inspect schemas and execute queries.

MCP server that gives AI agents deep understanding of contemporary or legacy relational databases.

A bridge for AI assistants to directly query and explore Microsoft SQL Server databases.

Production safe MCP server that gives AI agents direct access to MySQL databases.

MCP server for MySQL/MariaDB — schema inspection, queries, and data manipulation for AI assistants

Provides AI agents with direct access to query, search, and analyze MySQL databases.

A read-only MySQL database server for LLMs to inspect schemas and execute queries.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.