Skip to content

Commit 8858b0f

Browse files
authored
feat(plugin): migrate from generated skills to the prebuilt MCP server (#126)
1 parent 9e4e899 commit 8858b0f

32 files changed

Lines changed: 265 additions & 2089 deletions

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"email": "data-cloud-ai-integrations@google.com"
66
},
77
"metadata": {
8-
"description": "Agent skills for Cloud SQL for SQL Server to query, manage, and monitor databases."
8+
"description": "Connect to and interact with a Cloud SQL for SQL Server database."
99
},
1010
"plugins": [
1111
{
1212
"name": "cloud-sql-sqlserver",
1313
"source": "./"
1414
}
1515
]
16-
}
16+
}

.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/docs/sqlserver",
10-
"license": "Apache-2.0",
1110
"repository": "https://github.com/gemini-cli-extensions/cloud-sql-sqlserver",
12-
"skills": "./skills/"
11+
"license": "Apache-2.0",
12+
"userConfig": {
13+
"cloud_sql_mssql_project": {
14+
"title": "Project Name",
15+
"description": "Name of the Google Cloud project",
16+
"type": "string",
17+
"sensitive": false
18+
},
19+
"cloud_sql_mssql_region": {
20+
"title": "Region",
21+
"description": "Region of the Cloud SQL instance",
22+
"type": "string",
23+
"sensitive": false
24+
},
25+
"cloud_sql_mssql_instance": {
26+
"title": "Instance ID",
27+
"description": "ID of the Cloud SQL instance",
28+
"type": "string",
29+
"sensitive": false
30+
},
31+
"cloud_sql_mssql_database": {
32+
"title": "Database",
33+
"description": "Name of the database",
34+
"type": "string",
35+
"sensitive": false
36+
},
37+
"cloud_sql_mssql_user": {
38+
"title": "User",
39+
"description": "Username of the database user",
40+
"type": "string",
41+
"sensitive": false
42+
},
43+
"cloud_sql_mssql_password": {
44+
"title": "Password",
45+
"description": "Password of the database user",
46+
"type": "string",
47+
"sensitive": false
48+
},
49+
"cloud_sql_mssql_ip_type": {
50+
"title": "Instance IP assignment",
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-mssql": {
58+
"command": "npx",
59+
"args": [
60+
"-y",
61+
"@toolbox-sdk/server@1.9.0",
62+
"--prebuilt",
63+
"cloud-sql-mssql",
64+
"--stdio"
65+
],
66+
"env": {
67+
"CLOUD_SQL_MSSQL_PROJECT": "${user_config.cloud_sql_mssql_project}",
68+
"CLOUD_SQL_MSSQL_REGION": "${user_config.cloud_sql_mssql_region}",
69+
"CLOUD_SQL_MSSQL_INSTANCE": "${user_config.cloud_sql_mssql_instance}",
70+
"CLOUD_SQL_MSSQL_DATABASE": "${user_config.cloud_sql_mssql_database}",
71+
"CLOUD_SQL_MSSQL_USER": "${user_config.cloud_sql_mssql_user}",
72+
"CLOUD_SQL_MSSQL_PASSWORD": "${user_config.cloud_sql_mssql_password}",
73+
"CLOUD_SQL_MSSQL_IP_TYPE": "${user_config.cloud_sql_mssql_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-mssql": {
4+
"command": "npx",
5+
"args": [
6+
"-y",
7+
"@toolbox-sdk/server@1.9.0",
8+
"--prebuilt",
9+
"cloud-sql-mssql",
10+
"--stdio"
11+
],
12+
"env_vars": [
13+
"CLOUD_SQL_MSSQL_PROJECT",
14+
"CLOUD_SQL_MSSQL_REGION",
15+
"CLOUD_SQL_MSSQL_INSTANCE",
16+
"CLOUD_SQL_MSSQL_DATABASE",
17+
"CLOUD_SQL_MSSQL_USER",
18+
"CLOUD_SQL_MSSQL_PASSWORD",
19+
"CLOUD_SQL_MSSQL_IP_TYPE"
20+
]
21+
}
22+
}
23+
}

.codex-plugin/plugin.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"sql-server",
1515
"database"
1616
],
17-
"skills": "./skills/",
1817
"interface": {
1918
"displayName": "Cloud SQL for SQL Server",
2019
"shortDescription": "Interact with CloudSQL for SQL Server 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-
}
31-
}
29+
},
30+
"mcpServers": "./.codex-plugin/.mcp.json"
31+
}

.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: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Cloud SQL for SQL Server Agent Skills
1+
# Cloud SQL for SQL Server
22

33
> [!NOTE]
44
> This extension is 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 SQL Server](https://cloud.google.com/sql/docs/sqlserver) 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-mssql` server as a plugin/extension to interact with [Cloud SQL for SQL Server](https://cloud.google.com/sql/docs/sqlserver) 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 S
1414

1515
## Table of Contents
1616

17-
- [Why Use Cloud SQL for SQL Server Agent Skills?](#why-use-cloud-sql-for-sql-server-agent-skills)
17+
- [Why Use Cloud SQL for SQL Server?](#why-use-cloud-sql-for-sql-server)
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 SQL Server Agent Skills?
32+
## Why Use Cloud SQL for SQL Server?
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:
@@ -75,7 +76,7 @@ Please keep these env vars handy during the installation process:
7576
7677
### Installation & Usage
7778

78-
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.
79+
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.
7980

8081
For the latest version, check the [releases page][releases].
8182

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

105106
#### Antigravity 2.0 (IDE)
106107

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

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

121112
```bash
122-
cp -R cloud-sql-sqlserver/skills/* ~/.gemini/antigravity/skills/
113+
agy plugin install https://github.com/gemini-cli-extensions/cloud-sql-sqlserver
123114
```
124115

125-
**3. Set env vars:**
116+
**2. Set env vars:**
126117
Set your environment vars as described in the [configuration section](#configuration).
127118

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

130121
#### Antigravity CLI
131122

@@ -160,8 +151,7 @@ claude
160151
/plugin install cloud-sql-sqlserver@claude-plugins-official
161152
```
162153

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

167157
<details>
@@ -189,23 +179,7 @@ codex plugin marketplace upgrade data-agent-kit
189179

190180
</details>
191181

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

211185
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:
@@ -235,14 +209,41 @@ Interact with Cloud SQL for SQL Server using natural language:
235209
- **Generate Code:**
236210
- "Generate a Python dataclass to represent the 'customers' table."
237211

238-
## Supported Skills
212+
## Available Tools
213+
214+
The tools come from MCP Toolbox's prebuilt `cloud-sql-mssql` server, grouped into toolsets:
215+
216+
- **admin** - Use these tools when you need to provision new Cloud SQL for SQL Server instances, create databases and users, and monitor the progress of long-running operations.
217+
- **data** - Use these tools when you need to explore the database schema and execute SQL queries to interact with your data.
218+
- **monitor** - Use these tools when you need to troubleshoot slow queries and analyze system-level PromQL metrics.
219+
- **lifecycle** - Use these tools when you need to manage the lifecycle and durability of your data, including creating backups, restoring from existing backups, and cloning instances for testing or migration.
220+
221+
For the full, up-to-date list, see the [`cloud-sql-mssql` prebuilt config](https://github.com/googleapis/mcp-toolbox/blob/main/internal/prebuiltconfigs/tools/cloud-sql-mssql.yaml)
222+
in the MCP Toolbox repository.
239223

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

242-
- [Cloud SQL for SQL Server Admin](./skills/cloud-sql-sqlserver-admin/SKILL.md) - Use these skills when you need to provision new Cloud SQL for SQL Server instances, create databases and users, clone existing environments, and monitor the progress of long-running operations.
243-
- [Cloud SQL for SQL Server Data](./skills/cloud-sql-sqlserver-data/SKILL.md) - Use these skills when you need to explore the database schema, execute SQL queries to interact with your data, and monitor system-level performance metrics using PromQL queries.
244-
- [Cloud SQL for SQL Server Lifecycle](./skills/cloud-sql-sqlserver-lifecycle/SKILL.md) - Use these skills when you need to manage the lifecycle and durability of your data, including creating backups, restoring from existing backups, and cloning instances for testing or migration.
245-
- [Cloud SQL for SQL Server Monitor](./skills/cloud-sql-sqlserver-monitor/SKILL.md) - Use these skills when you need to troubleshoot slow queries and analyze system-level PromQL metrics.
244+
The generated scripts call the toolbox through `npx`, so no binary download is needed.
245+
See [Generate Agent Skills](https://github.com/googleapis/mcp-toolbox#generate-agent-skills)
246+
in the MCP Toolbox repository.
246247

247248
## Additional Agent Skills
248249

gemini-extension.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
"name": "cloud-sql-sqlserver",
33
"version": "0.2.0",
44
"description": "Connect to Cloud SQL for SQL Server",
5+
"mcpServers": {
6+
"cloud-sql-mssql": {
7+
"command": "npx",
8+
"args": [
9+
"-y",
10+
"@toolbox-sdk/server@1.9.0",
11+
"--prebuilt",
12+
"cloud-sql-mssql",
13+
"--stdio"
14+
]
15+
}
16+
},
517
"contextFileName": "CLOUD-SQL-SQLSERVER.md",
618
"settings": [
719
{

0 commit comments

Comments
 (0)