The Google Developer Knowledge MCP server gives AI-powered development tools the ability to search Google's official developer documentation and retrieve information for Google's products such as Firebase, Google Cloud, Android, Maps, and more. By connecting your AI application straight to our official library of documentation, it ensures the code and guidance you receive are up-to-date and based on authoritative context.
After you set up the server, integrated tools can assist with requests such as:
Implementation guidance
- For example: What's the best way to implement push notifications using Firebase Cloud Messaging in an Android app?
Code generation and explanation
- For example: Search the Google documentation for a Python example to list all buckets in a Cloud Storage project.
Troubleshooting and debugging
- For example: Why is my Google Maps API key showing a 'For development purposes only' watermark?
Comparative analysis and summarization
- For example: Help me choose between Cloud Run and Cloud Functions for a new microservice. Create a Markdown table that compares key aspects like primary use case, concurrency, and pricing model.
MCP server capabilities
The Google Developer Knowledge MCP server provides the following tools to your AI application:
| Tool name | Description |
|---|---|
search_documents |
Searches Google's developer documentation (Firebase, Google Cloud, Android, Maps, and more) to find relevant pages and snippets for your query. Use get_document or batch_get_documents with the parent from search results to get full page content. |
get_document |
Gets the full content of a document using the parent from a search_documents result. |
batch_get_documents |
Gets the full content of multiple documents using parents from search_documents results. |
The search_documents tool divides documentation into smaller chunks of text
that are optimized for AI-powered search and retrieval. When you search, the
tool returns one or more document snippets that are relevant
to your query. If you need to view the full page content that surrounds a
snippet, use get_document or batch_get_documents with the parent provided
in search results to retrieve full page content.
Installation
The Google Developer Knowledge MCP server is a remote MCP server that uses the Developer Knowledge API to search and retrieve documentation. You can authenticate using either OAuth or an API key.
Authenticate using OAuth
This section guides you through the process of authenticating your AI application with the Developer Knowledge MCP server using OAuth.
Prerequisite: Set up the Google Cloud CLI
Before proceeding, make sure you have:
Step 1: Enable the Developer Knowledge API in a project
- Open the Developer Knowledge API page in the Google APIs library.
- Check that you have the correct project selected in which you intend to use the API.
- Click Enable. No specific IAM roles are required to enable or use the API.
Step 2: Enable the Developer Knowledge MCP server in a project
To enable the Developer Knowledge MCP server, run the following command, replacing PROJECT_ID with your Google Cloud project ID:
gcloud beta services mcp enable developerknowledge.googleapis.com --project=PROJECT_ID
If the Developer Knowledge service isn't enabled for your Google Cloud project, you'll be prompted to enable the service before enabling the remote MCP server.
As a security best practice, we recommend that you enable MCP servers only for the services required for your AI application to function.
Step 3: Choose your authentication method
The authentication method you choose depends on whether your AI assistant supports Application Default Credentials (ADC) using the gcloud CLI or requires a standalone OAuth Client ID. Assistants like Gemini CLI can use your existing Google Cloud login for a seamless setup, while others, such as Antigravity, require you to manually create and provide your own credentials to establish a secure connection.
Select the tab that corresponds to your specific AI assistant's setup requirements.
ADC
Connect your account
To grant the MCP server the ability to act on your behalf, run the following command, replacing PROJECT_ID with your Google Cloud project ID:
gcloud auth application-default login --project=PROJECT_IDWhen prompted, choose an account, then click Continue.
Configure your AI application
Once authenticated, the final step is to provide your AI application with the server configuration details. While the exact JSON structure varies by application, you can use the following example as a template.
To configure Gemini CLI or Gemini Code Assist, edit or create one of the following configuration files:
- In your project:
.gemini/settings.json - In your home directory:
~/.gemini/settings.json
{ "mcpServers": { "google-developer-knowledge": { "httpUrl": "https://developerknowledge.googleapis.com/mcp", "authProviderType": "google_credentials", "oauth": { "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "timeout": 30000, "headers": { "X-goog-user-project": "PROJECT_ID" } } } }To check whether the MCP server is working as expected, continue on to verify installation.
- In your project:
Manual Credentials
Configure the OAuth consent screen
Configure the project's OAuth consent screen and add yourself as a test user. If you've already completed this step for your Google Cloud project, skip to the next step.
- Open the Google Cloud console Auth overview page, and click Get started.
- Enter an App name, select your Support email, and click Next.
- Within Audience, select External, and click Next.
- Enter your email address within Contact information, and click Next.
- Review and agree to the Google API Services: User Data Policy, and then click Continue.
- Click Create.
Add test users
- In the Google Auth Platform, click Audience.
- Under Test users, click Add users.
- Enter your email address and any other authorized test users, then click Save.
Create an OAuth client
To authenticate as an end user and access user data in your app, you need to create an OAuth 2.0 Client IDs. A client ID is used to identify a single app to Google's OAuth servers.
- In the Google Auth Platform, click Clients.
- Click Create client.
- From the Application type selector, choose Desktop app.
- In the Name field, type a name for the credential. This name is only shown in the Google Cloud console.
- Click Create. The OAuth client created screen appears, showing your new Client ID and Client secret.
- Click OK. The newly created credential appears under OAuth 2.0 Client IDs.
- Click your newly created client ID. In the Client secrets section,
click the download icon to save the JSON file. You'll use the
client_idandclient_secretvalues in this file in a subsequent step.
Configure your AI application
Next, you need to provide your AI application with the server configuration details. While the exact series of steps varies by application, you can use the following example as a template.
To configure Antigravity to use the MCP server:
- In Antigravity, click the menu in the Agent pane > MCP Servers > Manage MCP Servers.
In the Manage MCPs pane that opens, click View raw config to edit the
mcp_config.jsonfile:{ "mcpServers": { "google-developer-knowledge": { "serverUrl": "https://developerknowledge.googleapis.com/mcp" } } }Return to Manage MCP servers and click Refresh.
Add OAuth credentials
The first time you attempt to use the Developer Knowledge MCP server, your AI assistant will prompt you to complete setup:
Ask the agent to use the Developer Knowledge MCP server with a prompt such as:
How do I list Cloud Storage buckets?If you see a message asking you to register one or more redirect URIs, click the option to proceed. Because you set up the client ID as a Desktop app, there's no need to add these specific URIs in the Google Auth Platform.
When your AI assistant prompts you for the Client ID and Client Secret, paste each corresponding key from the client secret JSON file you saved earlier.
When prompted, choose an account, then click Continue.
Return to your AI assistant. The agent will now process your request using the newly authenticated server.
Authenticate using an API key
This section guides you through the process of authenticating your AI application with the Developer Knowledge MCP server using an API key.
Step 1: Create an API key
You can generate a Developer Knowledge API key in your Google Cloud project using either the Google Cloud console or the gcloud CLI:
Google Cloud Console
Enable the API
- Open the Developer Knowledge API page in the Google APIs library.
- Check that you have the correct project selected in which you intend to use the API.
- Click Enable. No specific IAM roles are required to enable or use the API.
Create and secure the API key
- In the Google Cloud console for the project in which you enabled the API, go to the Credentials page.
- Click Create credentials, and then select API key from the menu. The API key created dialog displays the string for your newly created key.
- Click Edit API key.
- In the Name field, provide a name for the key.
- Under API restrictions, select Restrict key.
-
From the Select APIs list, enable Developer Knowledge API and click OK.
- Note: If you just enabled the Developer Knowledge API, there may be a delay before it appears in the Select APIs list.
- Click Save.
After the key is created, click Show key to view it. Make a note of it for use when configuring your AI application.
gcloud CLI
- If you haven't already, download and install the gcloud CLI.
Enable the Developer Knowledge API, replacing PROJECT_ID with your Google Cloud project ID:
gcloud services enable developerknowledge.googleapis.com --project=PROJECT_IDCreate an API key using the same Google Cloud project ID:
gcloud services api-keys create --project=PROJECT_ID --display-name="DK API Key"This command returns an API key string. Make a note of it for use when configuring your AI application.
Secure your API key by adding API key restrictions. For better security, restrict the API key to the Developer Knowledge API.
Step 2: Enable the Developer Knowledge MCP server in a project
To enable the Developer Knowledge MCP server in your Google Cloud project, download and install the gcloud CLI, and then run the following command, replacing PROJECT_ID with your Google Cloud project ID:
gcloud beta services mcp enable developerknowledge.googleapis.com --project=PROJECT_ID
If the Developer Knowledge service isn't enabled for your Google Cloud project, you'll be prompted to enable the service before enabling the remote MCP server.
As a security best practice, we recommend that you enable MCP servers only for the services required for your AI application to function.
Step 3: Configure your AI application
Configure popular AI applications using these instructions. Replace YOUR_API_KEY with the Developer Knowledge API key you generated in the previous step:
Gemini CLI
To configure Gemini CLI, run the following command:
gemini mcp add -t http -H "X-Goog-Api-Key: YOUR_API_KEY" google-developer-knowledge https://developerknowledge.googleapis.com/mcp --scope user
Alternatively, edit or create one of the following configuration files:
- In your project:
.gemini/settings.json - In your home directory:
~/.gemini/settings.json
{
"mcpServers": {
"google-developer-knowledge": {
"httpUrl": "https://developerknowledge.googleapis.com/mcp",
"headers": {
"X-Goog-Api-Key": "YOUR_API_KEY"
}
}
}
}
Gemini Code Assist
To configure Gemini Code Assist, edit or create one of the following configuration files:
- In your project:
.gemini/settings.json - In your home directory:
~/.gemini/settings.json
{
"mcpServers": {
"google-developer-knowledge": {
"httpUrl": "https://developerknowledge.googleapis.com/mcp",
"headers": {
"X-Goog-Api-Key": "YOUR_API_KEY"
}
}
}
}
Firebase Studio
To configure Firebase Studio,
edit or create the configuration file: .idx/mcp.json.
Note: If the file doesn't yet exist, create it by right-clicking the parent directory and selecting New file.
{
"mcpServers": {
"google-developer-knowledge": {
"url": "https://developerknowledge.googleapis.com/mcp",
"headers": {
"X-Goog-Api-Key": "YOUR_API_KEY"
}
}
}
}
Claude Code
To configure Claude Code, run the following command under your app folder.
claude mcp add google-dev-knowledge --transport http https://developerknowledge.googleapis.com/mcp --header "X-Goog-Api-Key: YOUR_API_KEY"
Cursor
To configure Cursor, edit either .cursor/mcp.json (for a specific project)
or ~/.cursor/mcp.json (for all projects).
{
"mcpServers": {
"google-developer-knowledge": {
"url": "https://developerknowledge.googleapis.com/mcp",
"headers": {
"X-Goog-Api-Key": "YOUR_API_KEY"
}
}
}
}
GitHub Copilot
To configure GitHub Copilot in VS Code for a single project, edit the
.vscode/mcp.json file in your workspace.
{
"servers": {
"google-developer-knowledge": {
"url": "https://developerknowledge.googleapis.com/mcp",
"headers": {
"X-Goog-Api-Key": "YOUR_API_KEY"
}
}
}
}
To make the server available in every project, edit your user settings. Click the Open Settings (JSON) button.
{
"mcp": {
"servers": {
"google-developer-knowledge": {
"url": "https://developerknowledge.googleapis.com/mcp",
"headers": {
"X-Goog-Api-Key": "YOUR_API_KEY"
}
}
}
}
}
Windsurf
To configure Windsurf Editor, edit the ~/.codeium/windsurf/mcp_config.json
file.
{
"mcpServers": {
"google-developer-knowledge": {
"url": "https://developerknowledge.googleapis.com/mcp",
"headers": {
"X-Goog-Api-Key": "YOUR_API_KEY"
}
}
}
}
Verify installation
Once configured, open your AI application and enter a prompt such as:
How do I list Cloud Storage buckets?
If you see a tool call to search_documents or another Developer Knowledge MCP server tool, the
server is working correctly.
Manage token usage
Retrieving document content–especially when using batch_get_documents–consumes
tokens within your AI application's context window. Because some Google
developer documentation pages are quite large, fetching multiple documents can
quickly lead to higher costs, slower model response times, and context window
overflow.
To optimize performance and avoid an unexpected bill, craft specific prompts that target only the information you need. Avoid broad requests (for example, "Compare all Firebase products") that force the agent to ingest massive amounts of data at once.
Included documentation
See Corpus reference for information about which documents are searched by the server.
Known limitations
- Content Scope: Only publicly visible pages on the Corpus reference are included. Content from other sources like GitHub, OSS sites, blogs, or YouTube is not included.
- English-only results: The server only supports results in English.
- Network-dependent: The server's tools rely on live Google Cloud services. If you experience persistent errors, check your internet connection and Developer Knowledge API key configuration.
Troubleshooting
If you encounter issues, verify the following:
- Your MCP configuration file for your AI tool is correctly formatted.
- If using the API authentication method, you used a valid Developer Knowledge API key in your configuration file that has the Developer Knowledge API enabled.
- You haven't exhausted your Developer Knowledge API quota.
Model Armor
If you are using
Model Armor
to protect your application, you might encounter 403 PERMISSION_DENIED errors
for some queries. Because the Developer Knowledge MCP server only returns public documentation from
trusted Google sources, we recommend setting Prompt Injection and Jailbreak
(PIJB) filters to HIGH_AND_ABOVE confidence levels to reduce false positives.
If your use case doesn't involve other tools that access private or sensitive
data, you can also consider disabling PIJB filters.