Google Developer Knowledge MCP server in Google Antigravity 2.0, IDE, and/or CLI

1. Introduction

Google Developer Knowledge is the canonical, machine-readable source of Google's public developer documentation. It's programmatically accessible via Application Programming Interface (API) and Model Context Protocol (MCP) so that developers can integrate it into applications and workflows.

Instead of relying on outdated LLM training data or manual web scraping, AI agent developers should use it for real-time access to the most accurate documentation and reduce risk of hallucinations.

In this codelab, you will learn how to install and use the Developer Knowledge MCP from Antigravity 2.0, IDE, and/or CLI. MCP is an open standard that enables AI models to securely use tools provided by remote servers. You will set up Antigravity to interact with the knowledge base without writing any code!

dk_mcp_antigravity.png

What you'll do

  • Enable the Developer Knowledge API in your Google Cloud project.
  • Configure Antigravity to access the Developer Knowledge MCP.
  • Test the integration with a few prompts.

What you'll need

  • A web browser such as Chrome
  • A Google Cloud project (billing is not required).
  • Antigravity 2.0, IDE, and/or CLI installed on your local machine. You can find more detail and installation guidance from the official website.

Explore more MCPs and tools

In this codelab we only cover a few basic examples of what can be done using the Google Developer Knowledge MCP server. To see the full list of Google MCP servers and tools available, refer to the Supported Products.

Easy access to this codelab

qr_code.png

2. Configure Cloud project

Create or Select a Google Cloud project

In the Google Cloud Console, select or create a Google Cloud project.

Enable the API

To use the Developer Knowledge MCP server, you must enable the standard Developer Knowledge API.

Create the API key

To use the Developer Knowledge MCP server, you must use an API key. In the Google Cloud Console, do the following:

  1. Go to APIs & Services > Credentials.

  1. Click + Create credentials, then select API key from the menu.
  2. Set Name with an arbitrary name such as Antigravity.
  3. Click the Select API restrictions drop-down, type Developer Knowledge API, check the result, then click OK.

create_api_key.png

  1. Click Create.
  2. Your API key is now displayed on the confirmation screen. Copy it to your clipboard, you'll need it to configure Antigravity in the next steps.

copy_api_key.png

3. Configure Antigravity

Now let's configure Antigravity to use the MCP endpoint. If you don't have Antigravity 2.0, IDE, and/or CLI installed, follow the instructions on the Antigravity website.

Add custom MCP servers

Antigravity 2.0, IDE, and CLI share a central MCP configuration in the file ~/.gemini/config/mcp_config.json.

  1. Open it in your preferred text editor.
  2. Modify it with the following custom MCP server configuration. Before doing so, replace the <YOUR_API_KEY> placeholder with the API key you created in the previous steps:
{
  "mcpServers": {
    "google-developer-knowledge": {
      "headers": {
        "X-Goog-Api-Key": "<YOUR_API_KEY>"
      },
      "serverUrl": "https://developerknowledge.googleapis.com/mcp"
    }
    ...
  }
  ...
}
  1. Save it.

mcp_config.png

Validate

You should see the MCP server that you configured as installed in Antigravity: google-developer-knowledge.

Antigravity 2.0

  1. Click Settings at the bottom left.
  2. Navigate to Customizations.
  3. Under Installed MCP Servers, click Refresh.

configured_mcp_server_20.png

Antigravity IDE

  1. Open Antigravity User Settings via the Editor-Specific settings menu dropdown at the top of the window.

open_user_settings_ide.png

  1. Navigate to Customizations.
  2. Under Installed MCP Servers, click Refresh.

configured_mcp_server_ide.png

Antigravity CLI

  1. Start the CLI executing the command agy from a terminal.
  2. Type /mcp and press enter.

configured_mcp_server_cli.png

4. Access Developer Knowledge

Now you can interact with Google Developer Knowledge using natural language. Here are some example prompts:

  • Based on the Google Developer Knowledge, does Google Workspace support MCP servers?
  • Give me a list of the Google Workspace and Cloud Run API names. Make it super short.
  • Based on the Google Developer Knowledge, create a new Python script to upload a file to Google Drive

Antigravity 2.0

20_test.png

Antigravity IDE

ide_test.png

Antigravity CLI

cli_test.png

5. Clean up

To clean up your Google Cloud project without deleting it, you can disable the Developer Knowledge API you enabled and delete the API key you created:

  1. In the Google Cloud Console, go to the API & Services Dashboard.
  2. Click Developer Knowledge API then Disable API.
  3. In the Google Cloud Console, go to API & Services > Credentials.
  4. Select the API key, click Delete then Delete to confirm.

6. Congratulations

Congratulations! You have successfully configured and tested the Google Developer Knowledge MCP server using Antigravity.

Reference docs