SkySQL MCP Server (skysql-mcp) is a tool based on the Model Context Protocol (MCP), designed to provide a powerful database management interface and AI agent interaction capabilities for SkySQL/MariaDB Cloud. It allows developers and database administrators to operate cloud MariaDB databases through a standardized protocol.
Purpose: The SkySQL MCP Server is mainly used to manage SkySQL MariaDB database instances, execute SQL queries, and leverage AI agents for database interaction. It is suitable for scenarios that require automated database operations, integration of AI-assisted queries, or managing cloud databases through an IDE.
Main capabilities:
- Launch and manage serverless MariaDB database instances.
- Interact with AI-powered database agents, supporting text-to-SQL and conversation.
- Execute SQL queries directly on SkySQL (MySQL/MariaDB) instances.
- Manage database credentials and IP allowlists.
- List and monitor database services.
Usage:
- Prerequisites: Requires Python 3.10 or later, and a SkySQL/MariaDB Cloud API key.
- Run locally: Clone the repository (git clone git@github.com:skysqlinc/skysql-mcp.git), enter the directory (cd skysql-mcp), run the installation script (chmod +x install.sh ./install.sh).
- Create a .env file in the root directory of the cloned repository, and fill in the SkySQL API key: SKYSQL_API_KEY=<your_skysql_api_key_here>. You can register for free at SkySQL to get an API key.
- Start the MCP server (HTTP mode): Run chmod +x launch.sh ./launch.sh. The server starts by default at http://localhost:8000/mcp。
- Configure the IDE:
- Cursor: Add the corresponding settings in the MCP configuration (~/.cursor/mcp.json or .cursor/mcp.json within the project). The X-API-Key header is sent with each request, supporting per-user API keys when remotely hosted.
- Windsurf: Add the settings in the MCP configuration (~/.codeium/windsurf/mcp_config.json). Note that Windsurf uses serverUrl (not url) and cannot send request headers, so the server must be started in single-tenant mode so that it falls back to the API key in the environment variable. If SKYSQL_API_KEY is set in .env (step 3), and SKYSQL_SINGLE_TENANT is not set, the server will require each HTTP caller to provide their own X-API-Key header, otherwise it will reject the request, to avoid a shared deployment using the operator's key.
- Claude: Add as a custom connector (Settings > Connectors > Add custom connector), then provide the API key in Request headers. Keys are generated at app.skysql.com/user-profile/api-keys. Claude requires a publicly accessible HTTPS URL, so http://localhost:8000/mcp is not applicable; the server must be deployed first. Request header authentication is currently in beta and may need to be enabled for the organization.
- (Optional) Use the MCP CLI for interaction testing: npx @wong2/mcp-cli uv run python src/mcp-server/server.py.
Applicable scenarios: Suitable for developers and database administrators who need to manage SkySQL MariaDB cloud databases, as well as users who want AI agent-assisted SQL queries or conversation. It can also be used for integration into MCP-supported IDEs to enable convenient database operations and monitoring.
Limitations: Requires a SkySQL/MariaDB Cloud API key; Python version 3.10 or later is required; the Claude connector requires a public HTTPS URL and request header authentication may be in beta; Windsurf requires single-tenant mode; other specific limitations are not provided at this time.