Gemini MCP Server
Provides access to Google Gemini AI models for text generation with configurable model selection and temperature settings.
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., "@Gemini MCP Serverexplain quantum computing in simple terms"
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.
Gemini MCP Server
An MCP (Model Context Protocol) server that provides access to Google Gemini AI models.
Quick Start
Install dependencies:
npm installCreate a
.envfile with your Gemini API key:
GEMINI_API_KEY=your_api_key_hereStart the server:
npm run devThe server will run at http://localhost:3333/mcp
Related MCP server: Gemini Image Gen MCP Server
Available Tool
gemini_generateText
Generate text using Google Gemini models.
Parameters:
prompt(string, required): The text promptmodel(string, optional): Gemini model to use (default:gemini-2.5-pro)temperature(number, optional): Temperature for generation, 0-2 (default: 1)
Returns:
text: Generated text responsemodel: Model usedtemperature: Temperature setting used
Usage Example
import { Client as McpClient } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
const transport = new StreamableHTTPClientTransport(
new URL('http://localhost:3333/mcp')
);
const client = new McpClient(
{ name: 'my-client', version: '1.0.0' },
{ capabilities: {} }
);
await client.connect(transport);
const result = await client.callTool({
name: 'gemini_generateText',
arguments: {
prompt: 'Explain AI in simple terms',
model: 'gemini-2.5-pro',
temperature: 0.7
}
});
console.log(result);
await client.close();Testing
Run the included test client (requires server to be running):
npm testConfiguration
Environment variables:
GEMINI_API_KEY(required): Your Google Gemini API keyPORT(optional): Server port (default: 3333)
Deployment
Deploy to Google Cloud Run with automated scripts:
# 0. Prerequisites (one-time, via GCP Console)
# - Create GCP project
# - Link billing account
# - Run: gcloud auth login
# 1. Setup GCP (one-time)
./bin/setup-gcp.sh \
--project-id=my-project \
--github-user=your-username \
--github-repo=gemini-mcp
# 2. Set GitHub Secrets (follow script output)
# 3. Deploy
git push origin mainFor detailed deployment instructions, see DEPLOYMENT.md.
License
ISC
This server cannot be deployed
Maintenance
Related MCP Connectors
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Text generation over MCP: prose, emails, blog outlines, SQL, humanizing, text diffs, fake data.
MCP server for AI dialogue using various LLM models via AceDataCloud
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Related MCP Servers
- AlicenseAqualityDmaintenanceAllows AI assistants to generate and transform high-quality images from text prompts using Google's Gemini model via the MCP protocol.334MIT
- AlicenseAqualityCmaintenanceEnables AI image generation, editing, and upscaling via Google Gemini and Imagen models, supporting dynamic model switching and multiple MCP-compatible clients.12MIT
- AlicenseAqualityDmaintenanceMCP server for Google Gemini image generation with configurable model support, enabling text-to-image generation, image editing, and iterative refinement.640MIT
- AlicenseNot gradedqualityDmaintenanceIntegrates Google's Gemini API with MCP-compatible clients for chat, real-time web search, knowledge queries, code/text analysis, and content generation.59 npmMIT