by yuanoOo
Provides a secure interface for AI assistants to list tables, read data, and execute SQL queries on OceanBase databases via the Model Context Protocol.
Enables AI assistants to interact with OceanBase databases in a controlled manner, allowing operations such as listing tables, reading table contents, and executing arbitrary SQL queries while enforcing security and logging.
pip install oceanbase-mcp-server or install development dependencies via pip install -r requirements.txt.OB_HOST, OB_PORT (optional, defaults to 2881), OB_USER, OB_PASSWORD, and OB_DATABASE.python -m oceanbase_mcp_server. For Claude Desktop, configure claude_desktop_config.json to invoke the server using the uv command as shown in the README.Q: Do I need a special database user? A: Yes, create a dedicated OceanBase user with only the permissions required for the intended operations (e.g., SELECT, limited UPDATE).
Q: How are credentials protected? A: Credentials are supplied via environment variables and never stored in the code repository.
Q: Can I limit which queries are allowed? A: The server can be extended with query whitelisting or custom validation logic before execution.
Q: What logging is provided? A: All database interactions, including query text and execution outcome, are logged to aid auditing and debugging.
Q: Is there a Docker image? A: The repository does not include an official Docker image, but the server can be containerized using a standard Python base image.
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.
pip install oceanbase-mcp-server
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 your claude_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
This MCP server requires database access to function. For security:
See OceanBase Security Configuration Guide for detailed instructions on:
⚠️ IMPORTANT: Always follow the principle of least privilege when configuring database access.
Apache License - see LICENSE file for details.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by googleapis
An MCP server that streamlines database tool development by handling connection pooling, authentication, observability, and secure access, allowing agents to interact with databases via natural language.
by bytebase
Provides a universal gateway that lets MCP‑compatible clients explore and query MySQL, PostgreSQL, SQL Server, MariaDB, and SQLite databases through a single standardized interface.
by designcomputer
Enables secure interaction with MySQL databases via the Model Context Protocol, allowing AI applications to list tables, read contents, and execute queries safely.
by benborla
Provides read‑only access to MySQL databases for large language models, allowing schema inspection and safe execution of SQL queries.
by neo4j-contrib
Enables natural‑language interaction with Neo4j databases, allowing large language models to query, modify, and manage graph data through multiple transport modes.
by mongodb-js
Provides a Model Context Protocol server that enables interaction with MongoDB databases and MongoDB Atlas clusters through a unified API.
by ClickHouse
Enables AI assistants to run read‑only ClickHouse queries, list databases and tables, and execute embedded chDB queries through an MCP interface.
by neondatabase
Interact with Neon Postgres databases using natural language commands through the Model Context Protocol, enabling conversational database creation, migration, and query execution.
by motherduckdb
Enables SQL analytics on DuckDB and MotherDuck databases via a Model Context Protocol server, allowing AI assistants and IDEs to query data directly.