Skip to main content
Glama

OceanBase MCP Server

by yuanoOo
Apache 2.0
2
  • Linux
  • Apple
# tests/conftest.py import pytest import os import mysql.connector from mysql.connector import Error @pytest.fixture(scope="session") def oceanbase_connection(): """Create a test database connection.""" try: connection = mysql.connector.connect( host=os.getenv("OB_HOST", "127.0.0.1"), port=os.getenv("OB_PORT", "2881"), user=os.getenv("OB_USER", "root"), password=os.getenv("OB_PASSWORD", "testpassword"), database=os.getenv("OB_DATABASE", "test_db") ) if connection.is_connected(): # Create a test table cursor = connection.cursor() cursor.execute(""" CREATE TABLE IF NOT EXISTS test_table ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255), value INT ) """) connection.commit() yield connection # Cleanup cursor.execute("DROP TABLE IF EXISTS test_table") connection.commit() cursor.close() connection.close() except Error as e: pytest.fail(f"Failed to connect to OceanBase: {e}") @pytest.fixture(scope="session") def oceanbase_cursor(oceanbase_connection): """Create a test cursor.""" cursor = oceanbase_connection.cursor() yield cursor cursor.close()

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