mcp-oceanbase
OfficialThis server enables AI assistants to connect to OceanBase, run SQL, inspect database/cluster status, retrieve performance diagnostics, and search OceanBase documentation.
Configure OceanBase connection details (host, port, user, password, database), defaulting to environment variables when omitted.
Execute SQL statements against the OceanBase server.
Retrieve Active Session History (ASH) reports for performance analysis over a time range.
Get the current time and current tenant name.
List all server nodes (requires sys tenant).
Get resource capacity information (requires sys tenant).
Search OceanBase documentation by keyword to provide contextual reference information.
Enables interaction with GitHub for issue tracking and bug reporting through the 'Open an issue' functionality mentioned in the README.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-oceanbase show me the top 5 customers by total orders"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🌊 Awesome OceanBase MCP
Model Context Protocol (MCP) Server Collection for OceanBase Ecosystem
English | 简体中文
📖 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:
Visit OceanBase Official Repository to get the latest version
Or use OceanBase Online Trial for quick setup
🗂️ 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
💬 Technical Discussion: Visit OceanBase Community Forum to connect with developers and community partners
📧 Technical Support: Get official technical support through the community forum
📖 Documentation Hub: Check OceanBase Official Documentation
🐛 Issue Reporting
If you encounter any issues during usage:
First check the documentation for the corresponding MCP server
Search existing Issues to confirm if the issue is known
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 toolsconfigure_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
Scored across 8 tools
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.
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.
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.
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
Related MCP Connectors
MCP server for Product Management
MCP Server for an Agent Task Marketplace
Related MCP Servers
- AlicenseBqualityAmaintenanceMCP Server for Apache Pinot1477 PyPI18Apache 2.0
- MIT
- AlicenseAqualityDmaintenanceThis MCP server enables database migration between heterogeneous systems (Oracle, PostgreSQL, SQL Server, Netezza to PostgreSQL or SQL Server) through AI assistants by providing tools for command preview, execution, validation, and workflow suggestions.6MIT
- AlicenseAqualityCmaintenanceMCP server for Oracle Linux OS operations, providing tools for package management, kernel, storage, network, and security tasks via dbxcli.20AGPL 3.0