Google Antigravity Setup Guide
After setup, you can operate CloudBase services directly from Google Antigravity’s AI chat.
Examples:
- "Build a WeChat Mini Program ordering system with CloudBase" — AI scaffolds pages, creates the cloud database, writes cloud functions, and guides preview
- "Build a reservation management system that lets users place orders and admins update status" — AI models it with CloudBase PostgreSQL, configures permissions, and wires up frontend and backend
- "Add phone-number login to a Web app" — AI enables the auth method and integrates the CloudBase SDK
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 on the domestic site can start for free.
Remote needs only a URL — your client walks you through browser authorization, so no keys land in config files.
Configure your AI tool to connect with CloudBase capabilities. Supports local and remote connection. See connection modes.
Step 1: Install / Configure CloudBase
Or add this configuration to .agent/rules/:
1{2 "mcpServers": {3 "cloudbase": {4 "type": "http",5 "url": "https://tcb-api.cloud.tencent.com/mcp/v1"6 }7 }8}Step 2: Chat with AI
Enter the following in your AI chat in order:
Read https://docs.cloudbase.net/skill.md and tell me what it can doUse CloudBase Skills: 介绍小程序云开发的核心概念和使用方法Setup
Option 1: Use the template (recommended)
This automatically configures MCP and rule files:
npx @cloudbase/cloudbase-mcp downloadTemplate --template rules --ide antigravity
Option 2: Configure manually
-
Create rules directory
Create
.agent/rules/under your project root:mkdir -p .agent/rules -
Configure MCP server
Create
.mcp.jsonunder the project root and add:{"mcpServers": {"cloudbase": {"command": "npx","args": ["@cloudbase/cloudbase-mcp@latest"],"env": {"INTEGRATION_IDE": "Antigravity"}}}} -
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)
- Manual: mention via
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