Skip to content

Commit ed4fbfe

Browse files
authored
feat(plugin): migrate from generated skills to the prebuilt MCP server (#136)
1 parent 066a373 commit ed4fbfe

40 files changed

Lines changed: 265 additions & 3105 deletions

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"email": "data-cloud-ai-integrations@google.com"
66
},
77
"metadata": {
8-
"description": "Agent skills for Cloud SQL for MySQL to query, manage, and monitor databases."
8+
"description": "Connect and interact with a Cloud SQL for MySQL database and data."
99
},
1010
"plugins": [
1111
{

.claude-plugin/plugin.json

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,71 @@
77
"email": "data-cloud-ai-integrations@google.com"
88
},
99
"homepage": "https://cloud.google.com/sql",
10-
"license": "Apache-2.0",
1110
"repository": "https://github.com/gemini-cli-extensions/cloud-sql-mysql",
12-
"skills": "./skills/"
11+
"license": "Apache-2.0",
12+
"userConfig": {
13+
"cloud_sql_mysql_project": {
14+
"title": "Project ID",
15+
"description": "ID of the Google Cloud project",
16+
"type": "string",
17+
"sensitive": false
18+
},
19+
"cloud_sql_mysql_region": {
20+
"title": "Region",
21+
"description": "Region of the Cloud SQL instance",
22+
"type": "string",
23+
"sensitive": false
24+
},
25+
"cloud_sql_mysql_instance": {
26+
"title": "Instance",
27+
"description": "Name of the Cloud SQL instance",
28+
"type": "string",
29+
"sensitive": false
30+
},
31+
"cloud_sql_mysql_database": {
32+
"title": "Database",
33+
"description": "Name of the database",
34+
"type": "string",
35+
"sensitive": false
36+
},
37+
"cloud_sql_mysql_user": {
38+
"title": "User",
39+
"description": "(Optional) Username of the database user (Default: IAM user)",
40+
"type": "string",
41+
"sensitive": false
42+
},
43+
"cloud_sql_mysql_password": {
44+
"title": "Password",
45+
"description": "(Optional) Password of the database user (Default: IAM user)",
46+
"type": "string",
47+
"sensitive": false
48+
},
49+
"cloud_sql_mysql_ip_type": {
50+
"title": "IP Type",
51+
"description": "(Optional) Type of the IP address: PUBLIC, PRIVATE, or PSC (Default: Public)",
52+
"type": "string",
53+
"sensitive": false
54+
}
55+
},
56+
"mcpServers": {
57+
"cloud-sql-mysql": {
58+
"command": "npx",
59+
"args": [
60+
"-y",
61+
"@toolbox-sdk/server@1.9.0",
62+
"--prebuilt",
63+
"cloud-sql-mysql",
64+
"--stdio"
65+
],
66+
"env": {
67+
"CLOUD_SQL_MYSQL_PROJECT": "${user_config.cloud_sql_mysql_project}",
68+
"CLOUD_SQL_MYSQL_REGION": "${user_config.cloud_sql_mysql_region}",
69+
"CLOUD_SQL_MYSQL_INSTANCE": "${user_config.cloud_sql_mysql_instance}",
70+
"CLOUD_SQL_MYSQL_DATABASE": "${user_config.cloud_sql_mysql_database}",
71+
"CLOUD_SQL_MYSQL_USER": "${user_config.cloud_sql_mysql_user}",
72+
"CLOUD_SQL_MYSQL_PASSWORD": "${user_config.cloud_sql_mysql_password}",
73+
"CLOUD_SQL_MYSQL_IP_TYPE": "${user_config.cloud_sql_mysql_ip_type}"
74+
}
75+
}
76+
}
1377
}

.codex-plugin/.mcp.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"mcpServers": {
3+
"cloud-sql-mysql": {
4+
"command": "npx",
5+
"args": [
6+
"-y",
7+
"@toolbox-sdk/server@1.9.0",
8+
"--prebuilt",
9+
"cloud-sql-mysql",
10+
"--stdio"
11+
],
12+
"env_vars": [
13+
"CLOUD_SQL_MYSQL_PROJECT",
14+
"CLOUD_SQL_MYSQL_REGION",
15+
"CLOUD_SQL_MYSQL_INSTANCE",
16+
"CLOUD_SQL_MYSQL_DATABASE",
17+
"CLOUD_SQL_MYSQL_USER",
18+
"CLOUD_SQL_MYSQL_PASSWORD",
19+
"CLOUD_SQL_MYSQL_IP_TYPE"
20+
]
21+
}
22+
}
23+
}

.codex-plugin/plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"mysql",
1515
"database"
1616
],
17-
"skills": "./skills/",
1817
"interface": {
1918
"displayName": "Cloud SQL for MySQL",
2019
"shortDescription": "Interact with CloudSQL for MySQL instances.",
@@ -27,5 +26,6 @@
2726
"defaultPrompt": [
2827
"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."
2928
]
30-
}
29+
},
30+
"mcpServers": "./.codex-plugin/.mcp.json"
3131
}

.github/renovate.json5

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,28 @@
2121
pinDigests: true,
2222
},
2323
{
24-
matchPackageNames: ['googleapis/mcp-toolbox'],
24+
matchPackageNames: ['@toolbox-sdk/server'],
25+
// Group the toolbox update under a stable branch name (renovate/toolbox).
26+
groupName: 'toolbox',
2527
'semanticCommitType': 'feat'
2628
}
2729
],
2830
customManagers: [
2931
{
32+
// Track the npm toolbox server pinned in the MCP command. The version is
33+
// listed in the source (mcp.json) and repeated in every generated
34+
// manifest, so all of them are bumped in one PR.
3035
customType: "regex",
31-
managerFilePatterns: ["/toolbox_version\\.txt$/"],
32-
matchStrings: ["(?<currentValue>[\\d\\.]+)"],
33-
datasourceTemplate: "github-releases",
34-
packageNameTemplate: "googleapis/mcp-toolbox",
35-
extractVersionTemplate: "^v(?<version>.*)$",
36+
managerFilePatterns: [
37+
"/mcp\.json$/",
38+
"/mcp_config\.json$/",
39+
"/gemini-extension\.json$/",
40+
"/\.claude-plugin/plugin\.json$/",
41+
"/\.codex-plugin/\.mcp\.json$/",
42+
],
43+
matchStrings: ["@toolbox-sdk/server@(?<currentValue>[\d\.]+)"],
44+
datasourceTemplate: "npm",
45+
depNameTemplate: "@toolbox-sdk/server",
3646
}
3747
]
3848
}

.github/workflows/presubmit-tests.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,19 @@ on:
1717
pull_request:
1818
branches: [ main ]
1919

20+
permissions:
21+
contents: read
22+
2023
jobs:
2124
run-presubmit-tests:
2225
runs-on: ubuntu-latest
2326
steps:
2427
- name: Check out code
25-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2629

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

30-
- name: Install toolbox binary
31-
run: |
32-
VERSION=$(cat toolbox_version.txt)
33-
curl -L -o toolbox "https://storage.googleapis.com/mcp-toolbox-for-databases/v${VERSION}/linux/amd64/toolbox"
34-
chmod +x toolbox
35-
3633
- name: Install Extension
3734
run: npx gemini extensions validate .
3835
env:

README.md

Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Cloud SQL for MySQL Agent Skills
1+
# Cloud SQL for MySQL
22

33
> [!NOTE]
44
> Currently in beta (pre-v1.0), and may see breaking changes until the first stable release (v1.0).
55
6-
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.
6+
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.
77

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

1515
## Table of Contents
1616

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

32-
## Why Use Cloud SQL for MySQL Agent Skills?
32+
## Why Use Cloud SQL for MySQL?
3333

3434
- **Seamless Workflow:** Integrates seamlessly into your AI agent's environment. No need to constantly switch contexts for common database tasks.
3535
- **Natural Language Queries:** Stop wrestling with complex commands. Explore schemas and query data by describing what you want in plain English.
@@ -46,6 +46,7 @@ Before you begin, ensure you have the following:
4646
- [Antigravity 2.0](https://antigravity.google/product/antigravity-2) version **v2.0.0** or higher.
4747
- [Claude Code](https://claude.com/product/claude-code) version **v2.1.94** or higher.
4848
- [Codex](https://developers.openai.com/codex) **v0.117.0** or higher.
49+
- [Node.js](https://nodejs.org/) — the MCP server runs via `npx`.
4950
- A Google Cloud project with the **Cloud SQL Admin API** enabled.
5051
- Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
5152
- IAM Permissions:
@@ -77,7 +78,7 @@ Please keep these env vars handy during the installation process:
7778
7879
### Installation & Usage
7980

80-
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.
81+
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.
8182

8283
For the latest version, check the [releases page][releases].
8384

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

107108
#### Antigravity 2.0 (IDE)
108109

109-
**1. Clone the Repo:**
110-
111-
```bash
112-
git clone --branch 0.2.0 https://github.com/gemini-cli-extensions/cloud-sql-mysql.git
113-
```
114-
115-
**2. Install the skills:**
116-
117-
Choose a location for the skills:
118-
- **Global (all workspaces):** `~/.gemini/antigravity/skills/`
119-
- **Workspace-specific:** `<workspace-root>/.agents/skills/`
110+
**1. Install the plugin:**
120111

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

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

127-
**3. Set env vars:**
118+
**2. Set env vars:**
128119
Set your environment vars as described in the [configuration section](#configuration).
129120

130-
_(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.)_
121+
_(Tip: You can verify the MCP server is active by running the `/mcp` command in your active session.)_
131122

132123
#### Antigravity CLI
133124

@@ -162,8 +153,7 @@ claude
162153
/plugin install cloud-sql-mysql@claude-plugins-official
163154
```
164155

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

169159
<details>
@@ -191,23 +181,7 @@ codex plugin marketplace upgrade data-agent-kit
191181

192182
</details>
193183

194-
## Installing using [open agent skills tool](https://github.com/vercel-labs/skills)
195-
196-
You can install skills using the `npx skills` command.
197-
198-
**1. Install the skills:**
199-
200-
Run the following command in your terminal to automatically download and register the skills:
201-
202-
```bash
203-
npx skills add https://github.com/gemini-cli-extensions/cloud-sql-mysql/tree/0.2.0
204-
```
205-
206-
For detailed info check out the [Skills npm package](https://www.npmjs.com/package/skills).
207-
208-
**2. Set env vars:**
209-
Set your environment vars as described in the [configuration section](#configuration).
210-
184+
## Installing via a compatible Agent Plugins client
211185
## Installing via a compatible Agent Plugins client
212186

213187
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:
@@ -237,14 +211,41 @@ Interact with Cloud SQL for MySQL using natural language:
237211
- **Generate Code:**
238212
- "Generate a Python dataclass to represent the 'customers' table."
239213

240-
## Supported Skills
214+
## Available Tools
215+
216+
The tools come from MCP Toolbox's prebuilt `cloud-sql-mysql` server, grouped into toolsets:
217+
218+
- **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.
219+
- **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.
220+
- **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.
221+
- **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.
222+
223+
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)
224+
in the MCP Toolbox repository.
241225

242-
The following skills are available in this repository:
226+
## Generating Skills Instead
227+
228+
The tool-backed skills this plugin used to ship were generated from the same prebuilt
229+
toolsets. If your agent lacks deferred tool loading, or you prefer skills, regenerate
230+
them with the script in this repository:
231+
232+
```bash
233+
VERSION=<toolbox version> ./.github/scripts/generate_skills.sh
234+
```
235+
236+
Use the toolbox version pinned in [`mcp.json`](./mcp.json). A single toolset, without
237+
the script:
238+
239+
```bash
240+
npx @toolbox-sdk/server@<toolbox version> --prebuilt cloud-sql-mysql skills-generate \
241+
--name "<skill name>" \
242+
--toolset "<toolset>" \
243+
--description "<what it is for>"
244+
```
243245

244-
- [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.
245-
- [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.
246-
- [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.
247-
- [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.
246+
The generated scripts call the toolbox through `npx`, so no binary download is needed.
247+
See [Generate Agent Skills](https://github.com/googleapis/mcp-toolbox#generate-agent-skills)
248+
in the MCP Toolbox repository.
248249

249250
## Additional Agent Skills
250251

@@ -262,5 +263,5 @@ Common issues:
262263

263264
- "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.
264265
- "✖ 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.
265-
- "✖ MCP ERROR: Error: spawn .../toolbox ENOENT": The Toolbox binary did not download correctly. Ensure you are using the latest version of your agent.
266+
- "✖ MCP ERROR: Error: spawn npx ENOENT": Node.js is not installed, or `npx` is not on your `PATH`. Install Node.js, which provides `npx`.
266267
- "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.

gemini-extension.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
{
22
"name": "cloud-sql-mysql",
33
"version": "0.2.0",
4-
"description": "Connect and interact with a Cloud SQL for MySQL database and data",
4+
"description": "Connect and interact with a Cloud SQL for MySQL database and data.",
5+
"mcpServers": {
6+
"cloud-sql-mysql": {
7+
"command": "npx",
8+
"args": [
9+
"-y",
10+
"@toolbox-sdk/server@1.9.0",
11+
"--prebuilt",
12+
"cloud-sql-mysql",
13+
"--stdio"
14+
]
15+
}
16+
},
517
"contextFileName": "CLOUD-SQL-MYSQL.md",
618
"settings": [
719
{

0 commit comments

Comments
 (0)