Cloud SQL for SQL Server
[!NOTE]
This extension is currently in beta (pre-v1.0), and may see breaking changes until the first stable release (v1.0).
This repository packages MCP Toolbox's prebuilt cloud-sql-mssql server as a plugin/extension to interact with Cloud SQL for SQL Server instances. It can be used with various AI agents, including Antigravity, Claude Code and Codex, to manage your databases, execute queries, explore schemas, and troubleshoot issues using natural language prompts.
[!IMPORTANT]
We Want Your Feedback!
Please share your thoughts with us by filling out our feedback form.
Your input is invaluable and helps us improve the project for everyone.
Table of Contents
Why Use Cloud SQL for SQL Server?
- Seamless Workflow: Integrates seamlessly into your AI agent's environment. No need to constantly switch contexts for common database tasks.
- Natural Language Queries: Stop wrestling with complex commands. Explore schemas and query data by describing what you want in plain English.
- Full Lifecycle Control: Manage the entire lifecycle of your database, from creating instances to exploring schemas and running queries.
- Code Generation: Accelerate development by asking your agent to generate data classes and other code snippets based on your table schemas.
Prerequisites
Before you begin, ensure you have the following:
- One of these AI agents installed
- Node.js — the MCP server runs via
npx.
- A Google Cloud project with the Cloud SQL Admin API enabled.
- Ensure Application Default Credentials are available in your environment.
- IAM Permissions:
- Cloud SQL Client (
roles/cloudsql.client)
- Cloud SQL Viewer (
roles/cloudsql.viewer)
- Cloud SQL Admin (
roles/cloudsql.admin)
Getting Started
Configuration
Please keep these env vars handy during the installation process:
CLOUD_SQL_MSSQL_PROJECT: The GCP project ID.
CLOUD_SQL_MSSQL_REGION: The region of your Cloud SQL instance.
CLOUD_SQL_MSSQL_INSTANCE: The ID of your Cloud SQL instance.
CLOUD_SQL_MSSQL_DATABASE: The name of the database to connect to.
CLOUD_SQL_MSSQL_USER: The database username.
CLOUD_SQL_MSSQL_PASSWORD: The password for the database user.
CLOUD_SQL_MSSQL_IP_TYPE: (Optional) Type of the IP address: PUBLIC, PRIVATE, or PSC. Defaults to PUBLIC.
[!NOTE]
- Ensure Application Default Credentials are available in your environment.
- If your Cloud SQL for SQL Server instance uses private IPs, you must run your agent in the same Virtual Private Cloud (VPC) network.
- This configuration is primarily for the Data Plane skills (querying). The Admin toolset does not strictly require these to be pre-set if you provide them in your prompts, but it is recommended for a smoother experience.
Installation & Usage
To start interacting with your database, install the extension for your preferred AI agent, then launch the agent and use natural language to ask questions or perform tasks.
For the latest version, check the releases page.
Antigravity