OceanBase MCP Server is an MCP server that enables AI assistants to securely connect to and interact with OceanBase relational databases. It connects directly to an OceanBase instance over standard network connections, allowing developers, data analysts, and database administrators to inspect database structures and retrieve records via AI interfaces. The server exposes tables as MCP resources and provides tools to execute SQL statements directly with built-in error handling and comprehensive logging. By interacting through Model Context Protocol clients, users can explore relational schemas, query data sets, and troubleshoot database state without manually writing connection scripts or switching to an external SQL client. Database connection parameters are managed via environment variables, ensuring that credentials such as database host, port, username, and password remain separated from prompt context. This structured interface helps teams perform safe database discovery and ad-hoc data analysis using natural language prompts directed through supported MCP clients.
Category: Databases & Data Stores
Tags: database, oceanbase, relational, SQL
bash pip install oceanbase-mcp-server 2. Open your client configuration file, such as claude_desktop_config.json. 3. Add oceanbase under the mcpServers object using uv to execute the server, providing your database connection variables: 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" } } } } 4. Restart Claude Desktop or run the standalone server using python -m oceanbase_mcp_server.Part of MCP Servers
You can install the server via pip by running pip install oceanbase-mcp-server. For local source development, clone the repository from GitHub, install dependencies with pip install -r requirements.txt, and start it with python -m oceanbase_mcp_server.
The server allows AI assistants to discover and list OceanBase tables as resources, read the contents of those tables, and execute arbitrary SQL queries against the database with built-in error reporting and logging.
It works with any client implementing the Model Context Protocol, including Claude Desktop. The project documentation provides specific JSON configuration snippets for Claude Desktop using the uv command runner.
Yes, OceanBase MCP Server is open source. According to the project repository documentation, it is distributed under the Apache License.
The server requires OB_HOST, OB_USER, OB_PASSWORD, and OB_DATABASE. You can also optionally configure OB_PORT, which defaults to port 2881 if omitted.