Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"email": "data-cloud-ai-integrations@google.com"
},
"metadata": {
"description": "Agent skills for Cloud SQL for MySQL to query, manage, and monitor databases."
"description": "Connect and interact with a Cloud SQL for MySQL database and data."
},
"plugins": [
{
Expand Down
68 changes: 66 additions & 2 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,71 @@
"email": "data-cloud-ai-integrations@google.com"
},
"homepage": "https://cloud.google.com/sql",
"license": "Apache-2.0",
"repository": "https://github.com/gemini-cli-extensions/cloud-sql-mysql",
"skills": "./skills/"
"license": "Apache-2.0",
"userConfig": {
"cloud_sql_mysql_project": {
"title": "Project ID",
"description": "ID of the Google Cloud project",
"type": "string",
"sensitive": false
},
"cloud_sql_mysql_region": {
"title": "Region",
"description": "Region of the Cloud SQL instance",
"type": "string",
"sensitive": false
},
"cloud_sql_mysql_instance": {
"title": "Instance",
"description": "Name of the Cloud SQL instance",
"type": "string",
"sensitive": false
},
"cloud_sql_mysql_database": {
"title": "Database",
"description": "Name of the database",
"type": "string",
"sensitive": false
},
"cloud_sql_mysql_user": {
"title": "User",
"description": "(Optional) Username of the database user (Default: IAM user)",
"type": "string",
"sensitive": false
},
"cloud_sql_mysql_password": {
"title": "Password",
"description": "(Optional) Password of the database user (Default: IAM user)",
"type": "string",
"sensitive": false
},
"cloud_sql_mysql_ip_type": {
"title": "IP Type",
"description": "(Optional) Type of the IP address: PUBLIC, PRIVATE, or PSC (Default: Public)",
"type": "string",
"sensitive": false
}
},
"mcpServers": {
"cloud-sql-mysql": {
"command": "npx",
"args": [
"-y",
"@toolbox-sdk/server@1.9.0",
"--prebuilt",
"cloud-sql-mysql",
"--stdio"
],
"env": {
"CLOUD_SQL_MYSQL_PROJECT": "${user_config.cloud_sql_mysql_project}",
"CLOUD_SQL_MYSQL_REGION": "${user_config.cloud_sql_mysql_region}",
"CLOUD_SQL_MYSQL_INSTANCE": "${user_config.cloud_sql_mysql_instance}",
"CLOUD_SQL_MYSQL_DATABASE": "${user_config.cloud_sql_mysql_database}",
"CLOUD_SQL_MYSQL_USER": "${user_config.cloud_sql_mysql_user}",
"CLOUD_SQL_MYSQL_PASSWORD": "${user_config.cloud_sql_mysql_password}",
"CLOUD_SQL_MYSQL_IP_TYPE": "${user_config.cloud_sql_mysql_ip_type}"
}
}
}
}
23 changes: 23 additions & 0 deletions .codex-plugin/.mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"mcpServers": {
"cloud-sql-mysql": {
"command": "npx",
"args": [
"-y",
"@toolbox-sdk/server@1.9.0",
"--prebuilt",
"cloud-sql-mysql",
"--stdio"
],
"env_vars": [
"CLOUD_SQL_MYSQL_PROJECT",
"CLOUD_SQL_MYSQL_REGION",
"CLOUD_SQL_MYSQL_INSTANCE",
"CLOUD_SQL_MYSQL_DATABASE",
"CLOUD_SQL_MYSQL_USER",
"CLOUD_SQL_MYSQL_PASSWORD",
"CLOUD_SQL_MYSQL_IP_TYPE"
]
}
}
}
4 changes: 2 additions & 2 deletions .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"mysql",
"database"
],
"skills": "./skills/",
"interface": {
"displayName": "Cloud SQL for MySQL",
"shortDescription": "Interact with CloudSQL for MySQL instances.",
Expand All @@ -27,5 +26,6 @@
"defaultPrompt": [
"You are a highly skilled database engineer and database administrator. Your purpose is to help the developer build and interact with databases and utilize data context throughout the entire software delivery cycle."
]
}
},
"mcpServers": "./.codex-plugin/.mcp.json"
}
22 changes: 16 additions & 6 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,28 @@
pinDigests: true,
},
{
matchPackageNames: ['googleapis/mcp-toolbox'],
matchPackageNames: ['@toolbox-sdk/server'],
// Group the toolbox update under a stable branch name (renovate/toolbox).
groupName: 'toolbox',
'semanticCommitType': 'feat'
}
],
customManagers: [
{
// Track the npm toolbox server pinned in the MCP command. The version is
// listed in the source (mcp.json) and repeated in every generated
// manifest, so all of them are bumped in one PR.
customType: "regex",
managerFilePatterns: ["/toolbox_version\\.txt$/"],
matchStrings: ["(?<currentValue>[\\d\\.]+)"],
datasourceTemplate: "github-releases",
packageNameTemplate: "googleapis/mcp-toolbox",
extractVersionTemplate: "^v(?<version>.*)$",
managerFilePatterns: [
"/mcp\.json$/",
"/mcp_config\.json$/",
"/gemini-extension\.json$/",
"/\.claude-plugin/plugin\.json$/",
"/\.codex-plugin/\.mcp\.json$/",
],
matchStrings: ["@toolbox-sdk/server@(?<currentValue>[\d\.]+)"],
datasourceTemplate: "npm",
depNameTemplate: "@toolbox-sdk/server",
}
]
}
11 changes: 4 additions & 7 deletions .github/workflows/presubmit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,19 @@ on:
pull_request:
branches: [ main ]

permissions:
contents: read

jobs:
run-presubmit-tests:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install Gemini CLI
run: npm install @google/gemini-cli

- name: Install toolbox binary
run: |
VERSION=$(cat toolbox_version.txt)
curl -L -o toolbox "https://storage.googleapis.com/mcp-toolbox-for-databases/v${VERSION}/linux/amd64/toolbox"
chmod +x toolbox

- name: Install Extension
run: npx gemini extensions validate .
env:
Expand Down
97 changes: 49 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Cloud SQL for MySQL Agent Skills
# Cloud SQL for MySQL

> [!NOTE]
> Currently in beta (pre-v1.0), and may see breaking changes until the first stable release (v1.0).

This repository provides a set of agent skills to interact with [Cloud SQL for MySQL](https://cloud.google.com/sql/docs/mysql) instances. These skills can be used with various AI agents, including [Antigravity](https://antigravity.google/), [Claude Code](https://claude.com/product/claude-code) and [Codex](https://developers.openai.com/codex), to manage your databases, execute queries, explore schemas, and troubleshoot issues using natural language prompts.
This repository packages [MCP Toolbox](https://github.com/googleapis/mcp-toolbox)'s prebuilt `cloud-sql-mysql` server as a plugin/extension to interact with [Cloud SQL for MySQL](https://cloud.google.com/sql/docs/mysql) instances. It can be used with various AI agents, including [Antigravity](https://antigravity.google/), [Claude Code](https://claude.com/product/claude-code) and [Codex](https://developers.openai.com/codex), to manage your databases, execute queries, explore schemas, and troubleshoot issues using natural language prompts.

> [!IMPORTANT]
> **We Want Your Feedback!**
Expand All @@ -14,22 +14,22 @@ This repository provides a set of agent skills to interact with [Cloud SQL for M

## Table of Contents

- [Why Use Cloud SQL for MySQL Agent Skills?](#why-use-cloud-sql-for-mysql-agent-skills)
- [Why Use Cloud SQL for MySQL?](#why-use-cloud-sql-for-mysql)
- [Prerequisites](#prerequisites)
- [Getting Started](#getting-started)
- [Configuration](#configuration)
- [Installation & Usage](#installation--usage)
- [Antigravity](#antigravity)
- [Claude Code](#claude-code)
- [Codex](#codex)
- [Installing using open agent skills tool](#installing-using-open-agent-skills-tool)
- [Installing via a compatible Agent Plugins client](#installing-via-a-compatible-agent-plugins-client)
- [Usage Examples](#usage-examples)
- [Supported Skills](#supported-skills)
- [Available Tools](#available-tools)
- [Generating Skills Instead](#generating-skills-instead)
- [Additional Agent Skills](#additional-agent-skills)
- [Troubleshooting](#troubleshooting)

## Why Use Cloud SQL for MySQL Agent Skills?
## Why Use Cloud SQL for MySQL?

- **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.
Expand All @@ -46,6 +46,7 @@ Before you begin, ensure you have the following:
- [Antigravity 2.0](https://antigravity.google/product/antigravity-2) version **v2.0.0** or higher.
- [Claude Code](https://claude.com/product/claude-code) version **v2.1.94** or higher.
- [Codex](https://developers.openai.com/codex) **v0.117.0** or higher.
- [Node.js](https://nodejs.org/) — the MCP server runs via `npx`.
- A Google Cloud project with the **Cloud SQL Admin API** enabled.
- Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
- IAM Permissions:
Expand Down Expand Up @@ -77,7 +78,7 @@ Please keep these env vars handy during the installation process:

### Installation & Usage

To start interacting with your database, install the skills for your preferred AI agent, then launch the agent and use natural language to ask questions or perform tasks.
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][releases].

Expand Down Expand Up @@ -106,28 +107,18 @@ See <a href="https://antigravity.google/docs/gcli-migration">Migrating from Gemi

#### Antigravity 2.0 (IDE)

**1. Clone the Repo:**

```bash
git clone --branch 0.2.0 https://github.com/gemini-cli-extensions/cloud-sql-mysql.git
```

**2. Install the skills:**

Choose a location for the skills:
- **Global (all workspaces):** `~/.gemini/antigravity/skills/`
- **Workspace-specific:** `<workspace-root>/.agents/skills/`
**1. Install the plugin:**

Copy the skill folders from the cloned repository's `skills/` directory to your chosen location:
Install the plugin directly from the remote GitHub repository:

```bash
cp -R cloud-sql-mysql/skills/* ~/.gemini/antigravity/skills/
agy plugin install https://github.com/gemini-cli-extensions/cloud-sql-mysql
```

**3. Set env vars:**
**2. Set env vars:**
Set your environment vars as described in the [configuration section](#configuration).

_(Tip: Antigravity 2.0 automatically discovers skills in these directories at the start of a session. You can verify they are active by running the `/skills` command in your active session.)_
_(Tip: You can verify the MCP server is active by running the `/mcp` command in your active session.)_

#### Antigravity CLI

Expand Down Expand Up @@ -162,8 +153,7 @@ claude
/plugin install cloud-sql-mysql@claude-plugins-official
```

_(Tip: Run `/plugin list` inside Claude Code to verify the plugin is active, or `/reload-plugins` if you just installed it.)_

_(Tip: Run `/plugin list` inside Claude Code to verify the plugin is active, or `/reload-plugins` if you just installed it.)
</details>

<details>
Expand Down Expand Up @@ -191,23 +181,7 @@ codex plugin marketplace upgrade data-agent-kit

</details>

## Installing using [open agent skills tool](https://github.com/vercel-labs/skills)

You can install skills using the `npx skills` command.

**1. Install the skills:**

Run the following command in your terminal to automatically download and register the skills:

```bash
npx skills add https://github.com/gemini-cli-extensions/cloud-sql-mysql/tree/0.2.0
```

For detailed info check out the [Skills npm package](https://www.npmjs.com/package/skills).

**2. Set env vars:**
Set your environment vars as described in the [configuration section](#configuration).

## Installing via a compatible Agent Plugins client
## Installing via a compatible Agent Plugins client

This repository is a valid [Agent Plugins](https://github.com/agentplugins/agent-plugins-spec) (v1) plugin. Any [Agent Plugins–compatible client](https://agent-plugins.org/compatible-clients) can install it directly using its own built-in plugin command — no extra tooling required — by pointing at this repository:
Expand Down Expand Up @@ -237,14 +211,41 @@ Interact with Cloud SQL for MySQL using natural language:
- **Generate Code:**
- "Generate a Python dataclass to represent the 'customers' table."

## Supported Skills
## Available Tools

The tools come from MCP Toolbox's prebuilt `cloud-sql-mysql` server, grouped into toolsets:

- **admin** - Use these tools when you need to provision new Cloud SQL for MySQL instances, create databases and users, and monitor the progress of infrastructure operations.
- **data** - Use these tools when you need to explore your database schema, execute SQL queries to interact with your data, and inspect how MySQL plans to execute your statements.
- **monitor** - Use these tools when you need to troubleshoot slow queries, analyze system-level PromQL metrics, and identify structural performance issues like table fragmentation or missing unique indexes.
- **lifecycle** - Use these tools when you need to manage the durability and safety of your data by creating backups, restoring from previous states, or cloning instances for recovery and testing.

For the full, up-to-date list, see the [`cloud-sql-mysql` prebuilt config](https://github.com/googleapis/mcp-toolbox/blob/main/internal/prebuiltconfigs/tools/cloud-sql-mysql.yaml)
in the MCP Toolbox repository.

The following skills are available in this repository:
## Generating Skills Instead

The tool-backed skills this plugin used to ship were generated from the same prebuilt
toolsets. If your agent lacks deferred tool loading, or you prefer skills, regenerate
them with the script in this repository:

```bash
VERSION=<toolbox version> ./.github/scripts/generate_skills.sh
```

Use the toolbox version pinned in [`mcp.json`](./mcp.json). A single toolset, without
the script:

```bash
npx @toolbox-sdk/server@<toolbox version> --prebuilt cloud-sql-mysql skills-generate \
--name "<skill name>" \
--toolset "<toolset>" \
--description "<what it is for>"
```

- [Cloud SQL for MySQL Admin](./skills/cloud-sql-mysql-admin/SKILL.md) - Use these skills when you need to provision new Cloud SQL for MySQL instances, create databases and users, clone existing environments, and monitor the progress of infrastructure operations.
- [Cloud SQL for MySQL Data](./skills/cloud-sql-mysql-data/SKILL.md) - Use these skills when you need to explore your database schema, execute SQL queries to interact with your data, and inspect how MySQL plans to execute your statements.
- [Cloud SQL for MySQL Lifecycle](./skills/cloud-sql-mysql-lifecycle/SKILL.md) - Use these skills when you need to manage the durability and safety of your data by creating backups, restoring from previous states, or cloning instances for recovery and testing.
- [Cloud SQL for MySQL Monitor](./skills/cloud-sql-mysql-monitor/SKILL.md) - Use these skills when you need to troubleshoot slow queries, analyze system-level PromQL metrics, and identify structural performance issues like table fragmentation or missing unique indexes.
The generated scripts call the toolbox through `npx`, so no binary download is needed.
See [Generate Agent Skills](https://github.com/googleapis/mcp-toolbox#generate-agent-skills)
in the MCP Toolbox repository.

## Additional Agent Skills

Expand All @@ -262,5 +263,5 @@ Common issues:

- "failed to find default credentials: google: could not find default credentials.": Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment. See [Set up Application Default Credentials](https://cloud.google.com/docs/authentication/external/set-up-adc) for more information.
- "✖ Error during discovery for server: MCP error -32000: Connection closed": The database connection has not been established. Ensure your configuration is set via environment variables.
- "✖ MCP ERROR: Error: spawn .../toolbox ENOENT": The Toolbox binary did not download correctly. Ensure you are using the latest version of your agent.
- "✖ MCP ERROR: Error: spawn npx ENOENT": Node.js is not installed, or `npx` is not on your `PATH`. Install Node.js, which provides `npx`.
- "cannot execute binary file": The Toolbox binary did not download correctly. Ensure the correct binary for your OS/Architecture has been downloaded. See [Installing the server](https://mcp-toolbox.dev/documentation/introduction/#install-toolbox) for more information.
14 changes: 13 additions & 1 deletion gemini-extension.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
{
"name": "cloud-sql-mysql",
"version": "0.2.0",
"description": "Connect and interact with a Cloud SQL for MySQL database and data",
"description": "Connect and interact with a Cloud SQL for MySQL database and data.",
"mcpServers": {
"cloud-sql-mysql": {
"command": "npx",
"args": [
"-y",
"@toolbox-sdk/server@1.9.0",
"--prebuilt",
"cloud-sql-mysql",
"--stdio"
]
}
},
"contextFileName": "CLOUD-SQL-MYSQL.md",
"settings": [
{
Expand Down
Loading
Loading