
How-Tos
How to set up Gemini API Docs MCP and Gemini API Skills
Connect a coding assistant to Google’s public Gemini Docs MCP server and Gemini API Skills so generated API code tracks current docs.
Searcher → Analyst → Writer → Editor · subagentic-20260923-2000
Coding assistants are strong at generating API code and weak at staying current. Training data cuts off on a date, so new Gemini API features never make it into the model’s memory. Without Gemini-specific documentation, agents also drift toward generic patterns instead of the SDK usage Google actually recommends.
The supported fix is not a bigger prompt. It is two complementary tools from the Gemini API coding-agents docs: the Gemini Docs MCP server and Gemini API Skills. You can run either on its own. They are designed to work together for complete coverage—live docs search plus baked-in rules about SDKs, model versions, and recommended patterns.
Connect the Gemini Docs MCP
Gemini hosts a public Model Context Protocol (MCP) server at https://gemini-api-docs-mcp.dev. Point your coding agent at that server so queries can reach the latest APIs, code updates, and configuration examples from official documentation.
Run this in the agent terminal or project root:
npx add-mcp "https://gemini-api-docs-mcp.dev"
The server adds a search_documentation function. Your agent can call it to pull real-time API definitions and integration patterns from the official Gemini documentation files, instead of guessing from cutoff training data.
Add API development skills
Skills put baked-in rules and best practices into the assistant’s context—enforcing the correct SDK and current model versions, for example. The skill is meant to work with Gemini Docs MCP: if both are installed, the skill uses the MCP service for documentation. If MCP is missing, it still fetches llms.txt from ai.google.dev as a fallback.
Install with one of the two supported tools. The docs recommend skills.sh (the open standard for portable agent behaviors) and also support Context7 if you already use that ecosystem.
gemini-api-dev
Use this skill to build apps with the Gemini API (Interactions API). The docs describe Interactions as the simplest and best way to build with Gemini models and agents. The skill covers:
- Text generation, multi-turn chat, and streaming
- Function calling, structured output, and image generation
- Background execution and Deep Research agents
- Server-side conversation state management
- Prompt routing to current models and avoiding deprecated models
- Python and TypeScript SDK patterns
Install with skills.sh:
npx skills add google-gemini/gemini-skills --skill gemini-api-dev --global
Install with Context7:
npx ctx7 skills install /google-gemini/gemini-skills gemini-api-dev
gemini-live-api-dev
Use this skill for real-time conversational apps on the Gemini Live API. It supplies documentation and best practices for:
- WebSocket connections for low-latency streaming
- Streaming audio, video, and text
- Voice activity detection and barge-in support
Install with skills.sh:
npx skills add google-gemini/gemini-skills --skill gemini-live-api-dev --global
Install with Context7:
npx ctx7 skills install /google-gemini/gemini-skills gemini-live-api-dev
Verify installation
After install, confirm the assistant can reach the Docs MCP server and that skills are actually loaded.
1. Verify agent behavior
The most reliable check is a technical question about the Gemini API.
Prompt: "How do I use context caching with the Gemini API?"
A successful setup will:
- Provide accurate code that references specific Gemini methods such as
cacheContentorcachedContents.createfrom the latest endpoints. - Use the MCP tool, showing a connection to the Gemini Docs MCP Server or use of
search_documentationto fetch data. - Invoke loaded skills, sometimes with an indicator such as "Using skill: gemini-api-dev" if a secondary wrapper is involved.
If the agent gives a general or generic answer, use the discovery or status commands for your environment to verify that the Docs MCP or skill is loaded into memory.
2. Verify manifestations and tools
Use the discovery or status commands for your environment:
| Environment | MCP verification | Skills verification |
|---|---|---|
| Claude Code | Type /mcp in the terminal to view active servers and search_documentation tools. |
Type /skills in the terminal to list all active manifests. |
| Cursor | Navigate to Settings > Features > MCP. Ensure the server is "Connected". | Open Settings > Rules. Verify the skill appears under "Agent Decides." |
| Antigravity | Check the Customizations > Connections sidebar for MCP status. | Type /skills list or check the Customizations > Rules sidebar. |
| Gemini CLI | Run gemini mcp list or use /mcp list. |
Run gemini skills list or use the /skills slash command in-session. |
| Copilot | Type @gemini /mcp to list active data connectors. |
Type @gemini /skills (or /skills) to view active extensions. |
Troubleshooting
If the agent stays generic or never names Gemini-specific methods, the docs call out two common failures.
Agent didn't discover the skill
Most agents index skills only on startup. A successful install that never shows up in /skills is often just a stale process.
Fix: Completely restart your IDE (Cursor/VS Code), or exit and re-open a terminal-based agent such as Claude Code.
Global vs. local conflict
A --global install can be ignored when the project already has local rules the agent prefers.
Fix: Install the skill into the project root without the global flag:
npx skills add google-gemini/gemini-skills --skill gemini-api-dev
Then confirm the skill itself loaded: look for a "Using skill: gemini-api-dev" indicator, or check /skills and the environment table above. That is a skills check, not an MCP check—do not treat a search_documentation trace as proof the conflict is resolved.
Ask your assistant that context-caching question next. Treat MCP and skills as separate pass conditions: MCP is confirmed when the agent connects to the Gemini Docs MCP server or uses search_documentation; skills are confirmed when you see a loaded-skill indicator such as "Using skill: gemini-api-dev" or the skill listed via /skills and the environment table. If the answer is still generic, run those environment checks, restart the agent, and retry. Keep the official coding-agents page open for Interactions API, libraries, and the skills listed there.