Google Developer Knowledge MCP Server: Claude Code Setup

Google finished moving its Developer Knowledge service into general availability on July 17, 2026. Search and full-page retrieval had been GA since April 16; AnswerQuery—added on April 20—was the last tool to graduate. The Google Developer Knowledge MCP server puts all three inside Claude Code, where they can interrupt the ancient AI ritual of inventing a plausible Firebase option and hoping nobody runs it.

This is not an intelligence upgrade. It is an evidence upgrade. In this tutorial, you’ll connect the remote server, verify that Claude Code actually uses it, and build a retrieval workflow that doesn’t bury the model under 14 documentation pages because you asked a six-word question.

What the Google Developer Knowledge MCP server actually does

Google’s July 17 release notes moved the grounded AnswerQuery endpoint to general availability. The remote MCP server wraps that capability with search and retrieval tools at https://developerknowledge.googleapis.com/mcp.

ToolUse it whenWhat comes back
search_documentsYou need the right page or snippetMatching chunks, source URLs, and parent document names
get_documentsA snippet lacks enough contextFull Markdown for as many as 20 named documents
answer_queryYou need a synthesized answerGrounded text plus the documents used as references

The distinction matters. Search identifies candidate sources, retrieval spends context on selected pages, and synthesis answers across them. Collapse all three into one step and a useful documentation tool becomes a context-window confetti cannon.

Prerequisites: a project, a restricted key, and Claude Code

You need a Google Cloud project, permission to enable an API and create credentials, the gcloud CLI or Cloud Console, and Claude Code. If you’re still choosing an agent, PulseMark’s AI coding assistant comparison covers the broader tradeoffs; Google also publishes configurations for Cursor, GitHub Copilot, and Windsurf.

  • Project: Know the Google Cloud project ID you want billed and governed.
  • Credential: Create a separate API key and restrict it to the Developer Knowledge API.
  • Local tool: Install and authenticate gcloud, then confirm Claude Code runs in your terminal.
  • Storage rule: Keep the key out of Git, screenshots, issue tickets, and shared MCP configuration.

The Developer Knowledge API quickstart says no special IAM role is required to enable or use the API. Since March 17, 2026, enabling that API also enables its MCP server automatically. One switch, two interfaces—an unusually merciful piece of cloud ergonomics.

How to connect the Google Developer Knowledge MCP server to Claude Code

1. Enable the API and create the key

Set your project ID, enable the service, and create a dedicated key. These commands follow Google’s official MCP setup guide.

export DK_PROJECT_ID="your-google-cloud-project-id"

gcloud services enable developerknowledge.googleapis.com \
  --project="$DK_PROJECT_ID"

gcloud services api-keys create \
  --project="$DK_PROJECT_ID" \
  --display-name="Developer Knowledge MCP"

The creation response contains two values that look similar but do different jobs. keyString is the secret Claude Code sends with requests. name is the key resource identifier—something like projects/PROJECT_NUMBER/locations/global/keys/KEY_ID—used to manage and restrict the key.

export DK_KEY_NAME="projects/PROJECT_NUMBER/locations/global/keys/KEY_ID"

gcloud services api-keys update "$DK_KEY_NAME" \
  --api-target=service=developerknowledge.googleapis.com

Do not skip the restriction because the server is read-only documentation. Credentials have a habit of acquiring more permissions later, usually five minutes after someone says, “It’s only a test key.”

2. Add the remote server

Google’s documented Claude Code command sends the key in an X-Goog-Api-Key header. Reading it into a temporary shell variable keeps the literal secret out of your command history:

read -rsp "Developer Knowledge API key: " DK_API_KEY

claude mcp add google-dev-knowledge \
  --transport http \
  https://developerknowledge.googleapis.com/mcp \
  --header "X-Goog-Api-Key: $DK_API_KEY"

unset DK_API_KEY

Run the command from the application folder where you want the integration. Claude Code stores the server configuration; the shell variable disappears after unset. For a more specialized example of connecting Google data to an assistant, see our guide to Google services through skills and MCP.

Three-stage AI documentation workflow for search, retrieval, and grounded answers

Test the connection—and make the tools earn their tokens

Open Claude Code and ask a question whose answer is easy to verify but likely to drift over time:

Use Google Developer Knowledge to find the current gcloud command
for creating a Cloud Storage bucket in us-central1.

Search the official documentation first. Return the source URL,
the exact command, and any required flags. Say what remains uncertain.

A working connection should trigger search_documents or another Developer Knowledge tool. Inspect the source URI rather than merely admiring the confident answer. The MCP tool reference lists three tools, their inputs, and the official documentation domains included in the corpus.

For harder questions, use a three-step rhythm:

  1. Search narrowly. Include the product, task, language, and version-sensitive detail.
  2. Retrieve selectively. Fetch the one or two parent documents that actually resolve the question.
  3. Synthesize last. Ask answer_query to reconcile pages only when comparison or interpretation adds value.

That pattern also fits larger agent systems. Our Google ADK multi-agent tutorial shows where a documentation-retrieval specialist can sit inside a broader workflow.

If you’re building an application instead of configuring an editor, call the stable REST endpoint directly:

export DEVELOPERKNOWLEDGE_API_KEY="your-restricted-api-key"

curl -X POST \
  "https://developerknowledge.googleapis.com/v1:answerQuery?key=$DEVELOPERKNOWLEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"What is the current command to create a BigQuery dataset?"}'

Common failure modes

Most setup failures are less mysterious than the acronym pile suggests. Check the credential, service, and tool call in that order:

SymptomLikely causeNext check
Authentication or permission errorThe key is invalid, restricted to the wrong API, or the service is disabledConfirm the project, key restriction, and API status
429 from answer_queryThe synthesized-answer quota is exhaustedUse search_documents, then retrieve the relevant source
Claude answers without a tool callThe server is not loaded or the prompt did not request official retrievalRestart the session and explicitly name Google Developer Knowledge
A slow, bloated responseThe query pulled too many broad documentsAdd product, language, task, and version constraints

Do not use a polished answer as the health check. The successful signal is visible retrieval: a tool call, a relevant official source URI, and an answer that distinguishes documentation from inference. If the agent cannot show those three things, you have autocomplete with better stationery.

Where official grounding still breaks

“Official” describes the publisher, not the completeness of the corpus. Google says the server searches listed public documentation in English. It does not include private documentation, GitHub, open-source project sites, blogs, or YouTube. A new SDK behavior documented only in a repository issue can therefore remain invisible to an assistant that consults this server perfectly.

Full-page retrieval has another cost. One get_documents call can fetch up to 20 pages, but large Markdown documents consume model context, add latency, and can crowd out the code you wanted help with. Maximum retrieval is a limit, not a recommendation.

Google’s MCP security guidance also recommends reviewing enabled tools, limiting access, and protecting sensitive data. For this setup, the practical rules are simple:

  • Restrict the API key to developerknowledge.googleapis.com.
  • Review the MCP tools available to the assistant instead of approving new capabilities on autopilot.
  • Never put credentials or private customer data into documentation-search prompts.

The unresolved question is whether official-doc retrieval measurably reduces wrong code or merely moves failures from stale model memory to gaps in the corpus. A grounded coding assistant is not one that knows more; it is one that can show receipts. The next corpus-domain expansion in Google’s Developer Knowledge release notes will show whether the service is becoming a complete developer layer or staying an excellent Google-only specialist.

Get the Daily Pulse

Sharp analysis on what's actually moving in AI. No hype, no filler, no weekly digest.

Get the Daily Pulse

Sharp AI analysis, daily. Two minutes, every morning.

Get the Daily PulseTwo minutes, every morning