
Using MCP with Google Cloud databases
As you carry out AI-assisted tasks like code generation, code refactoring, code completion, automated testing, and documentation writing using AI-native IDEs like Claude Code, Cursor, Windsurf or established IDEs such as VSCode, you’re probably looking for the most efficient way to connect with your data. Let’s see how this can be done with MCP Toolbox and Google Cloud databases.
Toolbox’s new pre-built tools enable you to integrate with Cloud SQL, AlloyDB, Spanner, and BigQuery, or with your self-managed PostgreSQL database, all directly within your preferred IDE. And since every application manages data in some capacity, Toolbox’s new capabilities unlock new opportunities to automate the software development process.
AI-assisted development connected to your database
Let’s see how a developer uses these new tools to accelerate their work:
Sara has recently joined a development team that maintains an e-commerce application. She has access to the source code and the Google Cloud SQL for PostgreSQL development database. She uses Cline, an open source AI assistant that can be integrated with the VS Code IDE. Sara quickly sets up Toolbox and connects it to Cline and the database.
Next, Sara explores the database to understand how the information is structured and how it can be queried. She doesn’t need to know the SQL syntax or remember the nuances of PostgresSQL. Cline can handle this for her, looking up metadata about the database and then seamlessly connecting to it to run the queries. Sara can simply ask questions in plain english and Cline can bring her answers.
Until now, she had to write complex SQL queries and remember specific table schemas just to get answers – for example if she wants to find the last three orders, she needs to know the correct table and write a SQL query like SELECT * and if she needs to know how many open orders there are that include product type and purchase date, she needs to write another SQL query that joins the orders table with the items table and so you can see that soon the SQL queries get more complex.
Now, she can use these simple natural language prompts and AI can handle the rest for her.
NL prompts
Source Credit: https://cloud.google.com/blog/products/ai-machine-learning/new-mcp-integrations-to-google-cloud-databases/