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 ClickHouse
Enables AI assistants to run read‑only ClickHouse queries, list databases and tables, and execute embedded chDB queries through an MCP interface.
by chroma-core
Offers an MCP server exposing Chroma's vector database capabilities for LLM applications, supporting collection and document management, multiple embedding functions, and flexible client types such as in‑memory, persistent, HTTP, and cloud.
by kiliczsh
Enables LLMs to interact with MongoDB databases via a standardized interface, offering schema inspection, query execution, aggregation, and write capabilities, with optional read‑only mode and smart ObjectId handling.
by domdomegg
Provides read and write access to Airtable bases for AI systems, enabling inspection of schemas and manipulation of records.
by XGenerationLab
A Model Context Protocol (MCP) server that enables natural language queries to databases