Google AI Studio MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google AI Studio MCP ServerGenerate an image of a serene lake at sunset"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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).
Related MCP server: NotebookLM MCP Server
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-mcpInstall dependencies:
npm installBuild 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.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceExposes litmedia.ai text-to-image and image-to-video generation tools via MCP, enabling AI agents to generate images and videos directly from prompts.Last updated1MIT
- Alicense-qualityCmaintenanceExposes Google NotebookLM as MCP tools, enabling management of notebooks, sources, chat, artifacts, and research via natural language.Last updated2MIT
- Alicense-qualityDmaintenanceIntegrates Google's Gemini API with MCP-compatible clients for chat, real-time web search, knowledge queries, code/text analysis, and content generation.Last updated91MIT
- Alicense-qualityCmaintenanceMCP server for Google's Gemini API, enabling text, image, video, speech, embeddings, and deep research capabilities through a single tool set.Last updatedMIT
Related MCP Connectors
MCP server for Google Veo AI video generation
OCR, transcription, file extraction, and image generation for AI agents via MCP.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/akeelbuilds/google-ai-studio-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server