Integrate Google Chat using AI assistance

Streamline your Google Chat apps and Google Chat API development by pairing AI coding tools with official Chat documentation, machine-readable Markdown indexes, and Model Context Protocol (MCP) servers.

This guide explains how to ground your AI coding assistant in up-to-date Chat developer documentation using the Developer Knowledge API and curated Markdown endpoints, and how to connect the Chat MCP server to read and act on Chat resources.

Why use AI assistance with official documentation?

General-purpose AI models can confuse deprecated Chat card formats, mix up user and app OAuth scopes, or rely on outdated API schemas. Grounding your AI assistant with official Google developer tools solves these challenges:

  • Official documentation grounding: by connecting to the Developer Knowledge API or referencing the curated Chat llms.txt index, your agent verifies Cards v2 syntax, authentication scopes, and webhook payloads against current documentation.
  • Reduced token overhead: instead of scraping full HTML pages, your agent fetches compact Markdown snippets and .md.txt guides tailored for language models.
  • Fewer hallucinations: grounded agents check official REST, gRPC, and MCP schemas on developers.google.com before generating code.
  • Actionable execution: combine documentation search with the Chat MCP server and the gcloud command-line tool so your agent can enable APIs, inspect spaces, and test messages on your behalf.

The Chat AI toolkit

Depending on your workflow, you can equip your AI coding assistant with four complementary layers of support:

  1. Documentation search (Developer Knowledge MCP server): connects your assistant to live Google developer documentation across supported domains, including developers.google.com.
  2. Machine-readable documentation (llms.txt and .md.txt): gives coding agents, prompt files, and research tools direct plain-text indexes and per-page Markdown for Chat.
  3. Documentation search skills: provides reusable instructions that teach compatible coding agents when and how to query official Google developer documentation.
  4. Google Workspace actions (Chat MCP server): allows authorized AI applications to list spaces, search messages, and send messages through https://chatmcp.googleapis.com/mcp/v1.

Supported AI coding clients

You can use these tools with AI coding assistants and research environments that support MCP servers, HTTP Markdown fetching, or agent skills, including:

  • Google Antigravity
  • Cursor
  • Visual Studio Code (with MCP-compatible extensions)
  • Claude Code
  • Google AI Studio and NotebookLM

Step-by-step setup guide

Follow these steps to configure your AI coding assistant for Chat development.

Step 1: Install documentation search skills

To help your AI coding assistant search official Chat documentation, install the Developer Knowledge documentation search skill.

In compatible coding clients, prompt your assistant to install the skill:

Install the official Google Developer Knowledge documentation search skill
into this workspace.

If you prefer to install the skill manually from your terminal, run:

npx skills add google/skills --skill retrieving-developer-knowledge

Step 2: Connect the Developer Knowledge MCP server

The Developer Knowledge MCP server is a remote HTTP MCP server at https://developerknowledge.googleapis.com/mcp that lets your coding assistant query current documentation from developers.google.com using the search_documents, get_documents, and answer_query tools.

Before you connect, create an API key restricted to the Developer Knowledge API. If you use Antigravity, you can install the server from the built-in MCP store and authenticate with your Google credentials.

AI-assisted setup

Ask your coding assistant to add the MCP server to your client configuration:

Add the Google Developer Knowledge MCP server
(https://developerknowledge.googleapis.com/mcp) to my MCP configuration,
using the X-Goog-Api-Key header with my API key.

Manual configuration

To configure the server manually, add the following entry to your client's MCP configuration file (for example, .cursor/mcp.json or .vscode/mcp.json), replacing YOUR_API_KEY with your API key:

{
  "mcpServers": {
    "google-developer-knowledge": {
      "url": "https://developerknowledge.googleapis.com/mcp",
      "headers": {
        "X-Goog-Api-Key": "YOUR_API_KEY"
      }
    }
  }
}

Some clients use a different key for the server URL (for example, serverUrl in Antigravity). For client-specific instructions, see Connect to the Developer Knowledge MCP server.

Step 3: Connect the Chat MCP server

If you want your AI assistant to interact directly with Chat conversations—such as listing memberships, searching messages, or sending test messages—enable chat.googleapis.com and chatmcp.googleapis.com in your Google Cloud project and connect to the remote endpoint at https://chatmcp.googleapis.com/mcp/v1.

For OAuth credential setup and client configuration steps, see Configure the Chat MCP server.

Ground your agent with machine-readable documentation

If your tool doesn't use MCP servers, or if you maintain project instruction files such as AGENTS.md or CLAUDE.md, point your assistant directly to Chat's machine-readable documentation endpoints:

  • Curated documentation index (llms.txt): use the Chat llms.txt index (https://developers.google.com/workspace/chat/llms.txt) for a compact map of Chat guides, REST and gRPC references, MCP tools, and key API guardrails (such as using cardsV2 instead of deprecated cards, and choosing between app and user OAuth scopes).
  • Full documentation bundle (llms-full.txt): load the Chat llms-full.txt corpus (https://developers.google.com/workspace/chat/llms-full.txt) into large-context tools such as Google AI Studio or NotebookLM when you want all Chat guides and the reference directory in a single file.
  • Per-page Markdown (.md.txt and Accept: text/markdown): append .md.txt to any Chat documentation URL (for example, https://developers.google.com/workspace/chat/create-messages.md.txt), click Copy page at the top of a page, or open its menu and select View as Markdown. Agents that send Accept: text/markdown receive Markdown automatically on canonical URLs.

For example, you can add the following block to your repository's AGENTS.md or CLAUDE.md file:

## Google Chat API documentation

- Start from https://developers.google.com/workspace/chat/llms.txt to locate
  relevant guides, REST/gRPC schemas, and Chat MCP tool references.
- Fetch individual pages as Markdown by appending `.md.txt` (or sending
  `Accept: text/markdown`).
- Always use Cards v2 (`Message.cardsV2`), never deprecated Cards v1.

Recommended prompting workflows

Combine official documentation lookup with specific implementation goals so your agent verifies schemas before writing code.

Effective prompt patterns

  • Specify the documentation domain: ask your assistant to check official Chat documentation before generating payloads or OAuth code.
    • Example: "Search official Chat docs on developers.google.com for app authentication in a Chat app, then configure credentials in my Python service."
  • Verify card and interaction schemas first: have your agent confirm Cards v2 widget fields before editing UI handlers.
    • Example: "Check /workspace/chat/create-messages and the Cards v2 reference for interactive button click payloads, summarize the JSON structure, and add an approval card to bot.js."
  • Pair documentation with Chat MCP actions: combine documentation lookup with live MCP tool calls to verify and test.
    • Example: "Look up the Chat message formatting rules in official docs, then use send_message to post a formatted release summary to my test space."

General iterative workflow

  1. Research: ask your agent to search official Chat documentation or read /workspace/chat/llms.txt for the feature you want to build.
  2. Plan: have the agent propose an architecture, OAuth scope selection, and file plan based on the retrieved documentation.
  3. Execute: let the agent generate code, install client libraries, or run gcloud setup commands.
  4. Verify: ask the agent to check its card JSON and API calls against official Chat API references and run local tests.

Next steps