mcp-oceanbase
mcp-oceanbase provides Model Context Protocol (MCP) servers that enable secure interactions with the OceanBase database. This repository includes multiple MCP servers for OceanBase, OCP, OBCloud, and interactions with resources in Kubernetes. Each server comes with specific documentation tailored to different environments and needs, making it accessible for developers.
GitHub Stars
26
User Rating
Not Rated
Favorites
0
Views
25
Forks
23
Issues
1
Python 3.6以上pip 最新版Installation
Installation
Prerequisites
Please specify required software and versions:Installation Steps
1. Clone Repository
bash
git clone https://github.com/oceanbase/mcp-oceanbase.git
cd mcp-oceanbase
2. Install Dependencies
bash
pip install -r requirements.txt
3. Start Server
bash
python server.py
Troubleshooting
Common Issues
Issue: Server won't start Solution: Check Python version and reinstall dependencies. Issue: Unable to connect to the database Solution: Verify database connection settings.Configuration
Configuration
Basic Configuration
OceanBase Connection Settings
Create or editconfig.json to add connection information:
json
{
"database": {
"host": "localhost",
"port": 2881,
"user": "your-username",
"password": "your-password"
}
}
Environment Variables
Set the following environment variables as needed:bash
export OCEANBASE_USER="your-username"
export OCEANBASE_PASSWORD="your-password"
Advanced Configuration
Security Settings
Performance Tuning
Configuration Example
json
{
"database": {
"host": "localhost",
"port": 2881,
"user": "admin",
"password": "securepassword"
}
}
Examples
Examples
Basic Usage
Here are basic usage examples for the MCP server:Connecting to OceanBase Database
python
import json
import requests
with open('config.json') as config_file:
config = json.load(config_file)
response = requests.get(f"http://{config['database']['host']}:{config['database']['port']}/query")
print(response.json())
Executing a Tool
python
Python example
import requests
response = requests.post(
'http://localhost:3000/mcp/call',
json={
'tool': 'analyze',
'parameters': {'input': 'sample data'}
}
)
print(response.json())
Use Cases
Additional Resources
🤩 Easy-to-use global IM bot platform designed for the LLM era / 简单易用的大模型即时通信机器人开发平台 ⚡️ Bots for QQ / QQ频道 / Discord / WeChat(微信)/ Telegram / 飞书 / 钉钉 / Slack 🧩 Integrated with ChatGPT(GPT)、DeepSeek、Dify、n8n、Claude、Google Gemini、xAI、PPIO、Ollama、阿里云百炼、SiliconFlow、Qwen、Moonshot(Kimi K2)、SillyTraven、MCP、WeClone etc. LLM & Agent & RAG