Skip to main content
Glama
mcp-oceanbase

mcp-oceanbase

Official
by oceanbase

🌊 Awesome OceanBase MCP

Model Context Protocol (MCP) Server Collection for OceanBase Ecosystem

English | 简体中文

License Python TypeScript

📖 Project Overview

awesome-oceanbase-mcp is a Model Context Protocol (MCP) server repository specifically designed for the OceanBase ecosystem.

🎯 Mission: Enable AI assistants to interact directly with OceanBase databases and ecosystem components through standardized MCP protocols.

✨ Core Values:

  • 🤖 AI-Friendly: Direct database operations within Claude, ChatGPT and other AI assistants

  • 🔒 Secure & Reliable: Provides safe database access and operation mechanisms

  • 🛠️ Complete Ecosystem: Covers the complete OceanBase product and tool chain

  • 🚀 Ready to Use: Simple configuration to get started

Related MCP server: ARC-1

🔍 What is MCP?

The Model Context Protocol (MCP) is an open protocol designed to enable seamless integration between AI applications and external data sources and tools. It provides a standardized way for AI models to access the contextual information and capabilities they need.

🚀 Quick Start

Prerequisites

If you don't have an OceanBase database instance yet, please:

🗂️ MCP Server Collection

This repository provides complete MCP servers for the OceanBase ecosystem:

💡 Usage Tips: Click on the documentation links to view detailed installation and configuration guides.

💬 Community & Support

We highly value community feedback and contributions!

🙋‍♀️ Getting Help

🐛 Issue Reporting

If you encounter any issues during usage:

  1. First check the documentation for the corresponding MCP server

  2. Search existing Issues to confirm if the issue is known

  3. If it's a new issue, please create a new Issue

🤝 Contributing

We welcome all forms of contributions:

  • 🔧 Code Contribution: Submit Pull Requests

  • 📝 Documentation: Improve docs and examples

  • 🐛 Bug Reports: Report bugs and suggest improvements

  • 💡 Feature Requests: Propose new feature requirements

📄 License

This project is released under the Apache License 2.0.


⭐ If this project is helpful to you, please give us a Star!

Made with ❤️ by OceanBase Team

Available Tools

8 tools
configure_db_connectionA
Retrieve OceanBase database connection information.
If no parameters are provided, the configuration is loaded from environment variables.
Otherwise, user-defined connection parameters will be used.

:param host: Database host address. Defaults to environment variable OB_HOST or "localhost".
:param port: Database port number. Defaults to environment variable OB_PORT or "2881".
:param user: Database username. Required. Defaults to user input or environment variable OB_USER.
:param password: Database password. Required. Defaults to user input or environment variable OB_PASSWORD.
:param database: Database name. Required. Defaults to user input or environment variable OB_DATABASE.
:return: A dictionary containing the database connection configuration.
:raises ValueError: Raised if any of the required parameters (user, password, database) are missing.

Inputs: database, host, password, port, +1 more.

execute_sqlC

Execute an SQL on the OceanBase server.

Inputs: sql (required).

get_all_server_nodesA

Get all server nodes from oceanbase. You need to be sys tenant to get all server nodes.

Inputs: no named parameters.

get_current_tenantB

Get the current tenant name from oceanbase.

Inputs: no named parameters.

get_current_timeC

Get current time

Inputs: no named parameters.

get_ob_ash_reportC
Get OceanBase Active Session History report.
ASH can sample the status of all Active Sessions in the system at 1-second intervals, including:
    Current executing SQL ID
    Current wait events (if any)
    Wait time and wait parameters
    The module where the SESSION is located during sampling (PARSE, EXECUTE, PL, etc.)
    SESSION status records, such as SESSION MODULE, ACTION, CLIENT ID
This will be very useful when you perform performance analysis.RetryClaude can make mistakes. Please double-check responses.

Inputs: end_time (required), start_time (required), tenant_id.

get_resource_capacityB

Get resource capacity from oceanbase. You need to be sys tenant to get resource capacity.

Inputs: no named parameters.

search_oceanbase_documentC
This tool is designed to provide context-specific information about OceanBase to a large language model (LLM) to enhance the accuracy and relevance of its responses.
The LLM should automatically extracts relevant search keywords from user queries or LLM's answer for the tool parameter "keyword".
The main functions of this tool include:
1.Information Retrieval: The MCP Tool searches through OceanBase-related documentation using the extracted keywords, locating and extracting the most relevant information.
2.Context Provision: The retrieved information from OceanBase documentation is then fed back to the LLM as contextual reference material. This context is not directly shown to the user but is used to refine and inform the LLM’s responses.
This tool ensures that when the LLM’s internal documentation is insufficient to generate high-quality responses, it dynamically retrieves necessary OceanBase information, thereby maintaining a high level of response accuracy and expertise.

Inputs: keyword (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 8 tools

    Disambiguation4/5

    Most tools have distinct purposes, such as configure_db_connection for setup, execute_sql for queries, and get_ob_ash_report for performance analysis. However, get_current_time and get_current_tenant could be confused as both retrieve basic system information, though their descriptions clarify the difference.

    Naming Consistency4/5

    The tool names follow a consistent verb_noun pattern with underscores, like configure_db_connection and execute_sql. A minor deviation is search_oceanbase_document, which uses 'search' instead of 'get' like other retrieval tools, but overall the naming is predictable and readable.

    Tool Count5/5

    With 8 tools, this server is well-scoped for OceanBase database management. The count is appropriate, covering configuration, query execution, monitoring, and documentation without being overwhelming or too sparse, allowing agents to handle core database tasks effectively.

    Completeness3/5

    The tool set covers key areas like connection setup, SQL execution, and monitoring (e.g., ASH reports, resource capacity), but there are notable gaps. Missing operations include data manipulation (e.g., insert, update, delete), schema management (e.g., create table), and user/tenant administration, which limits full database lifecycle coverage.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers