Building with the Developer Knowledge API and Antigravity CLI — CoPilot Blog
    Neura MarketNeura Market/CoPilot
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityCoPilotCoPilot
    DeepSeekDeepSeekStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsBlogVideosGuidesCoursesCommunityPluginsTrendingGenerate
    CoPilotBlogBuilding with the Developer Knowledge API and Antigravity CLI
    Back to Blog
    Building with the Developer Knowledge API and Antigravity CLI
    googlecloud

    Building with the Developer Knowledge API and Antigravity CLI

    xbill June 8, 2026
    0 views

    Enabling The Developer API support with MCP to streamline Google Cloud Development ...

    --- title: Building with the Developer Knowledge API and Antigravity CLI published: true series: agy date: 2026-06-08 17:14:59 UTC tags: googlecloud,mcps,antigravitycli,agents canonical_url: https://medium.com/google-cloud/building-with-the-developer-knowledge-api-and-antigravity-cli-36ef94901108 --- #### Enabling The Developer API support with MCP to streamline Google Cloud Development ![](https://cdn-images-1.medium.com/max/1024/1*hn00K4FuxTvfA6hyPG-A1A.jpeg) #### Deja Vu — What is Old is New! This paper is a re-visiting of the original Developer Knowedge API installation with Gemini CLI: [Coding with Gemini CLI and the Developer Knowledge API](https://medium.com/google-cloud/coding-with-gemini-cli-and-the-developer-knowledge-api-006503eceb8e) #### What is this Tutorial Trying to Do? The goal of the tutorial is to use Antigravity CLI as a MCP client for secure access to the MCP enabled Developer Knowledge API to enhance the quality of the context window. #### What is the Developer Knowledge API? The **Developer Knowledge API** is a service provided by Google that offers programmatic, machine-readable access to Google’s public developer documentation. Announced in February 2026, it is specifically designed to provide current and authoritative documentation to AI-powered development tools and workflows, ensuring they have access to the latest information. Announcement details are available here: [Introducing the Developer Knowledge API and MCP Server](https://developers.googleblog.com/introducing-the-developer-knowledge-api-and-mcp-server/) #### So how does this Secret Sauce work? Hold the Pickles? Hold the Lettuce? The Developer Knowledge MCP server is an online real-time tool that can work directly with Antigravity CLI. Conceptually- the MCP server provides access to a single source of truth for Google Products and Documentation. The full product page is available here: [Developer Knowledge API | Google for Developers](https://developers.google.com/knowledge/api) #### So what else can it do? Does it slice? Does it dice? There are few initial setup steps to enable the MCP server. A good starting point is here: [Connect to the Developer Knowledge MCP server | Google for Developers](https://developers.google.com/knowledge/mcp#gcloud-cli) #### Initial Environment Setup The environment is meant to be run from a Bash like shell. You can run this from a Linux VM, ChromeOS Linux VM, Firebase Studio environment, or any environment that provides a basic shell. #### Google Cloud CLI The Google Cloud CLI provides direct access to Cloud Tools from your local environment. The basic setup instructions are here: [Quickstart: Install the Google Cloud CLI | Google Cloud SDK | Google Cloud Documentation](https://docs.cloud.google.com/sdk/docs/install-sdk) #### Antigravity CLI Antigravity CLI is the follow-on successor to Gemini CLI- the terminal driven, agent assisted coding tool. Full details on installing Antigravity CLI are here: [Getting Started with Antigravity CLI](https://medium.com/google-cloud/getting-started-with-antigravity-cli-26c5da90951f) #### Testing the Antigravity CLI Environment Once you have all the tools in place- you can test the startup of Antigravity CLI. You will need to authenticate with a Google Cloud Project or your Google Account: ```plaintext agy ``` This will start the interface: ![](https://cdn-images-1.medium.com/max/1024/1*lqIZz4wq1OG2KfDHUiEhcQ.png) #### Show me some Skills! A deeper dive for Agent skills is available in this codelab: [How to use AI Agent Skills (with Antigravity CLI and Agent Skills for Firebase) | Google Codelabs](https://codelabs.developers.google.com/antigravity/how-to-create-agent-skills-for-antigravity-cli#0) #### Clone the Repo and Get the Sample Scripts Now that the Antigravity CLI has been validated from the base shell — you can clone the GitHub Repo with support scripts: ```shell cd ~ git clone https://github.com/xbill9/knowledge-api-agy ``` Then run **init.sh** from the cloned directory. The script will attempt to determine your shell environment and set the correct variables: ```shell cd knowledge-api-agy source init.sh ``` If your session times out or you need to re-authenticate- you can run the **set\_env.sh** script to reset your environment variables: ```shell cd knowledge-api-agy source set_env.sh ``` Variables like PROJECT\_ID need to be setup for use in the various scripts- so the set\_env script can be used to reset the environment if you time-out. #### What Did I just Do!? The basic environment setup is done in the init.sh script. This script enables the APIS, generates an API key and sets environment variables. You can use Antigravity CLI to validate: ```plaintext > what does @[init.sh] do? ● Read(/root/knowledge-api-agy/init.sh) (ctrl+o to expand) ▸ Thought for 1s, 504 tokens Initiating Project Identification The init.sh script is the main setup utility used to configure a Google Cloud Project for the Google Developer Knowledge MCP server. Here is a breakdown of what the script does step-by-step: 1. Sets the GCP Project ID: Prompts you for a Google Cloud project ID (defaulting to the contents of ~/project_id.txt if it exists) and saves it back to that file. 2. Sources Environment Variables: Runs source ./set_env.sh to configure the active project environment and sets the default compute region to us-central1 . 3. Enables Required APIs: Automatically enables the necessary Google Cloud services: • Vertex AI ( aiplatform.googleapis.com ) • Compute Engine ( compute.googleapis.com ) • Developer Knowledge API ( developerknowledge.googleapis.com ) • API Keys API ( apikeys.googleapis.com ) 4. Enables the MCP Server: Runs the gcloud beta services mcp enable command for the Developer Knowledge service. 5. Configures the API Key: • Searches for or creates a dedicated API key named "DK API Key" . • Restricts the API key specifically to the Developer Knowledge API ( developerknowledge.googleapis.com ) for security. • Retrieves the raw API key string and exports it as DK_API_KEY . 6. Updates Local Configuration: Generates/updates the mcp_config.json file with the server URLs and authenticates headers using the newly generated key. 7. Performs Environment & Credential Checks: Identifies whether the script is running in Cloud Shell, on a VM, or locally. If running locally and Application Default Credentials (ADC) are not set, it prompts you to log in via gcloud auth application-default login . ``` After initial setup- the **set\_env.sh** refreshes the variables: ```plaintext > what does @[set_env.sh] do? • Searches for or creates a dedicated API key named "DK API Key" . ● Read(/root/knowledge-api-agy/set_env.sh) (ctrl+o to expand) The set_env.sh helper script exports common Google Cloud environment variables to your current shell session. It is designed to be sourced (i.e. source ./set_env.sh ). Here is a summary of what the script does: 1. Checks Authentication: Verifies that your gcloud CLI is logged in. If not, it warns you to run gcloud auth login and exits early. 2. Configures the GCP Project: Reads the project ID from your project file (default: ~/project_id.txt ) and sets it as your active gcloud project. 3. Exports Core Google Cloud Variables: • PROJECT_ID & GOOGLE_CLOUD_PROJECT : The ID of your GCP Project. • PROJECT_NUMBER : The numeric ID of your GCP Project. • SERVICE_ACCOUNT_NAME : The default Compute Engine service account name for the project. • GOOGLE_CLOUD_LOCATION & REGION : The deployment region (defaults to us-central1 ). 4. Exports Application & Auth Tokens: • ID_TOKEN : Generates a Google identity token using gcloud auth print-identity-token . • GOOGLE_GENAI_USE_VERTEXAI : Set to "TRUE" to route Google GenAI SDK calls through Vertex AI. • SHORT_SHA : The current short git commit hash (or "none" if outside a git repo) for versioning/tagging builds. • DK_API_KEY : Fetches and exports the restricted API key string for the Developer Knowledge API if the key exists. ``` #### How does Antigravity CLI use this? The Developer Knowledge API is built in to the local **.agents/mcp\_config.json** : ```json { "mcpServers": { "google-dev-knowledge": { "httpUrl": "https://developerknowledge.googleapis.com/mcp", "serverUrl": "https://developerknowledge.googleapis.com/mcp", "headers": { "X-Goog-Api-Key": "$DK_API_KEY" } } } } ``` #### That was a lot of Setup! What next? After your base environment has been configured- fire up Antigravity CLI to verify access to the Knowledge API MCP server: ![](https://cdn-images-1.medium.com/max/1024/1*tKANbqC0_RteQ-FU3ORI6g.png) The API server exposes standard MCP tools: ```plaintext /mcp list MCP Servers Plugins (~/.gemini/antigravity-cli/plugins) > ✓ google-dev-knowledge Tools: search_documents, answer_query, get_documents Keyboard: ↑/↓ Navigate enter Actions ``` #### Put this thing to Work! Once the MCP server is available — it can be used directly with the current context in Antigravity CLI: ```shell > use the developer knowledge API - what are the gcloud commands to create a google cloud bucket? ● ListDir(/root/.gemini/antigravity-cli/mcp/google-dev-knowledge) ● Read(/root/.gemini/antigravity-cli/mcp/google-dev-knowledge/answer_query.json) ● google-dev-knowledge/answer_query(Answer query with knowledge API) (ctrl+o to expand) MCP ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── answer_query (server: google-dev-knowledge) Do you want to proceed? 1. Yes 2. Yes, and always allow 'google-dev-knowledge/answer_query' in this conversation > 3. Yes, and always allow 'google-dev-knowledge/answer_query' (Persist to settings.json) 4. No 5. No, and always deny 'google-dev-knowledge/answer_query' in this conversation 6. No, and always deny 'google-dev-knowledge/answer_query' (Persist to settings.json) According to the official Google Developer Knowledge API, here are the gcloud commands and options for creating a Google Cloud Storage bucket: ### 1. Basic Bucket Creation To create a standard bucket with a globally unique name and uniform bucket-level access (recommended for security): gcloud storage buckets create gs://BUCKET_NAME/ --uniform-bucket-level-access • BUCKET_NAME : Must be globally unique and contain only lowercase letters, numbers, dashes ( - ), underscores ( _ ), and dots ( . ). ────── ### 2. Advanced Creation Options You can configure location, default storage class, and specialized features by appending flags: • Specify Location: Set where the bucket's data is stored (e.g., US , us-east1 ): gcloud storage buckets create gs://BUCKET_NAME --location=BUCKET_LOCATION • Enable Hierarchical Namespace: Enables structured folders (cannot be enabled after creation). This also requires enabling uniform bucket-level access: gcloud storage buckets create gs://BUCKET_NAME --location=BUCKET_LOCATION --uniform-bucket-level-access -- enable-hierarchical-namespace • Specify Storage Class: Set the default class (e.g., STANDARD , NEARLINE , COLDLINE , ARCHIVE ): gcloud storage buckets create gs://BUCKET_NAME --default-storage-class=STORAGE_CLASS • Zonal Storage: For zonal-specific placements: gcloud storage buckets create gs://BUCKET_NAME --location=BUCKET_LOCATION --placement=BUCKET_ZONE --default- storage-class=RAPID --enable-hierarchical-namespace --uniform-bucket-level-access • Explicit Project Scoping: Link the bucket to a specific project: gcloud storage buckets create gs://BUCKET_NAME --project=PROJECT_ID ────── ### Common Flags Reference Flag | Description -----------------------------------|----------------------------------------------------------------------------- --location | The geographic region or multi-region. --uniform-bucket-level-access | Uniformly manages permissions at the bucket level (security best practice). --enable-hierarchical-namespace | Enables true directory/folder layouts (immutable after creation). --default-storage-class | Sets the default storage tier for uploaded files. --project | Targets a specific Google Cloud project. ``` the Knowledge API MCP server can even get a bit Meta! ```plaintext > what is the Google Developer Knowledge API? ● google-dev-knowledge/answer_query(Query Developer Knowledge API) (ctrl+o to expand) According to the Google Developer Knowledge API (retrieved directly via the API itself), it is a programmatic interface providing machine-readable access to Google's official public developer documentation. It acts as the canonical source to integrate Google's technical documentation into third-party tools, IDEs, and AI workflows. ### Key Capabilities • Search: Find relevant page URIs and content snippets based on queries. • Retrieve: Fetch full developer documentation pages structured in Markdown format. • Grounded Generation: Synthesize answers to technical questions that are directly grounded in Google's official docs (preventing hallucinations). ────── ### Scope of the Corpus The API covers a broad range of Google developer domains: • Google Cloud: GCP services ( docs.cloud.google.com ), Firebase, and Apigee. • Platforms & Languages: Android, Chrome, Go, TensorFlow, and Web.dev. • Developer APIs: Google AI ( ai.google.dev ), Gemini, Ads, Search, Maps, and YouTube. • Data Freshness: The index is updated every 24 to 48 hours to ensure documentation is always current. ────── ### Integration and Access • API Endpoint: developerknowledge.googleapis.com • Authentication: Uses Google Cloud API Keys (restricted to the Developer Knowledge API) or OAuth credentials. • Model Context Protocol (MCP): It supports MCP, enabling AI agents and LLMs to interact with Google's documentation as a tool to assist developers with troubleshooting, code generation, and finding best practices. ``` #### Summary The Developer Knowledge API server was configured in a local environment. A sample setup script —  **init.sh** was provided to provide the local development environment with the necessary system variables and APIS to interact with the remote server securely via MCP. This connection was tested and validated with the local copy of Antigravity CLI. Several Google Cloud specific questions were presented and Antigravity CLI used the MCP server to enhance the information in the current context. * * *

    Tags

    googlecloudmcpsantigravitycliagents

    Comments

    More Blog

    View all
    Minimalist EKS: The Easy Waykubernetes

    Minimalist EKS: The Easy Way

    Amazon EKS manages the Kubernetes control plane, but you remain responsible for provisioning the...

    J
    Joaquin Menchaca
    Never forget to enter the Stern Grove lottery again!ai

    Never forget to enter the Stern Grove lottery again!

    Browser automation with Playwright, Python, GitHub Actions, and Entire to auto-enter San Francisco Stern Grove concert lotteries each week!

    L
    Lizzie Siegle
    A Free Screenshot Editor That Never Uploads Your Imagetypescript

    A Free Screenshot Editor That Never Uploads Your Image

    A free screenshot and image editor that runs entirely in your browser. Keeping every edit reversible and handling big phone photos, in plain TypeScript and Canvas2D.

    M
    Martin Stark
    I built a CLI to break my highlights out of Apple Booksshowdev

    I built a CLI to break my highlights out of Apple Books

    A macOS CLI + MCP server that exports Apple Books highlights to Markdown and gives AI assistants direct access to your reading notes.

    A
    Andrey Korchak
    A Developer's Guide to Agent Hooks in Antigravity CLIai

    A Developer's Guide to Agent Hooks in Antigravity CLI

    Motivation To be quite honest, "Hooks"—the shell commands we trigger at specific points...

    T
    Tanaike
    Tactical vs. Strategic Agentic AI Development — A Playbook for Developersagents

    Tactical vs. Strategic Agentic AI Development — A Playbook for Developers

    The Strategic Engineer: Why Writing Code Is No Longer Your Most Valuable Skill ...

    A
    Adewumi Saheed Adewale

    Stay up to date

    Get the latest CoPilot prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for CoPilot and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.