AI Studio MCP Server
Integrates with Google AI Studio / Gemini API to provide content generation capabilities with support for files, conversation history, and system prompts. Supports analysis of various file types including images, PDFs, and documents.
Supports processing JPEG images for visual content analysis and description.
Supports converting PDF documents to well-formatted Markdown, preserving structure, headings, lists, and formatting.
Requires Node.js 20.0.0 or higher as the runtime environment for the MCP server.
Uses npm for package installation and management, allowing easy installation via npx.
Allows processing SVG files as part of the content generation, enabling analysis and description of vector graphics.
Enables working with XML files for content analysis and processing as part of the generation capabilities.
Click on "Deploy 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., "@AI Studio MCP Serverconvert this PDF to markdown with a table of contents"
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.
AI Studio MCP Server
A Model Context Protocol (MCP) server that integrates with Google AI Studio / Gemini API, providing content generation capabilities with support for files, conversation history, and system prompts.
Installation and Usage
Prerequisites
Node.js 20.0.0 or higher
Google AI Studio API key
Using npx (Recommended)
GEMINI_API_KEY=your_api_key npx -y aistudio-mcp-serverLocal Installation
npm install -g aistudio-mcp-server
GEMINI_API_KEY=your_api_key aistudio-mcp-serverRelated MCP server: MCP Gemini Server
Configuration
Set your Google AI Studio API key as an environment variable:
export GEMINI_API_KEY=your_api_key_hereOptional Configuration
GEMINI_MODEL: Gemini model to use (default: gemini-2.5-flash)GEMINI_TIMEOUT: Request timeout in milliseconds (default: 300000 = 5 minutes)GEMINI_MAX_OUTPUT_TOKENS: Maximum output tokens (default: 8192)GEMINI_MAX_FILES: Maximum number of files per request (default: 10)GEMINI_MAX_TOTAL_FILE_SIZE: Maximum total file size in MB (default: 50)GEMINI_TEMPERATURE: Temperature for generation (0-2, default: 0.2)
Example:
export GEMINI_API_KEY=your_api_key_here
export GEMINI_MODEL=gemini-2.5-flash
export GEMINI_TIMEOUT=600000 # 10 minutes
export GEMINI_MAX_OUTPUT_TOKENS=16384 # More output tokens
export GEMINI_MAX_FILES=5 # Limit to 5 files per request
export GEMINI_MAX_TOTAL_FILE_SIZE=100 # 100MB limit
export GEMINI_TEMPERATURE=0.7 # More creative responsesAvailable Tools
generate_content
Generates content using Gemini with comprehensive support for files, conversation history, and system prompts. Supports various file types including images, PDFs, Office documents, and text files.
Parameters:
user_prompt(string, required): User prompt for generationsystem_prompt(string, optional): System prompt to guide AI behaviorfiles(array, optional): Array of files to include in generationEach file object must have either
pathorcontentpath(string): Path to filecontent(string): Base64 encoded file contenttype(string, optional): MIME type (auto-detected from file extension)
model(string, optional): Gemini model to use (default: gemini-2.5-flash)temperature(number, optional): Temperature for generation (0-2, default: 0.2). Lower values produce more focused responses, higher values more creative ones
Supported file types (Gemini 2.5 models):
Images: JPG, JPEG, PNG, GIF, WebP, SVG, BMP, TIFF
Video: MP4, AVI, MOV, WEBM, FLV, MPG, WMV (up to 10 files per request)
Audio: MP3, WAV, AIFF, AAC, OGG, FLAC (up to 15MB per file)
Documents: PDF (treated as images, one page = one image)
Text: TXT, MD, JSON, XML, CSV, HTML
File limitations:
Maximum file size: 15MB per audio/video/document file
Maximum total request size: 20MB (2GB when using Cloud Storage)
Video files: Up to 10 per request
PDF files follow image pricing (one page = one image)
Basic example:
{
"user_prompt": "Analyze this image and describe what you see",
"files": [
{
"path": "/path/to/image.jpg"
}
]
}PDF to Markdown conversion:
{
"user_prompt": "Convert this PDF to well-formatted Markdown, preserving structure and formatting. Return only the Markdown content.",
"files": [
{
"path": "/path/to/document.pdf"
}
]
}With system prompt:
{
"system_prompt": "You are a helpful document analyst specialized in technical documentation",
"user_prompt": "Please provide a detailed explanation of the authentication methods shown in this document",
"files": [
{"path": "/api-docs.pdf"}
]
}Multiple files example:
{
"user_prompt": "Compare these documents and images",
"files": [
{"path": "/document.pdf"},
{"path": "/chart.png"},
{"content": "base64encodedcontent", "type": "image/jpeg"}
]
}Common Use Cases
PDF to Markdown Conversion
To convert PDF files to Markdown format, use the generate_content tool with an appropriate prompt:
{
"user_prompt": "Convert this PDF to well-formatted Markdown, preserving structure, headings, lists, and formatting. Include table of contents if the document has sections.",
"files": [
{
"path": "/path/to/document.pdf"
}
]
}Image Analysis
Analyze images, charts, diagrams, or photos with detailed descriptions:
{
"system_prompt": "You are an expert image analyst. Provide detailed, accurate descriptions of visual content.",
"user_prompt": "Analyze this image and describe what you see. Include details about objects, people, text, colors, and composition.",
"files": [
{
"path": "/path/to/image.jpg"
}
]
}For screenshots or technical diagrams:
{
"user_prompt": "Describe this system architecture diagram. Explain the components and their relationships.",
"files": [
{
"path": "/architecture-diagram.png"
}
]
}Audio Transcription
Generate transcripts from audio files:
{
"system_prompt": "You are a professional transcription service. Provide accurate, well-formatted transcripts.",
"user_prompt": "Please transcribe this audio file. Include speaker identification if multiple speakers are present, and format it with proper punctuation and paragraphs.",
"files": [
{
"path": "/meeting-recording.mp3"
}
]
}For interview or meeting transcripts:
{
"user_prompt": "Transcribe this interview and provide a summary of key points discussed.",
"files": [
{
"path": "/interview.wav"
}
]
}MCP Client Configuration
Add this server to your MCP client configuration:
{
"mcpServers": {
"aistudio": {
"command": "npx",
"args": ["-y", "aistudio-mcp-server"],
"env": {
"GEMINI_API_KEY": "your_api_key_here",
"GEMINI_MODEL": "gemini-2.5-flash",
"GEMINI_TIMEOUT": "600000",
"GEMINI_MAX_OUTPUT_TOKENS": "16384",
"GEMINI_MAX_FILES": "10",
"GEMINI_MAX_TOTAL_FILE_SIZE": "50",
"GEMINI_TEMPERATURE": "0.2"
}
}
}
}Development
Setup
Make sure you have Node.js 20.0.0 or higher installed.
npm install
npm run buildRunning locally
GEMINI_API_KEY=your_api_key npm run devLicense
MIT
Available Tools
1 toolgenerate_contentA
Generate content using Gemini with optional file inputs, code execution, and Google search. Supports multiple files: images (JPG, PNG, GIF, WebP, SVG, BMP, TIFF), video (MP4, AVI, MOV, WebM, FLV, MPG, WMV), audio (MP3, WAV, AIFF, AAC, OGG, FLAC), documents (PDF), and text files (TXT, MD, JSON, XML, CSV, HTML). MIME type is auto-detected from file extension.
Example usage:
{
"user_prompt": "Analyze this video",
"files": [
{
"path": "/path/to/video.mp4"
}
]
}PDF to Markdown conversion:
{
"user_prompt": "Convert this PDF to well-formatted Markdown, preserving structure and formatting",
"files": [
{"path": "/document.pdf"}
]
}With Google Search:
{
"user_prompt": "What are the latest AI breakthroughs in 2024?",
"enable_google_search": true
}With Code Execution:
{
"user_prompt": "Write and run a Python script to calculate prime numbers up to 100",
"enable_code_execution": true
}Combining features with thinking mode:
{
"user_prompt": "Research quantum computing and create a Python simulation",
"model": "gemini-2.5-pro",
"enable_google_search": true,
"enable_code_execution": true,
"thinking_budget": -1
}| Name | Required | Description | Default |
|---|---|---|---|
| user_prompt | Yes | User prompt for generation | |
| system_prompt | No | System prompt to guide the AI behavior (optional) | |
| files | No | Array of files to include in generation (optional). Supports images, video, audio, PDFs, and text files. | |
| model | No | Gemini model to use (optional) | gemini-2.5-flash |
| temperature | No | Temperature for generation (0-2, default 0.2) | |
| enable_code_execution | No | Enable code execution capability for the model | |
| enable_google_search | No | Enable Google search capability for the model | |
| thinking_budget | No | Thinking budget for models that support thinking mode (-1 for unlimited) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by detailing capabilities (file support, code execution, Google search), file type specifics, and example workflows. It mentions auto-detection of MIME types and thinking budget usage. However, it omits critical behavioral traits like rate limits, authentication needs, or potential costs, which are important for a generative AI tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with a clear purpose statement, but it becomes lengthy due to multiple detailed examples. While examples are helpful, they occupy most of the text, making it less concise. Some sentences (like the file type list) could be more streamlined. It's informative but could be more efficiently structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (8 parameters, no output schema, no annotations), the description is moderately complete. It covers purpose, usage examples, and some behavioral context, but lacks details on output format, error handling, or limitations. Without annotations or output schema, more completeness is needed for a generative tool with multiple features.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all 8 parameters thoroughly. The description adds minimal parameter semantics beyond the schema—it mentions file type support and provides usage examples that illustrate parameter combinations. This meets the baseline of 3, as the schema does the heavy lifting, but the description doesn't significantly enhance understanding of parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generate content using Gemini with optional file inputs, code execution, and Google search.' It specifies the verb ('generate content') and resource ('using Gemini'), and lists key capabilities. However, with no sibling tools mentioned, it cannot demonstrate differentiation from alternatives, preventing a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for usage through multiple examples showing different scenarios (e.g., video analysis, PDF conversion, Google search, code execution). It implicitly guides when to use features like enable_google_search or enable_code_execution. However, it lacks explicit when-not-to-use guidance or comparisons to alternatives, as no sibling tools exist.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
- First observed
generate_content
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'generate_content' has a clearly defined and distinct purpose.
A single tool inherently has perfect naming consistency. The tool name 'generate_content' follows a clear verb_noun pattern and there are no other tools to create inconsistency.
A single tool for an 'AI Studio MCP Server' feels too thin for the apparent scope. The tool handles multiple complex features (content generation, file processing, search, code execution), suggesting these might be better exposed as separate tools for clarity and agent usability.
The server's domain appears to be AI content generation and processing, but with only one tool, the surface is severely incomplete. There are obvious gaps for operations like listing models, managing sessions, checking status, or handling errors—common needs in such a domain that would require separate tools.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA server implementing the Model Context Protocol that enables AI assistants like Claude to interact with Google's Gemini API for text generation, text analysis, and chat conversations.-
- AlicenseAqualityDmaintenanceA dedicated server that wraps Google's Gemini AI models in a Model Context Protocol (MCP) interface, allowing other LLMs and MCP-compatible systems to access Gemini's capabilities like content generation, function calling, chat, and file handling through standardized tools.1622 npm36MIT
- -licenseNot gradedqualityNot gradedmaintenanceA server that allows interaction with Google's Gemini AI through the Gemini CLI tool using the Model Context Protocol, providing a standardized interface for querying Gemini with various options and configurations.-
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables Claude Desktop and other MCP-compatible clients to leverage Google's Gemini AI models with features like thinking models, Google Search grounding, JSON mode, and vision support.632 npm14MIT