OceanBase MCP Server
Servidor MCP de OceanBase
Un servidor de Protocolo de Contexto de Modelo (MCP) que permite la interacción segura con las bases de datos de OceanBase. Este servidor permite a los asistentes de IA listar tablas, leer datos y ejecutar consultas SQL a través de una interfaz controlada, lo que hace que la exploración y el análisis de bases de datos sean más seguros y estructurados.
Características
Enumere las tablas OceanBase disponibles como recursos
Leer el contenido de la tabla
Ejecutar consultas SQL con manejo de errores adecuado
Acceso seguro a la base de datos mediante variables de entorno
Registro completo
Related MCP server: Microsoft SQL Server MCP Server
Instalación
pip install oceanbase-mcp-serverConfiguración
Establezca las siguientes variables de entorno:
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_databaseUso
Con Claude Desktop
Agregue esto a su 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"
}
}
}
}Como servidor independiente
# Install dependencies
pip install -r requirements.txt
# Run the server
python -m oceanbase_mcp_serverDesarrollo
# 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
pytestConsideraciones de seguridad
Nunca confirme variables de entorno ni credenciales
Utilice un usuario de base de datos con los permisos mínimos requeridos
Considere implementar la lista blanca de consultas para uso en producción
Supervisar y registrar todas las operaciones de la base de datos
Mejores prácticas de seguridad
Este servidor MCP requiere acceso a la base de datos para funcionar. Por seguridad:
Cree un usuario dedicado de OceanBase con permisos mínimos
Nunca utilice credenciales root o cuentas administrativas
Restringir el acceso a la base de datos únicamente a las operaciones necesarias
Habilitar el registro para fines de auditoría
Revisiones de seguridad periódicas del acceso a las bases de datos
Consulte la Guía de configuración de seguridad de OceanBase para obtener instrucciones detalladas sobre:
Creación de un usuario restringido de OceanBase
Establecer permisos apropiados
Monitoreo del acceso a la base de datos
Mejores prácticas de seguridad
⚠️ IMPORTANTE: Siga siempre el principio del mínimo privilegio al configurar el acceso a la base de datos.
Licencia
Licencia Apache: consulte el archivo LICENCIA para obtener más detalles.
Contribuyendo
Bifurcar el repositorio
Crea tu rama de funciones (
git checkout -b feature/amazing-feature)Confirme sus cambios (
git commit -m 'Add some amazing feature')Empujar a la rama (
git push origin feature/amazing-feature)Abrir una solicitud de extracción
Available Tools
1 toolexecute_sqlC
Execute an SQL query on the OceanBase server
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The SQL query to execute |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It mentions execution but fails to address critical aspects like required permissions, transaction handling, error behavior, or result format. This leaves significant gaps for a tool that performs database operations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's function without unnecessary elaboration. It's appropriately sized and front-loaded, with zero wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a database execution tool with no annotations and no output schema, the description is insufficient. It lacks information about return values, error handling, security requirements, and operational constraints, which are critical for proper tool invocation in this context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with the single parameter 'query' documented in the schema. The description adds no additional parameter semantics beyond what the schema already provides, so it meets the baseline for adequate but unenhanced documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('execute') and resource ('SQL query on the OceanBase server'), providing a specific verb+resource combination. However, with no sibling tools mentioned, there's no opportunity to distinguish from alternatives, which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or limitations. It merely states what the tool does without context for application, leaving the agent to infer usage scenarios independently.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
execute_sql
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'execute_sql' has a clear and distinct purpose that cannot be confused with any other tool in this set.
The single tool name 'execute_sql' follows a clear verb_noun pattern, and with only one tool, consistency is inherently perfect. There are no other tools to compare against, so no inconsistencies can exist.
A single tool is too few for a database server's apparent scope, which typically requires operations like querying, updating, schema management, and transaction handling. This minimal set severely limits functionality and will likely cause agent failures in complex tasks.
The tool surface is severely incomplete for a database server domain. It only provides SQL execution, missing essential operations such as listing tables, describing schemas, creating/dropping tables, managing transactions, or handling connections, leaving significant gaps that will hinder agent workflows.
Maintenance
Related MCP Connectors
Draxlr's remote MCP server connects AI assistants to your SQL databases and dashboards. Explore schemas, run read-only queries, manage saved queries and dashboards, and export results, all with row-level security so each user sees only their own data.
The BigQuery remote MCP server is a fully managed service that uses the Model Context Protocol to connect AI applications and LLMs to BigQuery data sources. It provides secure, standardized tools for AI agents to list datasets and tables, retrieve schemas, generate and execute SQL queries through natural language, and analyze data—enabling direct access to enterprise analytics data without requiring manual SQL coding.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The Grafbase MCP server sits in front of a GraphQL API and exposes an MCP protocol-compliant interface that allows AI agents and LLMs to explore and query GraphQL APIs using natural language. It provides tools to search schemas, introspect types and fields, and execute GraphQL queries while minimizing context bloat by returning only relevant schema subsets, with built-in support for authentication, authorization, and configurable access control.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA Model Context Protocol server that enables secure and structured interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries with controlled access.58MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables secure interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.1391MIT
- AlicenseAqualityAmaintenanceA Model Context Protocol server implementation that enables AI assistants to securely interact with GreptimeDB, allowing them to explore database schema, read data, and execute SQL queries through a controlled interface.1529MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI assistants to securely interact with ClickHouse databases, supporting table exploration and SQL query execution through a controlled interface.18Apache 2.0