## Google Calendar integration

Google Calendar is Google's scheduling service for consumer and Google Workspace accounts.

It can be connected to Agen.co two ways, matching the **Official** / **In-house** filter in the connector picker:

- **Official** — Agen.co connects through Google's own hosted Calendar MCP server, so your AI agents use the same calendar, event, and free/busy tools Google exposes to MCP clients like Claude and Antigravity.
- **In-house** — Agen.co wraps the Google Calendar API directly through its own integration layer, using a dedicated OAuth client you register in Google Cloud Console.


Pick **Official** if the built-in MCP tools cover what your agents need. Fall back to **In-house** if you need broader API coverage.

### Connect via the official MCP server

Prerequisites
- Membership in the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview). The Google Calendar MCP server is a Developer Preview feature. You apply with your Google Workspace account and the Google Cloud project you use for this connector, and Google registers that project, usually within a couple of days, so apply before you start.
- A Google account with access to [Google Cloud Console](https://console.cloud.google.com/)
- A Google Cloud project with the **Google Calendar API** and **Calendar MCP API** enabled


#### Create an OAuth client for MCP access

1. In [Google Cloud Console](https://console.cloud.google.com/apis/library), select your project and enable the **Google Calendar API** and **Calendar MCP API**.
2. Go to **APIs & Services** → **Credentials** and click **Create credentials** → **OAuth client ID**.
3. Set **Application type** to **Web application** and give it a name (for example, `Agen.co Google Calendar MCP`).
4. Switch back to Agen.co, go to **Connectors** → **My connectors**, click **Add connector**, and in the search bar type `Google Calendar` and select it from the results.
5. Get back to Google Cloud Console. Under **Authorized redirect URIs**, click **Add URI** and add **both** URLs Agen.co generates when you open the **Add Google Calendar** panel with **Official** selected:
  - **Callback URL** — completes the initial OAuth handshake between Agen.co and your OAuth client.
  - **Gateway callback URL** — used by the Agen.co MCP gateway for per-user authorization at runtime.
6. Click **Create**, then copy the **Client ID** and **Client Secret** — the Client Secret is shown only once.


Keep your Client Secret safe
The Client Secret is shown only once. If you lose it, return to the client's detail page and generate a new one.

1. In the left sidebar, go to **APIs & Services** → **OAuth consent screen** → **Data access**, and add the following scopes:


| Scope | Description |
|  --- | --- |
| `https://www.googleapis.com/auth/calendar.calendarlist.readonly` | List the user's calendars |
| `https://www.googleapis.com/auth/calendar.events.readonly` | Read events |
| `https://www.googleapis.com/auth/calendar.events.freebusy` | Read free/busy information |
| `https://www.googleapis.com/auth/calendar.events` | Create, update, delete, and respond to events |


1. Return to the Agen.co portal — the **Add Google Calendar** panel should already be open from step 4. Fill in the fields:


| Field | Required | Description |
|  --- | --- | --- |
| **Instance Slug** | Yes | Prefixes each imported tool as `slug__tool`, so a second instance of the same connector needs a slug of its own. Use lowercase kebab-case. You can change it later from the connector's settings. |
| **Client ID** | Yes | The Client ID from the OAuth client you created above. |
| **Client Secret** | Yes | The Client Secret from the OAuth client you created above. |


1. Click **Connect**.
2. You're redirected to Google to sign in and approve access.
3. Return to Agen.co and click **Add** below the list of tools that were added.


Once connected, Google Calendar appears under **My connectors** with tools spanning:

| Area | What it covers |
|  --- | --- |
| **Calendars** | Listing the user's calendars |
| **Events** | Creating, reading, searching, updating, deleting, and responding to events |
| **Availability** | Querying free/busy information |


Every tool call fails with a permission error
If every tool call fails with a permission error such as `The caller does not have permission`, the Google Cloud project that owns your OAuth client isn't registered in the Google Workspace Developer Preview Program. Without registration, sign-in, tool import, policy creation, and per-user authorization all still succeed, and then every tool call fails. Google registers the project you applied with, so make sure your OAuth client belongs to that project. See **Prerequisites** above.

Enabling the Google Calendar connector isn't enough on its own. Tool calls remain denied until you create a [policy](/agen-for-work/policies/overview) that grants access to the specific tools you want to expose.

### Connect via the Google Calendar API

Integrating Google Calendar with Frontegg allows your application to create and manage calendar events, list and update calendars, query free/busy information, and access user settings — all through Frontegg's integration layer using Google OAuth 2.0.

Prerequisites
- A Google account with access to [Google Cloud Console](https://console.cloud.google.com/)
- A Google Cloud project (you can create one during setup)


#### Enable the Google Calendar API

##### Step 1: Open the Google Calendar API in the API library

Go to the [Google Calendar API](https://console.cloud.google.com/apis/library/calendar-json.googleapis.com) page in the Google Cloud Console. Select your project from the top navigation, then click **Enable** if the API is not yet enabled. If you see **Manage** and **API Enabled**, the API is already active.

![Google Calendar API page in Google Cloud Console](/assets/google-calendar-1.6400cb2e449c12fa7944641c1ecbb6a76cc5f01d8efb86f557908aae3273232c.1ce25488.png)

#### Create an OAuth client

##### Step 2: Go to the Credentials page

In the left sidebar, navigate to **APIs & Services** → **Credentials**. Click **Create credentials**.

![Credentials page with Create credentials button highlighted](/assets/google-calendar-2.58318f82db244e9696c94e23194deb2c875c3fccaea86fcee778dcab2b676569.1ce25488.png)

##### Step 3: Select OAuth client ID

From the dropdown, select **OAuth client ID**.

![Create credentials dropdown with OAuth client ID highlighted](/assets/google-calendar-3.9a3ca42018f974bbfdb8528206ecc3edb94a73d64349831b0b3b3ad0b6751382.1ce25488.png)

##### Step 4: Configure the OAuth client

On the **Create OAuth client ID** page:

1. Set **Application type** to **Web application**.
2. Enter a name for the client (for example, `Frontegg Google Calendar Integration`).
3. Under **Authorized redirect URIs**, click **Add URI** and add both of the following:
  - `https://YOUR_MCP_GATEWAY_URL/integration-callback`


![OAuth client form with name and redirect URIs filled in](/assets/google-calendar-4.9ef69a55fc9e999356502f7716a83489f0a5e9462a0397ddd6b137a88699d45d.1ce25488.png)

##### Step 5: Create the client

Click **Create** to save the OAuth client. A dialog will display your **Client ID** and **Client Secret** — copy both values and store them securely.

Save your Client Secret now
The Client Secret is only shown once in this dialog. After you close it, you cannot retrieve it again — you can only create a new secret.

![OAuth client created dialog showing Client ID and blurred Client Secret](/assets/google-calendar-5.6c0d2239efe14aef0118e53e21154b0893f534465916ed6470383a9d3e0bb3ec.1ce25488.png)

#### Copy your credentials

##### Step 6: Copy the Client ID from the credentials list

After closing the dialog, your new client appears at the top of the **OAuth 2.0 Client IDs** list on the Credentials page.

![Credentials page showing the new Frontegg Google Calendar Integration client](/assets/google-calendar-6.8d5b35a1c3ad4924fa425d5b939321eeacd9669b260ac1833463ef07bb7a663d.1ce25488.png)

##### Step 7: View Client ID in the client detail page

Click the client name to open its detail page. You can view and copy the **Client ID** at any time from the **Additional information** section.

![OAuth client detail page showing Client ID](/assets/google-calendar-7.9ecad23d458765add64ab42ae95b8051656eda709075c234b1ac27e22a455fc0.1ce25488.png)

#### Configure the Frontegg portal

Once you have your **Client ID** and **Client Secret**, enter them in the Frontegg portal:

1. Open the **Frontegg portal** and navigate to [ENVIRONMENT] → Integrations → Google Calendar.
2. Enter the **Client ID** and **Client Secret** in the corresponding fields.
3. Select the required **scopes**:


| Scope | Description |
|  --- | --- |
| `https://www.googleapis.com/auth/calendar.events.readonly` | List and read events |
| `https://www.googleapis.com/auth/calendar.events` | Create, update, patch, delete, respond to, and quick-add events |
| `https://www.googleapis.com/auth/calendar.calendars.readonly` | Read a single calendar |
| `https://www.googleapis.com/auth/calendar.calendarlist.readonly` | List the user's calendars |
| `https://www.googleapis.com/auth/calendar.calendars` | Create, update, and delete calendars |
| `https://www.googleapis.com/auth/calendar.freebusy` | Query free/busy information |
| `https://www.googleapis.com/auth/calendar.settings.readonly` | Read calendar settings |


1. Click **Save**.


Keep your credentials secure
Never share or commit your Client Secret to version control.

### Additional resources

- [Google Calendar MCP server setup](https://developers.google.com/workspace/calendar/api/guides/configure-mcp-server)
- [Google Calendar API documentation](https://developers.google.com/calendar/api/v3/reference)
- [Google Cloud Console](https://console.cloud.google.com/)
- [Setting up OAuth 2.0](https://developers.google.com/identity/protocols/oauth2/)
- [How to get your Redirect URL](/agen-for-work/connectors/redirect-url)