- Home
- MCP servers
- Gemini Chat
Gemini Chat
- python
2
GitHub Stars
python
Language
6 months ago
First Indexed
2 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.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"lns2905-gemini-chat-mcp": {
"command": "python",
"args": [
"C:/Working/gemini-chat-mcp/src/gemini_chat_mcp/server.py"
],
"env": {
"GEMINI_SECURE_1PSID": "YOUR_GEMINI_PSID",
"GEMINI_SECURE_1PSIDTS": "YOUR_GEMINI_PSIDTS"
}
}
}
}You can run Gemini Chat MCP to interact with Google Gemini and any custom Gems, all through a simple MCP server. It handles sending messages, receiving responses (including images), and lets you specify a Gem by ID or use different Gemini models. It also supports automatic cookie syncing via a Chrome extension for a smoother setup.
How to use
To use this MCP server, start it locally and connect to it from your MCP client configuration. You can chat with Gemini directly by sending a message, optionally selecting a specific model, and you can target a custom Gem by providing its Gem ID. The server also supports updating cookies when they expire to keep sessions valid.
How to install
Prerequisites: Python must be installed on your system. You will also need pip to install the package.
-
Open a terminal or command prompt.
-
Navigate to your working directory.
-
Install the MCP package in editable mode.
cd C:/Working/gemini-chat-mcp
pip install -e .
Additional configuration and usage notes
Configuration options include a Chrome extension-based cookie sync or manual cookie entry via a .env file. The Chrome extension runs a local helper server on port 52525 that the MCP server queries to fetch cookies automatically.
Option 1: Chrome Extension (Recommended) steps create a smooth cookie sync flow.
1) Open Chrome and go to chrome://extensions/
2) Enable "Developer mode"
3) Click "Load unpacked" and select the chrome-extension folder
4) Login to gemini.google.com
5) Click the extension icon to verify cookies are synced
How to run with Amp (MCP client)
Define the MCP server in your Amp settings to run the Python-based server. You can run the server either by providing the full path to the script or by using the module entry point.
{
"amp.mcpServers": {
"gemini_chat": {
"command": "python",
"args": ["C:/Working/gemini-chat-mcp/src/gemini_chat_mcp/server.py"]
}
}
}
Configuration options
Option 2: Manual .env files. You can copy the example and fill in cookie values if you prefer manual setup.
GEMINI_SECURE_1PSID=your_psid_here
GEMINI_SECURE_1PSIDTS=your_psidts_here
Tools
chat — Chat with Gemini. Can generate text and images.
Examples
Basic chat example shows sending a simple message.
Chat with a custom Gem by providing gem_id.
Use a specific Gemini model by setting the model parameter.
Available tools
chat
Chat with Gemini. Can generate text and images.
set_cookie
Update cookies when they expire to keep sessions valid.