- Home
- MCP servers
- Gemini
Gemini
- python
0
GitHub Stars
python
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
This MCP server bridges MCP clients to Google Gemini models, enabling multi-turn conversations, file and image analysis, automatic model selection, deep thinking mode, and up-to-date web information. It runs locally with a backend API and exposes both HTTP and local (stdio) connection methods for client integration.
How to use
You connect an MCP client to the Gemini MCP Server using either an HTTP endpoint or a local stdio command. The HTTP method talks to the backend at the AIStudioProxyAPI URL, while the stdio method launches a local server process you run from your machine. Use the HTTP option for remote setups and the stdio option when you prefer a local, self-contained runtime.
How to install
Prerequisites are required before starting the server. You will install the backend API, install the local MCP runtime, and prepare your environment.
# Step 1: Install backend API (AIStudioProxyAPI)
# Clone and setup AIStudioProxyAPI
git clone https://github.com/CJackHwang/AIstudioProxyAPI.git
cd AIstudioProxyAPI
poetry install
poetry run python launch_camoufox.py --headless
# The API will be available at http://127.0.0.1:2048 by default
# Step 2: Install uv package manager (recommended)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Step 3: Clone Gemini MCP server repository
git clone https://github.com/YOUR_USERNAME/aistudio-gemini-mcp.git
cd aistudio-gemini-mcp
# Step 4: Install dependencies via uv
uv sync
Configuration
Set up environment variables and client configurations to connect to the Gemini MCP Server. The backend API address is the AIStudioProxyAPI endpoint, and a root directory is used for file resolution.
{
"mcpServers": {
"gemini": {
"command": "uv",
"args": ["run", "--directory", "/path/to/aistudio-gemini-mcp", "python", "server.py"],
"env": {
"GEMINI_API_BASE_URL": "http://127.0.0.1:2048"
}
}
}
}
Runtime and usage notes
Start the local MCP server with the following command from the Gemini MCP server directory. This launches the stdio-based runtime using uv to execute the Python server. Ensure the backend API is running and reachable at the configured base URL.
uv run python server.py
Tools and capabilities
The Gemini MCP Server exposes tools that enable direct interaction with Gemini models and model list queries.
Available tools include:
-
gemini_chat - Send a message to Google Gemini with optional file attachments and optional session management.
-
gemini_list_models - List available Gemini models with optional filtering.
Available tools
gemini_chat
Send a message to Google Gemini with optional file attachments, manage session state, and control model selection and response formatting.
gemini_list_models
List available Gemini models with optional text-based filtering and preferred response format.