![[Gemini CLI] Google Developer Knowledge API and MCP Server: Equipping Your AI Assistant with an Official Knowledge Base](https://media2.dev.to/dynamic/image/width=1000,height=500,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0bt1aabdr4t9a8x05txf.png)
References: Introducing the Developer Knowledge API and MCP server Google Knowledge MCP...

References:
Remember last week when I was integrating the Gemini API using the Gemini CLI, and it confidently told me, "This is how you use this API parameter." But after running it, I got a bunch of errors. It turned out that Google had changed the API format three months ago. This isn't the AI's fault; its training data cutoff date is what it is. Faced with ever-changing technical documentation, even the strongest models will "become outdated."
Typical scenarios we've encountered in the past:
Developer: "Gemini, help me write an example of Gemini Function Calling"
AI: "Okay, you can write it like this..." [Generates code based on June 2024 documentation]
Developer: [Copy and paste, execute]
Terminal: ❌ Error: Parameter 'tools' format has changed in v2
Developer: 😤 "I have to go look at the official documentation again..."
Are you familiar with this cycle? Even Gemini 1.5 Pro sometimes gives outdated suggestions because its own API updates too quickly. AI's knowledge is static, but technical documentation is dynamic, and this contradiction has always troubled us.
To completely solve this problem, Google released two major killer tools in early 2025:
This means that your AI assistant is no longer just "remembering" how to write code, but can actively "consult the latest official documentation" when needed, becoming a development expert truly guaranteed by the official source and never outdated.
Traditionally, AI models learn documents by crawling web pages. But this method has several fatal problems:
❌ Noise Interference
<!-- Actual content seen by AI -->
<nav>...</nav> <!-- Navigation bar -->
<ad>...</ad> <!-- Advertisement -->
<cookie-banner>...</cookie-banner> <!-- Cookie prompt -->
<div class="content">
<!-- The real document content only accounts for 30% -->
This is how to use the Gemini API...
</div>
<footer>...</footer> <!-- Footer -->
AI has to "guess" from this pile of HTML which is the real document content.
❌ Inconsistent Formatting
<code> tags, some use <pre>alt, title, or figcaption❌ Update Delay
Developer Knowledge API completely changes the game, it provides:
ai.google.devdeveloper.android.comdeveloper.chrome.comdevelopers.home.google.comdevelopers.google.comdocs.cloud.google.comdocs.apigee.comfirebase.google.comfuchsia.devweb.devwww.tensorflow.orgModel Context Protocol (MCP) is an open standard, which is like an "add-on slot" for AI tools. Google's Knowledge MCP Server, launched this time, allows various tools that support MCP (such as Claude Code, Cursor, and even our favorite Gemini CLI) to easily integrate.
Through this MCP Server, AI no longer just writes code from memory, but can "consult the books" for specific questions:
If you are interested in MCP applications in a specific field, I also shared in a previous article Google Maps Platform Assist MCP: Let AI help you write more accurate map applications, which is also a very powerful tool that can give AI assistants an advantage when developing map features.
To enable AI assistants to read official documentation, we need to complete some simple preparations in Google Cloud.
For security, it is recommended to restrict the key:
Dev-Knowledge-Key).After creation, click "Show Key" and write it down, this is the credential we will use next.

If you are using Claude Code or Gemini CLI, you can now make it stronger with a simple configuration.
You only need to add Google's MCP Server address to the settings and include your API Key:
# Add Google Developer Knowledge MCP Server
gemini mcp add -t http -H "X-Goog-Api-Key: YOUR_API_KEY" google-developer-knowledge https://developerknowledge.googleapis.com/mcp --scope user
Once the configuration is complete, when you ask "how to use the latest Gemini API for Function Calling", the AI will actively call the MCP Server to retrieve the most accurate and up-to-date document content from the official website to answer you.
The launch of this technology marks two major shifts in the development process:
From "relying on memory" to "real-time query" In the past, we pursued making the model bigger and remembering more things. Now, we let the model learn to "look up information" through MCP. This not only greatly reduces hallucinations, but also reduces the pressure on the model to retrain frequently.
More powerful development agents (AI Agents) When AI assistants can read documents, execute instructions, and perform version control, they truly evolve into "digital colleagues" who can handle tasks independently. The structured information provided by the Developer Knowledge API is the fuel that AI Agents need to perform complex reasoning.
This time, Google not only provides powerful models, but also provides excellent "data interfaces". For developers who pursue efficiency, configuring the Developer Knowledge MCP Server is definitely worth the 5 minutes of investment.
In the future, when writing code, the AI assistant is no longer just a machine that can write code, but a technical consultant who is always consulting the latest official documentation and giving you the most accurate advice. Why not apply for an API Key and try it out?
See you next time!
aiEvery developer tool follows the same pattern: parse flags, run logic, print output. git commit -m...
dockerAPT repositories are just HTTP file servers, doesn't seem like something that should require a custom piece of software.
opensourceWe wanted every employee in the company to use OpenClaw — not just engineers. Product managers...
azurefabricLeveraging Gemini CLI and the underlying Gemini LLM to build Model Context Protocol (MCP) AI...
googlecloudplatformLeveraging Gemini CLI and the underlying Gemini LLM to build Model Context Protocol (MCP) AI...
iacLeveraging Gemini CLI and the underlying Gemini LLM to build Model Context Protocol (MCP) AI...
Workflows from the Neura Market marketplace related to this Grok resource