How to Connect Google Gemini to Real-Time SaaS Data with Unified.to MCP Server
September 16, 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's MCP server, you can skip that complexity. Unified.to exposes 317+ 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
Every request to the Unified.to MCP server must include a token. You can pass this either as a URL parameter (?token=...
) or in the Authorization: bearer {token}
header.
There are two authentication flows:
- Private (workspace key + connection)
Use your Unified.to workspace API key and add aconnection
parameter. This should never be exposed publicly. - Public (end-user safe)
Generate a token in the format{connectionID}-{nonce}-{signature}
using your workspace secret. Safe to share with customers.
Integrating with Google Gemini API
Manual Tool Orchestration:
- Call Unified's
/tools
endpoint and pass the tool list asfunction_declarations
to Gemini. - Gemini will return a function call request:
function_call { name: "list_candidates" args { fields { key: "limit" value { string_value: "100" } } } }
- Call Unified's
/tools/{id}/call
endpoint. - Respond to Gemini with the tool result as a
functionResponse
in your next message:{ "role": "user", "parts": [ { "functionResponse": { "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
→ add synonyms so Gemini can perform better matches for tool names.hide_sensitive=true
→ automatically strip PII (emails, phone numbers, name, gender, etc).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:
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 version
const modelVersion = 'latest';
// Unified connection Id that you want to have the mcp to use tools for
const connection = 'UNIFIED_CONNECTION_ID';
// location from where your unified account was created
const dc = 'us';
// 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({
token: process.env.UNIFIED_API_KEY || '',
connection,
type: 'gemini',
dc,
include_external_tools: true, // set to false if you don't want to include external tools
});
if (toolIds.length > 0) {
params.append('tools', toolIds.join(','));
}
const serverUrl = `${process.env.UNIFIED_MCP_URL}/mcp?${params.toString()}`;
const transport = new StreamableHTTPClientTransport(new URL(serverUrl));
const client = new Client({
name: 'unified-mcp',
version: '1.0.0',
});
await client.connect(transport);
let latestModel;
// Optional
if (modelVersion === 'latest') {
// get the latest model from gemini
const models = await gemini.models.list();
latestModel = models.page.filter((model: any) => model.name.includes('gemini') && !model.name.includes('embedding')).pop()?.name || 'gemini-2.0-flash';
} else {
latestModel = modelVersion;
}
const completion = await gemini.models.generateContent({
model: latestModel?.replace('model/', ''),
contents: message,
config: {
tools: [mcpToTool(client)],
},
});
for (const chunk of completion?.candidates || []) {
console.log(JSON.stringify(chunk, null, 2));
if (chunk.content?.parts) {
for (const part of chunk.content.parts) {
if (part.text) {
console.log(part.text);
}
}
}
}
Coverage and Infrastructure
Unified.to MCP is built for real-world AI use cases:
- 20,421+ real-time tools (growing weekly)
- 335+ integrations across 21 categories (ATS, CRM, HRIS, Accounting, Messaging, File Storage, and more)
- Zero-storage architecture — no caching, no liability
- Scoped security controls — permissions, aliases, and PII redaction
- Multi-region deployment — US, EU, and AU data centers for compliance
Unified.to MCP works across all major LLM providers: OpenAI, Anthropic, Google Gemini, and Cohere. That means you can build once and connect to any agent client.
Note: Unified.to MCP is currently in beta and should not be used in production systems yet. Contact us if you'd like to explore production use.