Labsco
MCP SERVER

Gemini MCP Server

by aliargun

Send a prompt, an image or a batch of text to a Gemini model from whatever client you already work in, with the generation parameters exposed rather than hidden.

Model Routing, Multi-Model Consultation & Cost ControlVerified
Summary
A second model, with its dials in reach.

The value is not just reaching Gemini — it is that temperature, system instruction, safety settings, JSON schema and grounding are arguments you set per call, so a structured extraction and a creative draft can come from the same server without reconfiguring anything. Two habits pay off: check list_models rather than hard-coding a name, since the model is an argument and the roster moves, and run count_tokens before pushing a large document at a long-context model.

What it is

A stdio bridge to the Google Gemini API. Six tools cover generation, vision, embeddings, token counting, model discovery and built-in help, with the model named per call.

What you get
  • generate_text with the parameters exposed as arguments: model, temperature, topK, topP, maxTokens, systemInstruction and safetySettings
  • jsonMode with a jsonSchema, so a call can return a structured object instead of prose you then have to parse
  • Grounding turns on Google Search grounding for questions where current material matters
  • conversationId keeps a thread going across calls rather than restarting the context each time
  • analyze_image takes a prompt plus an image URL or base64 data
  • embed_text produces embeddings from Gemini's embedding models
  • count_tokens measures text against a specific model before you send it
  • list_models returns the available models and their capabilities, with an optional filter
  • get_help answers usage questions about the server itself, by topic
Requirements

A Gemini API key from Google AI Studio, passed as GEMINI_API_KEY in the client's env block — it is read from the environment only, never an argument. It runs over stdio as npx -y github:aliargun/mcp-server-gemini, so Node and network access are all that is needed locally. Usage is billed by Google against that key. MIT.

Setup effort

One command plus a key — npx -y github:aliargun/mcp-server-gemini, then supply credentials