---
title: "How to Connect Google Gemini to Real-Time SaaS Data with Unified.to MCP Server"
img: https://s3.us-east-2.amazonaws.com/unified-article-images/how_to_connect_google_gemini_to_real_time_saas_data_with_unified_mcp_server-icon.png
date: 2025-08-28T00:00:00.000Z
updated: "2026-10-26T16:12:34.560Z"
tag: Guides
integrations: googlegemini
description: "Google Gemini can power powerful workflows — but most products still need access to live customer data from CRMs, ATSs, HRIS, or accounting systems. That..."
url: "https://docs.unified.to/guides/how_to_connect_google_gemini_to_real_time_saas_data_with_unified_mcp_server"
---

# How to Connect Google Gemini to Real-Time SaaS Data with Unified.to MCP Server
------
_August 28, 2025_

Google Gemini can power powerful workflows — but most products still need access to **live customer data** from CRMs, ATSs, HRIS, or accounting systems. That usually means writing brittle glue code, normalizing APIs, and maintaining webhook jobs.


With [**Unified.to**](https://unified.to/)**'s MCP server**, you can skip that complexity. [Unified.to](https://unified.to/) exposes 2145 SaaS integrations as **real-time, callable tools** that Gemini can use directly — no custom integration logic required.


In this guide, we'll walk through how to connect Gemini to Unified.to MCP so your application can give Gemini real-time access to customer SaaS data and actions.


## Authentication


Tool calls to the [Unified.to](https://unified.to/) MCP server need a credential (listing tools does not). Send it in the `Authorization: Bearer {token}` header or the `x-api-key` header. Passing the token as a URL parameter is deprecated.


[Unified.to](https://unified.to/) documents five authentication options (as of 26 October 2026). For a server-side Gemini app, these two apply:

- **Private (workspace key + connection)**

    Use your Unified.to workspace API key and add a `connection` parameter. This should never be exposed publicly.

- **Connection-scoped token**

    Generate a connection-scoped token with the Core MCP tool `get_unified_connection_mcp_url` and `mode=user`; use the returned `recommended.url` and send the token in the Authorization header. The token grants access to one connection only, never carries your workspace API key, and does not expire; to revoke it, delete the connection. `mode=api` uses your workspace API key and must not be shared.


## Integrating with Google Gemini API


Model names change often; use a current model from your provider's model list.


**Manual Tool Orchestration:**

1. Call Unified's `/tools?type=gemini` endpoint and pass the tool list as `function_declarations` to Gemini.
2. Gemini will return a function call request:

    ```plain text
    {
      "functionCall": {
        "id": "...",
        "name": "list_candidates",
        "args": { "limit": "100" }
      }
    }
    ```

3. Call Unified's `/tools/{id}/call` endpoint.
4. Respond to Gemini with the tool result as a `functionResponse` in your next message:

    ```json
    {
      "role": "user",
      "parts": [
        {
          "functionResponse": {
            "id": "...",
            "name": "list_candidates",
            "response": { ... }
          }
        }
      ]
    }
    ```


## Controlling Tool Access


Unified.to MCP gives you granular control over how tools are exposed to Gemini:

- `permissions` → restrict available scopes.
- `tools` → allowlist specific tool IDs.
- `aliases` → adds extra descriptions to improve tool matching.
- `hide_sensitive=true` → strips sensitive (PII) fields such as names, emails, phone numbers, addresses, date of birth, SSN/SIN and compensation, plus credential fields, from results.
- `include_external_tools=true` → expose all vendor API endpoints, not just Unified.to's normalized models.

These options help you keep Gemini outputs predictable and secure in production-grade workflows.


### Sample Snippet:


```javascript
import { GoogleGenAI, mcpToTool } from '@google/genai';
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
// Construct a new GEMINI client via GoogleGenAI

// Gemini model
const model = 'gemini-3.8-flash';
// Unified connection ID that the MCP server should use
const connection = process.env.CONNECTION_ID;
// Regional host without a path: US https://mcp-api.unified.to, EU https://mcp-api-eu.unified.to, AU https://api-au.unified.to
const UNIFIED_MCP_URL = process.env.UNIFIED_MCP_URL || 'https://mcp-api.unified.to';
const message = 'Score this candidate for the Software Engineer job.';
// Optional: list of specific tools that you want to use
const toolIds = ['get_messaging_message','list_messaging_message']

const gemini = new GoogleGenAI({
    apiKey: process.env.GEMINI_API_KEY || '',
});

// Construct the required params
const params = new URLSearchParams({
    connection,
    include_external_tools: 'true', // set to 'false' to hide the vendor's own API endpoints
});

if (toolIds.length > 0) {
    params.append('tools', toolIds.join(','));
}

const serverUrl = `${UNIFIED_MCP_URL}/mcp?${params.toString()}`;

const transport = new StreamableHTTPClientTransport(new URL(serverUrl), {
    requestInit: {
        headers: { Authorization: `Bearer ${process.env.UNIFIED_API_KEY}` },
    },
});
const client = new Client({
    name: 'unified-mcp',
    version: '1.0.0',
});

await client.connect(transport);

const completion = await gemini.models.generateContent({
    model,
    contents: message,
    config: {
        tools: [mcpToTool(client)],
    },
});

console.log(completion.text);

await client.close();
```


## Coverage and Infrastructure


Unified.to MCP is built for real-world AI use cases:

- **201,899 real-time tools** (growing weekly)
- **2145 integrations across 38 categories** (ATS, CRM, HRIS, Accounting, Messaging, File Storage, and more)
- **No stored customer records**: [Unified.to](https://unified.to/) stores no customer records; logs hold operational metadata only
- **Scoped security controls** — permissions, aliases, and PII redaction
- **Multi-region deployment** — US, EU, and AU data centers for compliance

[Unified.to](https://unified.to/) MCP works with major LLM providers, including **OpenAI, Anthropic, Google Gemini and Cohere.** That means you can build once and connect to any agent client.

- [Explore the MCP docs](https://docs.unified.to/mcp?utm_source=chatgpt.com)
- [Book a demo](https://calendly.com/d/cph9-g8n-jzg/connect-with-unified?utm_source=chatgpt.com)