Gemini MCP server

Connect Gemini to Claude, ChatGPT, Cursor, Claude Code, Codex, Gemini, GitHub Copilot and any other MCP client, for your whole team. Metorial adds security, governance, and tracing, and gives everyone one Magic MCP URL to connect.

What you can do with the Gemini MCP server

Ask your agent in plain language. Each of these maps to a real tool on the server.

  • Use the generate embeddings tool in Gemini
  • Use the count tokens tool in Gemini
  • Use the list cached contents tool in Gemini
  • Use the generate text tool in Gemini
  • Use the delete file tool in Gemini
  • Use the delete cached content tool in Gemini

Supported Tools

generate_embeddings

Generate Embeddings

Generate vector embeddings for text content using Gemini embedding models. Supports single and batch embedding generation with configurable task type and dimensionality. Useful for semantic search, classification, and clustering.

count_tokens

Count Tokens

Count the number of tokens in text content for a specific Gemini model. Useful for estimating costs and ensuring prompts fit within model token limits before sending generation requests.

list_cached_contents

List Cached Contents

List all cached content entries. Returns cached content metadata including model association, creation time, and expiration.

generate_text

Generate Text

Generate text using Gemini models with multimodal input support. Supports single-turn and multi-turn conversations with text, images, audio, video, and document inputs. Configure generation parameters, safety settings, system instructions, JSON output mode, and function calling.

delete_file

Delete File

Delete a file previously uploaded to the Gemini File API. The file will no longer be available for use in generation requests.

delete_cached_content

Delete Cached Content

Delete a cached content entry. The cached content will no longer be available for use in generation requests.

update_cached_content

Update Cached Content

Update the TTL or expiration time of existing cached content. Use this to extend or shorten the lifetime of a cache entry.

list_models

List Models

List available Gemini models and their capabilities. Returns model names, supported generation methods, token limits, and other metadata. Use this to discover which models are available and their specifications.

list_files

List Files

List files previously uploaded to the Gemini File API. Files are stored for 48 hours and can be referenced in generation requests by their URI.

get_file

Get File

Get metadata for a file previously uploaded to the Gemini File API. Returns file details including processing state, size, MIME type, and expiration time.

generate_image

Generate Image

Generate or edit images using Gemini's native image generation capabilities or Imagen models. Supports text-to-image generation and image editing with text prompts. Returns generated images as base64-encoded data.

create_cached_content

Create Cached Content

Create cached content to save and reuse precomputed input tokens. Caching is useful when repeatedly prompting with the same large context (e.g., a long document or system instructions). Cached content can be referenced in subsequent generation requests for cost and latency savings.

get_model

Get Model

Get metadata for a specific Gemini model, including supported generation methods, token limits, version, and generation defaults. Use this before invoking a model-specific capability such as text generation, embeddings, or token counting.

get_cached_content

Get Cached Content

Get metadata for a cached content entry. The API returns cache metadata such as model, display name, token usage, and expiration, but not the original cached content body.

upload_file

Upload File

Upload a text, image, audio, video, or document file to the Gemini File API for reuse in generation requests. Returns the file URI needed for fileData parts in Generate Text and cached content workflows.

get_video_operation

Get Video Operation

Get the current state of a Veo long-running operation. When generation succeeds, downloads each generated MP4 and returns its bytes only as Slate attachments.

generate_video

Generate Video

Start asynchronous text-to-video, image-to-video, or first/last-frame video generation with a Gemini Developer API Veo model. Returns a long-running operation name for get_video_operation.

Connect Gemini to your AI client

Every client uses the same Magic MCP URL, and so does any other MCP client. Add it once and sign in with SSO.

  1. Enable Gemini in Metorial. In your Metorial portal, enable the Gemini MCP server and sign in with the account that owns the data. Access stays governed by your team policies.
  2. Add a custom connector. Open Customize, then Connectors. Select Add, then Custom, then Web.
  3. Paste your Metorial MCP URL. Name it Metorial, paste your Magic MCP URL (<your-magic-mcp-url>) and continue.
  4. Sign in. Select Add and sign in to load Gemini tools.

Run Gemini through the Metorial gateway

One governed layer for every app your agents reach, not a separate connector per tool.

  • Give Gemini and every other app to your whole team through one MCP gateway, behind your SSO.
  • Scope which teams and agents can use Gemini tools with role-based access control, and trace every call.
  • Prefer to run it yourself? Metorial is open source and self-hostable.

More integrations teams use with Gemini

Notion

Create, read, update, and archive pages and databases in a Notion workspace. Manage blocks (paragraphs, lists, headings, embeds, etc.) within pages. Query databases with filters and sorts across rich property types including text, numbers, dates, selects, relations, and formulas. Search across pages and databases by title. Add and read comments on pages and blocks. Upload files to pages. Manage workspace users and retrieve user profiles.

GitHub

Manage repositories, issues, and pull requests. Create and configure branches, star repositories, review code, and merge changes. Automate CI/CD workflows with GitHub Actions, manage workflow runs, secrets, and artifacts. Track issues with labels, milestones, and assignees. Search across code, repositories, issues, and users. Manage organizations, teams, and memberships. Create and manage projects, gists, packages, deployments, and environments. Access security alerts including code scanning, secret scanning, and Dependabot alerts. Read and write file contents in repositories. Manage webhooks, notifications, and codespaces.

Salesforce

Manage CRM data including Accounts, Contacts, Leads, Opportunities, Cases, and custom objects. Create, read, update, and delete records. Query data using SOQL and search across objects using SOSL. Perform bulk data operations for large-scale imports, exports, and migrations. Execute composite requests to batch multiple operations in a single API call. Access analytics, reports, and dashboards. Manage files and attachments associated with records. Interact with Chatter feeds, posts, and groups for social collaboration. Manage org metadata including custom objects, fields, layouts, and workflows. Query data using GraphQL for precise data retrieval across related objects.

Sharepoint

Manage SharePoint sites, document libraries, lists, and files. Create, read, update, and delete lists and list items with custom columns. Resolve site users to numeric Person/Group LookupId values. Upload, download, move, copy, and version files in document libraries. Search across sites, files, folders, lists, and list items using Microsoft Search. Manage permissions at site, list, and item levels with granular access control. Define and manage content types and site columns. Retrieve site properties and search for sites across Microsoft 365.

Airtable

Create, read, update, and delete records in Airtable bases and tables. Manage base schemas including creating tables and fields. Filter records using formulas, sort by fields, and scope queries to specific views. Upsert records to find, create, or update in a single call. Upload attachments to records, read and write record comments, list accessible bases, and receive real-time base change events through webhooks.

Confluence

Create, read, update, and delete pages, blog posts, comments, and attachments in Confluence spaces. Manage spaces, permissions, labels, and content restrictions. Search content using Confluence Query Language (CQL). Upload and download file attachments with versioning. Manage users, groups, and group memberships. Create and manage whiteboards, databases, folders, and templates. View and update inline tasks. Access audit logs.

Technical notes for Gemini

Generate text, chat responses, and structured outputs using Google's multimodal Gemini AI models. Process and understand mixed inputs including text, images, audio, video, and PDF documents. Generate images via Imagen and native models, generate videos via Veo, and create music with granular creative controls. Execute Python code within the model environment. Produce text, image, video, and audio embeddings for semantic search and classification. Upload and manage files for use in prompts. Fine-tune models with custom training data. Use built-in tools including Google Search grounding, URL context fetching, and computer use automation. Cache context for repeated use across requests. Count tokens before sending requests. Stream real-time voice and video interactions via the Live API over WebSockets. Call external functions and chain multiple tool invocations to fulfill complex requests.

Frequently asked questions

Common questions about connecting Gemini to AI agents with Metorial.

  1. How many tools does the Gemini MCP server have?
    The Gemini MCP server exposes 17 tools, including Generate Embeddings, Count Tokens, List Cached Contents. Each one is governed and traced through Metorial.
  2. Gemini exposes tools your agents call on demand; it does not publish event triggers yet. Everything still runs through one governed MCP URL.
  3. Any MCP client, including VS Code, Windsurf, Zed, OpenCode and Grok. Each one reaches the Gemini MCP server through the same Metorial URL.
  4. Use role-based access control to decide which teams, users, and agents can use Gemini and which of its tools they can call.
  5. Yes. Metorial is open source, so you can run the Gemini MCP server yourself or use the hosted gateway.

Connect Gemini to production AI agents

See how Metorial gives your team governed access to Gemini, with tracing and security controls built in.