A Model Context Protocol (MCP) server that enables secure interaction with OceanBase databases.
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.
git clone https://github.com/oceanbase/mcp-oceanbase.git
cd mcp-oceanbase
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate # or `.venv\Scripts\activate` on Windows
cp .env.template .env
export UV_DEFAULT_INDEX="https://mirrors.aliyun.com/pypi/simple/"
uv pip install .
There are two ways to configure the connection information of OceanBase
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 the following content to the configuration file that supports the MCP server client:
{
"mcpServers": {
"oceanbase": {
"command": "uv",
"args": [
"--directory",
"path/to/mcp-oceanbase",
"run",
"oceanbase_mcp_server"
],
"env": {
"OB_HOST": "localhost",
"OB_PORT": "2881",
"OB_USER": "your_username",
"OB_PASSWORD": "your_password",
"OB_DATABASE": "your_database"
}
}
}
}
Within the mcp-oceanbase directory, execute the following command, the port can be customized as desired.
'--transport': MCP server transport type as stdio or sse, default is stdio
'--host': sse Host to bind to, default is 127.0.0.1, that is to say, you can only access it on your local computer. If you want any remote client to be able to access it, you can set the host to 0.0.0.0
'--port': sse port to listen on, default is 8000
uv run oceanbase_mcp_server --transport sse --port 8000
If you don't want to use uv, you can start it in the following way
cd src/oceanbase_mcp_server/ && python3 -m server --transport sse --port 9000
The URL address for the general SSE mode configuration is http://ip:port/sse
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
)by: meilisearch
A Model Context Protocol (MCP) server for interacting with Meilisearch through LLM interfaces like Claude.
by: XGenerationLab
An MCP server that supports fetching data from a database using natural language queries, powered by XiyanSQL as the text-to-SQL LLM.
by: felores
Airtable Model Context Protocol Server.