Skip to main content
Glama
georgejeffers

Gemini MCP Server

gemini-mcp-server

A TypeScript implementation of a Model Context Protocol (MCP) server that integrates with Google's Gemini Pro model.

MCP Tools

generate_text

From server: gemini

Related MCP server: MCP Gemini Server

Prerequisites

  • Node.js 18 or higher

  • Google Gemini API key

  • TypeScript

  • Claude Desktop app

Installation

Installing via Smithery

To install Gemini MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @georgejeffers/gemini-mcp-server --client claude

Manual Installation

  1. Clone the repository:

git clone https://github.com/GeorgeJeffers/gemini-mcp-server.git
cd gemini-mcp-server
  1. Install dependencies:

npm install
  1. Build:

npm run build

Claude Desktop Integration

To use this server with Claude Desktop:

  1. Open Claude Desktop

  2. Go to Settings > Developer

  3. Click "Edit Config"

  4. Add the following configuration:

{
  "name": "gemini",
  "command": "node",
  "args": ["dist/gemini_mcp_server.js"],
  "env": {
    "GEMINI_API_KEY": "your_api_key_here"
  },
  "cwd": "/path/to/mcp-gemini-server"
}

Replace:

  • /path/to/mcp-gemini-server with the absolute path to where you cloned this repository

  • your_api_key_here with your actual Google Gemini API key

The server will now be available in Claude Desktop's MCP server list.

License

MIT

Author

GeorgeJeffers

Available Tools

7 tools
chatChatA

Multi-turn conversation with session management. Omit sessionId to start a new session; include it to continue an existing one.

ParametersJSON Schema
NameRequiredDescriptionDefault
messageYesThe message to send
sessionIdNoSession ID from a previous response to continue that conversation
modelNoGemini model to usegemini-2.5-flash
systemInstructionNoSystem instruction (only applied when starting a new session)

Output Schema

ParametersJSON Schema
NameRequiredDescription
responseYesThe model response text
sessionIdYesSession ID for continuing this conversation
turnCountYesNumber of turns in this session

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds valuable context beyond annotations: it explains session management behavior (starting vs. continuing conversations) and hints at statefulness. Annotations cover safety (readOnlyHint=false, destructiveHint=false, openWorldHint=true), so the bar is lower, but the description provides operational insights that enhance understanding of how the tool behaves in practice.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded, consisting of just two sentences that efficiently convey the core functionality and key usage rule. Every sentence earns its place by addressing essential aspects without any wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (multi-turn conversation with session management), rich annotations, 100% schema coverage, and the presence of an output schema, the description is complete enough. It focuses on the unique behavioral aspects (session management) while relying on structured fields for parameter and output details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all parameters. The description adds minimal parameter semantics by clarifying sessionId usage, but it doesn't provide additional meaning beyond what's in the schema descriptions. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Multi-turn conversation with session management,' which is a specific verb+resource combination. It distinguishes this tool from sibling tools like code_execution or generate_text by emphasizing conversation continuity rather than single-turn generation or other modalities.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: 'Omit sessionId to start a new session; include it to continue an existing one.' This directly addresses the key decision point for usage versus alternatives, offering clear context for session management without needing exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

code_executionCode ExecutionA
Read-only

Execute Python code in a sandboxed environment. Gemini generates and runs code, returning both the code and results.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesDescribe what code to write and execute
modelNoGemini model to usegemini-2.5-flash
temperatureNoSampling temperature
maxOutputTokensNoMaximum output tokens

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, covering safety and scope. The description adds valuable context about the sandboxed environment and that Gemini both generates and runs the code, which clarifies the execution flow beyond what annotations provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences that efficiently convey the core functionality and agent role without unnecessary details. It's front-loaded with the main purpose and wastes no words, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with good annotations (covering safety and scope) and full schema coverage, the description adds useful context about the sandbox and Gemini's role. However, without an output schema, it could benefit from mentioning return values (e.g., code and results format), though it's not strictly required.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so parameters are fully documented in the schema. The description doesn't add any parameter-specific details beyond what the schema provides, such as explaining the prompt format or model differences. Baseline 3 is appropriate given the high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Execute Python code'), target resource ('in a sandboxed environment'), and agent role ('Gemini generates and runs code'). It distinguishes from sibling tools like chat or generate_text by focusing on code execution rather than conversation or text generation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for Python code execution tasks but doesn't explicitly state when to use this tool versus alternatives like generate_text for non-code tasks or edit_image for image editing. No exclusions or specific contexts are provided beyond the general purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

edit_imageEdit ImageA
Read-only

Edit an image using a text prompt. Send a base64-encoded image and describe the desired changes.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesDescription of the edits to apply
imageYesBase64-encoded source image
mimeTypeNoMIME type of the source imageimage/png
modelNoImage model to use (Nano Banana Pro by default)gemini-3-pro-image-preview
aspectRatioNoAspect ratio of the output image1:1
imageSizeNoOutput image resolution1K

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate read-only, open-world, and non-destructive operations, which the description doesn't contradict. The description adds context about the editing process ('using a text prompt') and input requirements, but doesn't disclose behavioral traits like rate limits, authentication needs, or output format details beyond what annotations provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('Edit an image using a text prompt') and specifies key inputs without unnecessary details. Every word earns its place, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (6 parameters, image editing functionality) and lack of an output schema, the description is minimally adequate. It covers the basic operation but doesn't address output format (e.g., returned image type), error conditions, or advanced usage scenarios, leaving gaps for an AI agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the schema fully documents all 6 parameters. The description mentions 'base64-encoded image' and 'text prompt', aligning with the 'image' and 'prompt' parameters, but adds no additional semantic meaning beyond what's in the schema (e.g., how prompts are interpreted or image processing details).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Edit an image') and the mechanism ('using a text prompt'), specifying the required inputs (base64-encoded image and description). It distinguishes from sibling tools like 'generate_image' (creation vs. editing) but doesn't explicitly differentiate from 'edit_image_multi' beyond the single-image focus implied by the parameters.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for editing existing images with text prompts, contrasting with 'generate_image' for creation from scratch. However, it lacks explicit guidance on when to choose this over 'edit_image_multi' (e.g., for single vs. multiple images) or other alternatives, and doesn't mention prerequisites like image format compatibility.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

edit_image_multiEdit Image (Multi-Reference)B
Read-only

Edit or compose images using multiple reference images (up to 14). Uses gemini-3-pro-image-preview (Nano Banana Pro).

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesDescription of the desired output
imagesYesArray of reference images (1-14)
aspectRatioNoAspect ratio of the output image1:1
imageSizeNoOutput image resolution1K

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, covering safety and scope. The description adds minimal behavioral context: it mentions the AI model ('gemini-3-pro-image-preview') and the 14-image limit, which are useful but not comprehensive. It doesn't describe output format, latency, rate limits, or quality expectations. With annotations providing core safety info, the description adds some value but lacks rich behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief (two sentences) and front-loaded with the core purpose. Every sentence adds information: the first states the function and constraint, the second names the AI model. There's no fluff or repetition. However, it could be more structured (e.g., separating function from technical details) and slightly more informative without losing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (image editing with multiple references), the description is minimally adequate. Annotations cover safety and scope, and the schema fully documents inputs. However, with no output schema, the description doesn't explain return values (e.g., image format, errors). It also lacks context about the AI model's capabilities/limitations. For a creative tool with potential variability, more guidance would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 4 parameters. The description adds no parameter-specific semantics beyond what's in the schema—it doesn't explain how 'prompt' interacts with 'images', what 'edit vs. compose' means for parameters, or provide examples. Baseline 3 is appropriate when the schema does all the parameter documentation work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Edit or compose images using multiple reference images (up to 14).' It specifies the verb ('Edit or compose'), resource ('images'), and key constraint ('multiple reference images'). However, it doesn't explicitly distinguish this from its sibling 'edit_image' tool, which likely handles single-reference edits. The mention of 'gemini-3-pro-image-preview (Nano Banana Pro)' adds implementation detail but doesn't clarify functional differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention the sibling 'edit_image' tool (for single-reference edits), 'generate_image' (for generation without references), or other image-related tools. There's no context about use cases, prerequisites, or exclusions. The only implicit guidance is the 'multi-reference' aspect, but this isn't framed as a decision criterion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_imageGenerate ImageB
Read-only

Generate an image from a text prompt using Gemini image models (Nano Banana Pro by default).

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesText description of the image to generate
modelNoImage generation model (Nano Banana Pro by default)gemini-3-pro-image-preview
aspectRatioNoAspect ratio of the generated image1:1
imageSizeNoImage resolution (1K or 2K)1K

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, openWorldHint=true, and destructiveHint=false, covering safety and scope. The description adds minimal behavioral context by specifying 'Gemini image models' and a default model, but doesn't disclose rate limits, authentication needs, output format (e.g., image type), or cost implications. With annotations providing core behavioral traits, the description adds some value but lacks depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It front-loads the core purpose and includes relevant technical details (Gemini models, default model) without redundancy. Every element earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (image generation with 4 parameters), rich annotations (covering safety and scope), and 100% schema coverage, the description is adequate but incomplete. It lacks output details (no output schema), doesn't explain sibling relationships, and omits behavioral nuances like rate limits. However, annotations and schema compensate significantly, making it minimally viable for basic use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with all parameters well-documented in the schema itself (e.g., prompt description, model enum with default, aspect ratio options, image size options). The description only mentions the default model ('Nano Banana Pro by default'), which partially overlaps with schema info. It adds negligible semantic value beyond the schema, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Generate an image from a text prompt using Gemini image models.' It specifies the verb ('Generate'), resource ('image'), and technology ('Gemini image models'), but doesn't explicitly differentiate from sibling tools like 'edit_image' or 'generate_text' beyond mentioning image generation. The default model mention adds specificity but doesn't fully address sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'edit_image' (for modifying existing images) or 'generate_text' (for text generation), nor does it specify use cases, prerequisites, or exclusions. The agent must infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_textGenerate TextB
Read-only

Generate text using Google Gemini models with configurable model, temperature, and system instructions.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesThe text prompt to send to Gemini
modelNoGemini model to usegemini-2.5-flash
temperatureNoSampling temperature (0-2)
maxOutputTokensNoMaximum number of output tokens
systemInstructionNoSystem instruction to guide model behavior

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, openWorldHint=true, and destructiveHint=false, covering safety and scope. The description adds minimal behavioral context beyond annotations - it mentions 'configurable model, temperature, and system instructions' which hints at customization options, but doesn't describe rate limits, authentication needs, response format, or error behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. Every word earns its place - 'Generate text' establishes the action, 'using Google Gemini models' specifies the technology, and 'with configurable model, temperature, and system instructions' highlights key customization options without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a text generation tool with comprehensive annotations and 100% schema coverage but no output schema, the description is minimally adequate. It covers the basic purpose and hints at configurability, but doesn't address when to use it versus siblings, expected response format, or practical considerations for using Gemini models effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, all parameters are well-documented in the schema itself. The description mentions 'configurable model, temperature, and system instructions' which maps to three of the five parameters, but doesn't add meaningful semantic context beyond what the schema already provides. The baseline of 3 is appropriate given the comprehensive schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Generate text') and resource ('using Google Gemini models'), specifying the core functionality. It distinguishes from some siblings like 'generate_image' or 'edit_image' by focusing on text generation, but doesn't explicitly differentiate from 'chat' which might also involve text generation with similar models.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'chat' or 'generate_with_search'. It mentions configurable parameters but doesn't indicate appropriate contexts, prerequisites, or exclusions for using this text generation tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.9/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: chat handles conversations, code_execution runs Python, edit_image modifies single images, edit_image_multi handles multiple images, generate_image creates images, generate_text produces text, and generate_with_search adds search grounding. The descriptions clearly differentiate their functions, making misselection unlikely.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (e.g., chat, code_execution, edit_image, generate_image, generate_text, generate_with_search). The naming is uniform and predictable across all seven tools, with no deviations in style or convention.

Tool Count5/5

With 7 tools, the count is well-scoped for a Gemini MCP server, covering core AI functionalities like text generation, image handling, code execution, and chat. Each tool earns its place without feeling excessive or insufficient for the server's purpose.

Completeness4/5

The tool surface is nearly complete for a Gemini AI server, covering text generation (with and without search), image generation and editing, code execution, and chat. A minor gap exists in lacking explicit tools for model management or configuration, but core workflows are well-covered and agents can work around this.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A server implementing the Model Context Protocol that enables AI assistants like Claude to interact with Google's Gemini API for text generation, text analysis, and chat conversations.
  • A
    license
    B
    quality
    D
    maintenance
    A Model Context Protocol server that enables Claude Desktop to interact with Google's Gemini 2.5 Pro Experimental AI model, with features like Google Search integration and token usage reporting.
    2
    81
    4
    Apache 2.0
  • A
    license
    D
    quality
    D
    maintenance
    A TypeScript implementation of a Model Context Protocol server that integrates with Google's Gemini 2.0 Flash model, enabling Claude Desktop users to interact with Gemini through natural language conversations.
    1
    70
    3
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/georgejeffers/gemini-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server