Introducing the Developer Knowledge API and MCP Server

Google is launching the Developer Knowledge API and MCP Server in public preview. This new toolset provides a canonical, machine-readable way for AI assistants and agentic platforms to search and retrieve up-to-date documentation across Firebase, Google Cloud, Android, and more. By using the official MCP server, developers can connect tools directly to Google’s documentation corpus, ensuring that AI-generated code and guidance are based on authoritative, real-time context.

Jess Kuras
3 min readintermediate
--
View Original

Overview

Google announces the public preview of the Developer Knowledge API and its associated Model Context Protocol (MCP) server, providing a canonical, machine-readable gateway to Google's official developer documentation. These tools allow AI assistants and developer tools to search and retrieve up-to-date documentation as Markdown, solving the challenge of LLMs relying on potentially outdated training data.

What You'll Learn

1

How to set up and configure Google's Developer Knowledge API and MCP server for AI-powered developer tools

2

Why providing LLMs with up-to-date documentation access improves AI-assisted development accuracy

3

How to connect the MCP server to your IDE or AI assistant for real-time Google documentation retrieval

4

What documentation sources are available through the Developer Knowledge API corpus

Prerequisites & Requirements

  • Google Cloud project with API key credentials
  • Google Cloud CLI (gcloud) installed
  • Basic understanding of APIs and how to configure API keys
  • Familiarity with Model Context Protocol (MCP) and AI assistant tool configuration(optional)

Key Questions Answered

What is Google's Developer Knowledge API and what problem does it solve?
The Developer Knowledge API is a programmatic source of truth for Google's public documentation. It solves the problem of AI tools relying on potentially outdated training data or fragile web-scraping by allowing developers to search and retrieve official Google developer documentation pages as Markdown, ensuring AI assistants have access to the most accurate and current information.
How do you set up the Google Developer Knowledge MCP server?
Setup involves three steps: First, generate and restrict an API key for the Developer Knowledge API in the Google Cloud Console Credentials page. Second, install the Google Cloud CLI and enable the MCP server using 'gcloud beta services mcp enable developerknowledge.googleapis.com --project=PROJECT_ID'. Third, configure your AI tool's configuration file (such as mcp_config.json or settings.json) following the official documentation.
What documentation sources does the Developer Knowledge API cover?
The API provides comprehensive coverage including documentation from firebase.google.com, developer.android.com, docs.cloud.google.com, and additional Google developer documentation sources. During the public preview, documentation is re-indexed within 24 hours of an update, ensuring tools stay current with the latest releases and API changes.
How does the MCP server improve AI-assisted development with Google technologies?
The MCP server connects to your IDE or AI assistant, giving it the ability to read Google's developer documentation in real-time. This enables more reliable implementation guidance (e.g., Firebase push notifications), troubleshooting (e.g., fixing Maps API errors), and comparative analysis (e.g., comparing Cloud Run vs Cloud Functions for specific use cases).
How fresh is the documentation in the Developer Knowledge API?
During the public preview, documentation is re-indexed within 24 hours of an update. This ensures that AI tools and assistants stay current with the latest releases, API changes, and best practices from Google's developer documentation, rather than relying on potentially months-old LLM training data.
What is the difference between the Developer Knowledge API and web scraping Google documentation?
The Developer Knowledge API provides a canonical, machine-readable gateway to Google's official documentation, returning content as clean Markdown. Unlike fragile web-scraping approaches that can break with site changes and may capture outdated content, the API offers reliable programmatic access with 24-hour re-indexing freshness and comprehensive search and retrieve capabilities.
What future improvements are planned for the Developer Knowledge API?
As the API moves toward general availability, Google plans to add support for structured content such as specific code sample objects and API reference entities. They will also expand the corpus to include more of Google's developer documentation and reduce re-indexing latency below the current 24-hour window.

Key Statistics & Figures

Documentation re-indexing latency
Within 24 hours
During public preview, documentation is re-indexed within 24 hours of an update

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

API
Developer Knowledge API
Programmatic source of truth for Google's public developer documentation
Protocol
Model Context Protocol (mcp)
Open standard enabling AI assistants to safely access external data sources
CLI Tool
Google Cloud CLI (gcloud)
Used to enable the MCP server for the Developer Knowledge API
Platform
Firebase
One of the documentation sources covered by the API
Platform
Android
One of the documentation sources covered via developer.android.com
Cloud Platform
Google Cloud
One of the documentation sources covered via docs.cloud.google.com
Agentic Platform
Antigravity
Referenced as an example AI-powered agentic development platform
CLI Tool
Gemini CLI
Referenced as an example AI-powered command-line interface
Format
Markdown
Output format for retrieved documentation content

Key Actionable Insights

1
Set up the Developer Knowledge MCP server in your IDE to give AI assistants access to current Google documentation. This eliminates the risk of AI tools generating code based on outdated APIs or deprecated features, which is especially important for fast-moving platforms like Firebase and Android.
The MCP server is compatible with a wide range of popular AI assistants and tools, making it a low-friction integration for most development environments.
2
Use the API's search and retrieve pattern to build documentation-aware tooling in your agentic workflows. First search for relevant documentation pages and snippets, then retrieve the full Markdown content for detailed context, enabling more accurate code generation and troubleshooting.
This two-step approach is particularly valuable for agentic platforms like Antigravity and command-line tools like Gemini CLI that need accurate context for code generation.
3
Generate a dedicated, restricted API key specifically for the Developer Knowledge API rather than reusing existing keys. This follows security best practices and allows you to track usage and manage access independently from other Google Cloud API integrations.
API keys can be generated and restricted within the Credentials page of your Google Cloud project, and the restriction ensures the key only works with the Developer Knowledge API.
4
Plan for future structured content support when designing integrations with the Developer Knowledge API. While the current preview focuses on unstructured Markdown, Google plans to add structured content like code sample objects and API reference entities, so building flexible parsers now will ease future migration.
Designing your integration to handle both Markdown and future structured formats will reduce refactoring work when general availability launches with expanded capabilities.
5
Leverage the API for troubleshooting workflows by querying specific error messages against Google's documentation. AI assistants connected via MCP can look up error codes like ApiNotActivatedMapError directly in official docs, providing authoritative fix instructions rather than potentially outdated Stack Overflow answers.
This is particularly valuable for Google Maps, Firebase, and Google Cloud APIs where error messages map directly to documented troubleshooting steps.

Common Pitfalls

1
Relying on LLM training data for Google developer documentation instead of using the Developer Knowledge API. LLMs are only as good as the context they are given, and training data can be months or years out of date, leading to incorrect API usage, deprecated method calls, or missed new features.
The Developer Knowledge API re-indexes within 24 hours, ensuring your AI tools always reference the latest documentation rather than stale training data.
2
Using fragile web-scraping to access Google's developer documentation instead of the official API. Web scraping is prone to breaking when site structures change and may not capture content accurately or completely, leading to unreliable AI tool behavior.
The Developer Knowledge API provides a canonical, machine-readable gateway with proper search and retrieve capabilities designed specifically for programmatic access.
3
Expecting structured content like typed API reference objects or code sample entities from the current preview release. The public preview focuses on unstructured Markdown only, and structured content support is planned for the general availability release.
Design your integrations to work with Markdown content for now and plan to adapt when structured content support is added in future releases.

Related Concepts

Model Context Protocol (mcp)
Llm Context Augmentation
Retrieval-augmented Generation (rag)
Agentic Development Platforms
Ai-assisted Coding
Developer Documentation Management
API Key Management
Google Cloud Project Configuration