IntegrateIntegrate
Integrations

Gmail Integration

Send, read, and search Gmail messages

The Gmail integration provides access to send, read, and search Gmail messages through the Integrate MCP server.

Installation

The Gmail integration is included with the SDK:

import { gmailIntegration } from "integrate-sdk/server";

Setup

1. Create a Gmail OAuth App

  1. Go to Google Cloud Console
  2. Create a new OAuth application
  3. Configure your redirect URI
  4. Note your Client ID and Client Secret

2. Configure the Integration on Your Server

Add the Gmail integration to your server configuration. The integration automatically reads GMAIL_CLIENT_ID and GMAIL_CLIENT_SECRET from your environment variables:

import { createMCPServer, gmailIntegration } from "integrate-sdk/server";

export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [
    gmailIntegration({
    }),
  ],
});

You can override the environment variables by passing explicit values:

gmailIntegration({
  clientId: process.env.CUSTOM_GMAIL_ID,
  clientSecret: process.env.CUSTOM_GMAIL_SECRET,
});

3. Client-Side Usage

The default client automatically includes all integrations. You can use it directly:

import { client } from "integrate-sdk";

await client.authorize("gmail");
const result = await client.gmail.sendMessage({
  to: "value",
});

console.log(result);

If you're using a custom client, add the integration to the integrations array:

import { createMCPClient, gmailIntegration } from "integrate-sdk";

const customClient = createMCPClient({
  integrations: [gmailIntegration()],
});

Configuration Options

Prop

Type

Tools

gmail_create_draft

Create a draft message

Prop

Type

gmail_get_attachment

Get a message attachment payload

Prop

Type

gmail_get_message

Get a specific message by ID

Prop

Type

gmail_get_thread

Get a specific thread by ID

Prop

Type

gmail_list_messages

List messages in the mailbox

Prop

Type

gmail_list_threads

List threads in the mailbox

Prop

Type

gmail_modify_message

Modify labels on a message

Prop

Type

gmail_reply_message

Reply to a message in a thread

Prop

Type

gmail_search_messages

Search messages with query

Prop

Type

gmail_send_message

Send a message

Prop

Type

gmail_trash_message

Move a message to trash

Prop

Type

Notes

  • Category: Communication
  • Authentication mode: OAuth

On this page