OceanBase MCP
Provides Docker images and Docker Compose templates for deploying the OceanBase MCP server in containerized environments.
Provides CI/CD workflows using GitHub Actions for building, testing, and releasing the MCP server.
Provides Kubernetes deployment templates for running the OceanBase MCP server in a Kubernetes cluster.
Provides an NGINX reverse proxy configuration example for securing the HTTP MCP server.
Exposes a Prometheus metrics endpoint for monitoring the MCP server's performance and health.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OceanBase MCPlist tables in schema app_schema"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OceanBase MCP
OceanBase 只读 MCP 网关,用于 OpenCode 和其他 MCP 客户端安全查看 OceanBase。支持本地 stdio、远程 HTTP、MySQL/Oracle 模式、访问策略、来源 IP 限制、诊断、指标以及 Docker/Kubernetes 部署模板。
Read-only MCP gateway for OceanBase. It lets OpenCode and other MCP clients inspect OceanBase safely through explicit read-only tools, schema/table policy, HTTP authentication, source IP allowlists, diagnostics, metrics, and production deployment templates.
服务从设计上只读:没有写入工具,拒绝写入/控制 SQL,默认阻止 SELECT *,用户 SQL 默认走只读事务,并且 OB_MCP_READ_ONLY=false 会直接启动失败。
OceanBase MCP is read-only by design. It has no write tool, rejects write/control SQL, blocks SELECT * by default, runs user SQL in read-only transactions, and refuses to start when OB_MCP_READ_ONLY=false.
Documentation / 文档
Topic | 中文 | English |
Start here | ||
OpenCode | ||
Configuration | ||
Deployment | ||
Architecture | ||
Security | ||
Examples |
Related MCP server: mysql-readonly-mcp
Capabilities / 能力
MySQL and Oracle compatibility modes for OceanBase tenants.
Local stdio MCP server for OpenCode desktop/local workflows.
Streamable HTTP MCP server for shared or remote deployments.
Multiple profiles for dev, staging, production, tenants, or clusters.
Schema/table allowlist, denied system schemas, denied sensitive columns, and masked sample rows.
Source IP allowlist with exact IP and CIDR entries through
OB_MCP_ALLOWED_IPS.HTTP bearer token, Host allowlist, body limit, and rate limiting.
Health endpoint, Prometheus metrics, JSON audit logs, and config diagnostics.
Docker, Docker Compose, Kubernetes, Nginx, systemd, and local macOS/Linux/Windows client examples.
GitHub Actions for CI, tagged releases, GHCR multi-architecture images, and offline image archives.
Quick Start / 快速开始
git clone https://github.com/sevoniva/oceanbase-mcp.git
cd oceanbase-mcp
npm install
npm run build
cp .env.example .env
npm run config:doctor
npm run startThen configure OpenCode with opencode.jsonc or one of the files under examples.
Production Minimum / 生产最小配置
NODE_ENV=production
OB_HOST=your-obproxy.example.com
OB_PORT=2883
OB_USER=readonly_user@tenant#cluster
OB_PASSWORD_FILE=/run/secrets/ob_password
OB_COMPATIBILITY=mysql
OB_PRODUCTION=true
OB_MCP_READ_ONLY=true
OB_ALLOWED_SCHEMAS=app_schema
OB_ALLOW_SELECT_STAR=false
OB_ENFORCE_READ_ONLY_TX=true
OB_MCP_HOST=127.0.0.1
OB_MCP_AUTH_TOKEN_FILE=/run/secrets/ob_mcp_auth_token
OB_MCP_ALLOWED_IPS=127.0.0.1,10.0.0.0/8Use OB_MCP_HOST=0.0.0.0 only behind TLS/reverse proxy or a trusted network boundary. Non-local HTTP binds require OB_MCP_AUTH_TOKEN, OB_MCP_ALLOWED_HOSTS, and OB_MCP_ALLOWED_IPS.
Tools / 工具
Tool | Purpose |
| List configured profiles with secrets redacted. |
| Report deployment and policy checks. |
| Verify the OceanBase connection. |
| Explain whether SQL would be allowed. |
| Run strict read-only SQL. |
| List visible schemas/databases. |
| List visible tables. |
| Return column metadata. |
| Run |
| Search schemas, tables, and columns. |
| Return policy-filtered table schema. |
| Return table index metadata. |
| Return primary, unique, foreign-key, check, and not-null constraints. |
| Return table partition metadata. |
| Return masked, explicit-column sample rows. |
Validation / 验证
npm test
npm run smoke
npm run mcp:smoke
npm run http:smoke
npm audit --omit=dev --audit-level=moderate
npm pack --dry-runOracle compatibility can be verified with:
npm run mcp:smoke:oracle
npm run http:smoke:oracleSee docs/en/README.md or docs/zh-CN/README.md for complete setup.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sevoniva/oceanbase-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server