Skip to main content

Google Antigravity Setup Guide

After setup, you can operate CloudBase services directly from Google Antigravity’s AI chat.

Examples:

  • "Create a users collection" - AI creates database collections automatically
  • "Deploy this function" - AI uploads and configures cloud functions
  • "Deploy the frontend to CDN" - AI uploads files and configures hosting

No need to switch to the Cloud console — you can do everything in Antigravity with natural language.

Prerequisites

Before you start, make sure you have:

Node.js and a CloudBase environment ready

Node.js: Install Node.js v18.15.0 or later:

node --version

If you don’t have it installed, download it from the Node.js website.

CloudBase environment: See Create a CloudBase environment. New users can start for free.


Client

Configure your AI tool to connect with CloudBase capabilities. Supports local and hosted connection. See connection modes.

Step 1: Install / Configure CloudBase

Use project template (recommended) - Template includes MCP configuration and AI rulesView templates

Or add this configuration to .agent/rules/:

json
1{
2 "mcpServers": {
3 "cloudbase": {
4 "command": "npx",
5 "args": ["@cloudbase/cloudbase-mcp@latest"],
6 "env": {
7 "INTEGRATION_IDE": "Antigravity"
8 }
9 }
10 }
11}

Step 2: Chat with AI

Enter the following in your AI chat in order:

prompt
Install CloudBase Skills: run npx skills add tencentcloudbase/cloudbase-skills -y
Use CloudBase Skills: 创建一个使用 CloudBase 文档数据库的小程序应用

Setup

This automatically configures MCP and rule files:

npx @cloudbase/cloudbase-mcp downloadTemplate --template rules --ide antigravity

Option 2: Configure manually

  1. Create rules directory

    Create .agent/rules/ under your project root:

    mkdir -p .agent/rules
  2. Configure MCP server

    Create .mcp.json under the project root and add:

    {
    "mcpServers": {
    "cloudbase": {
    "command": "npx",
    "args": ["@cloudbase/cloudbase-mcp@latest"],
    "env": {
    "INTEGRATION_IDE": "Antigravity"
    }
    }
    }
    }
  3. Add rules

    Copy CloudBase rule files into .agent/rules/.

    Rule activation methods:

    • Manual: mention via @ to load
    • Always On: always apply
    • Model Decision: model decides based on natural language
    • Glob: apply rules when file path matches a glob (e.g. .js, src/**/*.ts)

Verify

After setup, in Antigravity’s AI chat, type:

Check if CloudBase tools are available

If successful, the AI should be able to access and use CloudBase tools.

FAQ

Q: MCP connection failed?

A: Check the config format, restart Antigravity, and confirm your network.

Q: Rules don’t take effect?

A: Check rule activation settings and ensure files are under .agent/rules/.

Q: Tool count shows 0?

A: See the FAQ.

More: FAQ

相关资源