How to integrate Gmail using MCP
Search and read Gmail mailbox data. This guide creates an MCP server from Arthur's Gmail template — tools preconfigured against https://gmail.googleapis.com/gmail/v1 — and finishes by sharing the server's MCP swagger documentation.
Steps
Open the Secrets vault and create a secret named
GMAIL_API_KEYholding your access token. Enable the Gmail API in a Google Cloud project, complete the OAuth 2.0 consent flow with the narrowest required Gmail scope, and provide the resulting access token as a Bearer token. Reading message content normally requires the restricted gmail.readonly scope and may trigger Google verification requirements.


Go to the REST API Templates gallery and search for Gmail.


Click Use template on the Gmail card to open the server-creation dialog.


Review the server name and select
GMAIL_API_KEYin the credential field — the dialog only accepts vault secrets, and it lists every tool that will be created.


Click Create server. Arthur creates the server, applies the authentication, and generates all the tools.





Open the server's Tools tab to review the generated tools.

Open the server's Connect section and click Share the MCP swagger documentation — Arthur generates the public documentation link and QR code for this server.



Confirm it worked
The server appears with 4 preconfigured tool(s): get_profile, list_messages, get_message, list_labels. The Connect section offers the MCP swagger documentation — a shareable page with setup instructions for any AI client.
Good to know
- Inspect the authenticated Gmail user's mailbox profile, search and retrieve messages, and list mailbox labels through the official Gmail API.
- This integration requires a credential (bearer). Get one at https://console.cloud.google.com/.
- Official API documentation: https://developers.google.com/workspace/gmail/api/reference/rest
- Editing a tool later never changes the template — templates are starting points, and the server is fully yours after creation.
Related
Tutorial video