OceanBase MCP Server
OceanBase MCP 服务器
一个模型上下文协议 (MCP) 服务器,用于实现与 OceanBase 数据库的安全交互。该服务器允许 AI 助手通过受控接口列出表格、读取数据并执行 SQL 查询,从而使数据库的探索和分析更加安全、结构化。
特征
将可用的 OceanBase 表列为资源
读取表内容
执行 SQL 查询并进行适当的错误处理
通过环境变量保护数据库访问
综合日志记录
Related MCP server: Microsoft SQL Server MCP Server
安装
pip install oceanbase-mcp-server配置
设置以下环境变量:
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用法
使用 Claude Desktop
将其添加到您的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安全注意事项
切勿提交环境变量或凭据
使用具有最低所需权限的数据库用户
考虑实施查询白名单以供生产使用
监控并记录所有数据库操作
安全最佳实践
此 MCP 服务器需要数据库访问权限才能运行。出于安全考虑:
创建具有最小权限的专用 OceanBase 用户
切勿使用根凭据或管理帐户
将数据库访问限制为仅进行必要的操作
启用日志记录以用于审计目的
定期对数据库访问进行安全审查
请参阅OceanBase 安全配置指南,详细了解:
创建受限的OceanBase用户
设置适当的权限
监控数据库访问
安全最佳实践
⚠️重要提示:配置数据库访问时始终遵循最小特权原则。
执照
Apache 许可证 - 有关详细信息,请参阅 LICENSE 文件。
贡献
分叉存储库
创建你的功能分支(
git checkout -b feature/amazing-feature)提交您的更改(
git commit -m 'Add some amazing feature')推送到分支(
git push origin feature/amazing-feature)打开拉取请求
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- Alicense-qualityDmaintenanceA 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.56MIT
- 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.1381MIT
- 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.1329MIT
- 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
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
GibsonAI MCP server: manage your databases with natural language
A Model Context Protocol server for Wix AI tools
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- 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/yuanoOo/oceanbase_mcp_server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server