Aistudio MCP Server

MCP Server for Google AI Studio / Gemini API integration with file processing support

Local serverstdio

What is the Aistudio MCP server?

If you want an AI assistant working directly with Aistudio, the aistudio mcp server is the bridge. MCP Server for Google AI Studio / Gemini API integration with file processing support.

What Aistudio does

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.

Tools it exposes

Once connected, the assistant can call these 3 tools directly:

  • Prerequisites — The Prerequisites tool exposed by this server
  • generate_content — Generates content using Gemini with comprehensive support for files, conversation history, and system prompts. Supports various file types including images
  • Setup — The Setup tool exposed by this server

Installing the aistudio mcp server

The server is distributed via npm as aistudio-mcp-server, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

Before the server will start you need to supply 7 environment variables: GEMINI_API_KEY, GEMINI_MODEL, GEMINI_TIMEOUT, GEMINI_MAX_OUTPUT_TOKENS, GEMINI_MAX_FILES, GEMINI_MAX_TOTAL_FILE_SIZE, GEMINI_TEMPERATURE. Keep credentials in your client's env block or a secrets manager rather than committing them.

Requirements

  • Node.js 20.0.0 or higher - Google AI Studio API key

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Aistudio sits in that group, and the shape of its toolset — Prerequisites, generate_content, Setup — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • Maintained by eternnoir.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the aistudio mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
PrerequisitesThe Prerequisites tool exposed by this server.
generate_contentGenerates 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.
SetupThe Setup tool exposed by this server.

How to install the Aistudio MCP server

{
  "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"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js 20.0.0 or higher - Google AI Studio API key
VariableDescriptionRequired
GEMINI_API_KEYCredential the server authenticates with.Yes
GEMINI_MODELConfiguration value read at startup.Optional
GEMINI_TIMEOUTConfiguration value read at startup.Optional
GEMINI_MAX_OUTPUT_TOKENSCredential the server authenticates with.Yes
GEMINI_MAX_FILESConfiguration value read at startup.Optional
GEMINI_MAX_TOTAL_FILE_SIZEConfiguration value read at startup.Optional
GEMINI_TEMPERATUREConfiguration value read at startup.Optional

Example prompts to try

  • Use Aistudio to Prerequisites.
  • Use Aistudio to generate content.
  • Use Aistudio to Setup.

Frequently asked questions

It connects Aistudio to MCP-compatible AI assistants such as Claude and Cursor, exposing 3 tools (Prerequisites, generate_content, Setup) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Aistudio directly.