Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ Before you begin, ensure you have the following:
* Cloud SQL Viewer (`roles/cloudsql.viewer`)
* Cloud SQL Admin (`roles/cloudsql.admin`)

## Installation
## Getting Started

### Installation

To install the extension, use the command:

```bash
gemini extensions install https://github.com/gemini-cli-extensions/cloud-sql-sqlserver
```

## Configuration
### Configuration

Set the following environment variables before starting the Gemini CLI.
This configuration is not required if utilizing the [Admin toolset](#supported-tools).
Expand All @@ -50,6 +52,19 @@ Ensure [Application Default Credentials](https://cloud.google.com/docs/authentic
> [!NOTE]
> When using private IPs with Cloud SQL for SQL Server, you must use a Virtual Private Cloud (VPC) network.

### Start Gemini CLI

To start the Gemini CLI, use the following command:

```bash
gemini
```

> [!WARNING]
> **Changing Instance & Database Connections**
> Currently, the database connection must be configured before starting the Gemini CLI and can not be changed during a session.
> To save and resume conversation history use command: `/chat save <tag>` and `/chat resume <tag>`.

## Usage Examples

Interact with Cloud SQL for SQL Server using natural language:
Expand Down Expand Up @@ -85,4 +100,6 @@ Find additional extensions to support your entire software development lifecycle

## Troubleshooting

* "cannot execute binary file": Ensure the correct binary for your OS/Architecture has been downloaded. See [Installing the server](https://googleapis.github.io/genai-toolbox/getting-started/introduction/#installing-the-server) 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 /Users/<USER>/.gemini/extensions/cloud-sql-sqlserver/toolbox ENOENT": The Toolbox binary did not download correctly. Ensure you are using Gemini CLI v0.6.0+.
* "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://googleapis.github.io/genai-toolbox/getting-started/introduction/#installing-the-server) for more information.
6 changes: 3 additions & 3 deletions gemini-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"version": "0.1.0",
"description": "Connect to Cloud SQL for SQL Server",
"mcpServers": {
"Cloud SQL for SQL Server Admin": {
"cloud_sql_sqlserver_admin": {
"command": "${extensionPath}${/}toolbox",
"args": [
"--prebuilt",
"cloud-sql-mssql-admin",
"--stdio"
]
},
"Cloud SQL for SQL Server": {
"cloud_sql_sqlserver": {
"command": "${extensionPath}${/}toolbox",
"args": [
"--prebuilt",
Expand All @@ -29,4 +29,4 @@
}
},
"contextFileName": "CLOUD-SQL-SQLSERVER.md"
}
}