Google AI Studio MCP Server
Exposes Google AI Studio models (Gemini, Imagen, Veo) as MCP tools for text generation, image generation, and video generation, integrating with code editors and LLM clients.
README
Google AI Studio MCP Server
A universal, open-source Model Context Protocol (MCP) server that exposes the granular features of Google AI Studio (Gemini, Imagen, Veo) directly to your code editors and local LLM clients.
Features
- Full Model Support: Use any Google AI Studio model your API key has access to (e.g.,
gemini-2.5-pro,gemini-2.5-flash). - Granular Imagen Controls: Control Aspect Ratio, Number of Images, Output Format, and Person Generation settings.
- Veo Video Generation: Built-in support for Veo (requires approved API key).
- Cross-Editor Compatibility: Works out of the box with VS Code, Cursor, Cloud Code, Claude Desktop, and local Ollama clients.
Important Limitations & Versioning
- Music Generation is NOT supported: Music generation models (like Lyria or MusicFX) are currently locked behind Google's web UI and private Vertex endpoints. They are not exposed via the standard developer API.
- Model Versioning (
-latestvs Hardcoding): For Text and Multimodal models (like Flash and Pro), you can pass the-latestaliases (e.g.,gemini-flash-latest,gemini-pro-latest). This ensures the server naturally pulls updated models without breaking when older versions are deprecated. Note that older families such asgemini-1.5-*have been retired and may 404 on newer keys.- CRITICAL EXCEPTION: Video models (Veo) do not support the
-latestsuffix. If Veo video generation stalls out or throws a "Model Not Found" error, you must manually update the hardcoded numerical string in the source code (e.g., bump fromveo-3.1-generate-previewtoveo-4.0-generate-001).
- CRITICAL EXCEPTION: Video models (Veo) do not support the
Installation
Prerequisites
- Node.js (v18+)
- A Google AI Studio API Key
Setup
- Clone this repository:
git clone https://github.com/yourusername/google-ai-studio-mcp.git cd google-ai-studio-mcp - Install dependencies:
npm install - Build the server:
npm run build
Note: For security, do not use a .env file. You will inject your API key directly into your editor's MCP configuration as shown below.
Configuration
Inject your API key directly into your editor's protected global MCP configuration file.
Antigravity / Cloud Code
Use the following JSON snippet in your mcp_config.json:
"google-ai-studio": {
"command": "node",
"args": ["C:/GitHub/google-ai-studio-mcp/dist/index.js"],
"env": {
"GEMINI_API_KEY": "YOUR_ACTUAL_API_KEY"
}
}
Cursor / VS Code
Add to your settings:
{
"mcp.servers": {
"google-ai-studio": {
"command": "node",
"args": ["/path/to/google-ai-studio-mcp/dist/index.js"]
}
}
}
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"google-ai-studio": {
"command": "node",
"args": ["/path/to/google-ai-studio-mcp/dist/index.js"]
}
}
}
Tools Exposed
googleaistudio_generate_content: Text generation with full parameter support (Temperature, System Instructions, Thinking Level).googleaistudio_generate_image: Image generation (Imagen) with Aspect Ratio, Number of Images, MIME Type, and Person Generation controls. Returns a native inline image plus the saved file path(s).googleaistudio_start_video: Starts a Veo video generation and immediately returns an Operation ID (non-blocking, avoids MCP execution timeouts).googleaistudio_check_video: Polls an Operation ID; when generation is done it downloads the MP4 to disk and returns the path. Poll every 30–60 seconds. Polling is durable — the Operation ID can be re-checked even after a server restart.googleaistudio_manage_outputs: File management tool to prevent hard drive bloat in a local AI Outputs directory. Actions:clear_all,clear_older_than_two_weeks,get_folder_path(subdirectories are skipped, not deleted).
Where media is saved: saveDirectory & artifactDirectory
Media tools take an explicit, AI-supplied absolute path so generated assets land exactly where you want them:
saveDirectory(required ongenerate_image/check_video,targetDirectoryonmanage_outputs): the absolute local directory to save the file into. The directory is created if it doesn't exist. E.g.C:\Users\Name\Downloadsor a project repo folder.artifactDirectory(optional): the current conversation's brain/artifact directory, e.g.<appDataDir>\brain\<conversation-id>. When provided, the MCP writes a second copy of the media there so the host chat UI (e.g. Antigravity's Artifact renderer, which only renders files physically inside the brain directory) can display it inline. Images are also returned as a native MCPimageblock; videos rely on this copy since MCP has no native video block.
Rule of thumb for agents: pass saveDirectory for the durable/project copy, and pass artifactDirectory (your conversation's brain dir) whenever you want the user to see the media inline in chat.
Development: Dual-Environment Build & Deploy
This server is developed in the public repo but mounted by the local agent from its config directory, so changes must be built and copied across:
- Edit source in the GitHub repo (e.g.
C:\GitHub\google-ai-studio-mcp). npm run build.- Force-copy the built
dist/into the active agent config path (e.g.C:\Users\<you>\.gemini\config\google-ai-studio-mcp). - Hard-restart the MCP server so the agent re-mounts the updated tools.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.