{"slug": "let-ai-agents-search-across-workspace-with-the-universal-search-mcp-server", "title": "Let AI agents search across workspace with the Universal Search MCP Server", "summary": "Google released the Universal Search MCP Server for Google Workspace, a Model Context Protocol-based tool that lets AI agents search Gmail messages, Google Drive files, Google Calendar events, and Google Chat spaces and messages through a single interface instead of product-specific tools. The server requires membership in the Google Workspace Developer Preview Program, a Google Cloud project, an MCP client such as Google Antigravity, and OAuth 2.0 authentication, with access scoped per product so that omitting a scope such as gmail.readonly excludes that product's results. Developers enable the Google Workspace MCP API plus the Gmail, Drive, Calendar, and Chat APIs via gcloud or the Google Cloud console.", "body_md": "The Universal Search MCP Server for Google Workspace uses the\n[Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction)\nstandard to allow AI agents to search your Workspace artifacts. This server\nprovides a way to search across multiple Google Workspace products,\nincluding Gmail messages, Google Drive files, Google Calendar\nevents, and Google Chat spaces and messages, using a single tool.\n\nThe Universal Search MCP Server provides a standardized way for AI agents to search for information across your entire Google Workspace account without needing to call individual product-specific tools.\n\n## Prerequisites\n\n- Membership in the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview) .\n- A Google Cloud project. To create a project, see [Create a project](https://developers.google.com/workspace/guides/create-project) .\n- An MCP client, like [Google Antigravity](https://antigravity.google/) .\n- To run the commands on this page, set up the gcloud CLI in one of the following development environments: ### Cloud ShellTo use an online terminal with the gcloud CLI already set up, activate Cloud Shell: ### Local shellTo use a local development environment, follow these steps: \n  1. [Install the Google Cloud CLI](https://cloud.google.com/sdk/docs/install) .\nIf you installed the gcloud CLI previously, make sure you have the\nlatest version by running`gcloud components update` .\n  2. If you're using an external identity provider (IdP), sign in to the\ngcloud CLI with your federated identity. For more information, see\n[Sign in to the gcloud CLI with your federated identity](https://docs.cloud.google.com/iam/docs/workforce-log-in-gcloud) .\n  3. [Initialize the gcloud CLI](https://docs.cloud.google.com/sdk/docs/initializing) .\n\n## Configure the Universal Search MCP Server\n\nTo use the Universal Search MCP Server, you must enable it in your Google Cloud project and then configure your MCP client to connect to it.\n\n### Enable the APIs\n\nTo use the Universal Search MCP Server, enable the Google Workspace MCP API and the APIs for the products that you want to search in your Google Cloud project:\n\n- Gmail API\n- Google Drive API\n- Google Calendar API\n- Google Chat API\n- Google Workspace MCP API\n\n### CLI\n\n```\ngcloud services enable gmail.googleapis.com \\\ndrive.googleapis.com \\\ncalendar-json.googleapis.com \\\nchat.googleapis.com \\\nworkspacemcp.googleapis.com --project=PROJECT_ID\n```\n\nReplace `PROJECT_ID`\n\n### Console\n\nEnable the APIs in the Google Cloud console:\n\n### Set up the OAuth consent screen\n\nThe Universal Search MCP Server uses OAuth 2.0 for authentication and authorization. You must configure the OAuth consent screen before you can create an OAuth client ID.\n\nIf you have already configured the OAuth consent screen for other MCP servers, ensure you have added the required scopes for the Universal Search MCP Server.\n\nWhen you authenticate with the Universal Search MCP Server, you can choose to authenticate all requested scopes or only a subset of them. The server respects these choices and only searches across the products for which access has been granted.\n\nFor example, if you authenticate with all of the following scopes:\n\n- `https://www.googleapis.com/auth/gmail.readonly`\n- `https://www.googleapis.com/auth/drive.readonly`\n- `https://www.googleapis.com/auth/calendar.readonly`\n- `https://www.googleapis.com/auth/chat.messages.readonly`\n\nUniversal Search MCP Server will search across Gmail, Google Drive, Google Calendar, and Google Chat.\n\nHowever, if you only grant access to\n`https://www.googleapis.com/auth/drive.readonly`,\n`https://www.googleapis.com/auth/calendar.readonly`,\nand `https://www.googleapis.com/auth/chat.messages.readonly`\n(and omit `https://www.googleapis.com/auth/gmail.readonly`), universal search\nonly returns results from Google Drive, Google Calendar, and Google Chat.\nIt doesn't search your email or return Gmail results.\n\n1. In the Google Cloud console, go to **Google Auth Platform****>****Data Access** .\n2. Click **Add or Remove Scopes** .\n3. Add one or more of the following scopes: \n  - `https://www.googleapis.com/auth/gmail.readonly`\n  - `https://www.googleapis.com/auth/drive.readonly`\n  - `https://www.googleapis.com/auth/calendar.readonly`\n  - `https://www.googleapis.com/auth/chat.messages.readonly`\n4. Click **Update** and then**Save** .\n\nFor detailed instructions on setting up the consent screen, see\n[Configure the Google Workspace MCP servers](https://developers.google.com/workspace/guides/configure-mcp-servers#configure-consent-screen).\n\n### Configure your MCP client\n\nTo add the Universal Search MCP Server to your MCP client, follow the instructions for your client.\n\n### Antigravity\n\nTo add the Universal Search MCP Server to Antigravity,\nadd the server configuration to your `mcp_config.json` file. These\ninstructions support Antigravity 2.0, Antigravity IDE, and Antigravity CLI.\n\n1. Create an OAuth 2.0 client ID and secret of type **Web application** . In the**Authorized redirect URIs** section, click**+ Add URI** , and then add`https://antigravity.google/oauth-callback` in the**URIs** field. For\ninstructions, see[Configure the Google Workspace MCP servers](https://developers.google.com/workspace/guides/configure-mcp-servers#configure-mcp-client) .\n2. Open or create the configuration file `~/.gemini/config/mcp_config.json` .\n3. Add the `workspace-universal` configuration to`mcp_config.json` :\n\n```\n{\n  \"mcpServers\": {\n    \"workspace-universal\": {\n      \"serverUrl\": \"https://workspacemcp.googleapis.com/mcp/v1\",\n      \"oauth\": {\n        \"clientId\": \"OAUTH_CLIENT_ID\",\n        \"clientSecret\": \"OAUTH_CLIENT_SECRET\"\n      }\n    }\n  }\n}\n```\n\n Replace the following: \n`OAUTH_CLIENT_ID`\n`OAUTH_CLIENT_SECRET`\n4. Save `mcp_config.json` .\n5. Authenticate the MCP server. You can authenticate using either the GUI settings or the CLI: \n  - **For Antigravity IDE or GUI (Antigravity 2.0):**\n    1. Open your settings screen (e.g., click **Settings** at the bottom-left or open**Antigravity User Settings** ).\n    2. Navigate to **Customizations** .\n    3. Under **Installed MCP Servers** , click**Refresh** .\n    4. Find `workspace-universal` in the list, click**Authenticate** , sign in to your Google Account, copy the authorization code, paste it into the input dialog, and click**Submit** .\n  - Open your settings screen (e.g., click \n  - **For Antigravity CLI:**\n    1. Start Antigravity CLI: \n\n```\nagy\n```\n\n    2. Open the interactive MCP management panel by running: \n\n```\n/mcp\n```\n\n    3. Use the arrow keys to select `workspace-universal` , move to the**Authenticate** action, and press**Enter** . Complete the sign-in flow in your browser, copy the authorization code, paste it into the terminal prompt, and press**Enter** .\n6. Verify that the server is correctly configured and running: \n  - **For Antigravity IDE or GUI:** A**Sign out** button is displayed next to`workspace-universal` under**Customizations** >**Installed MCP Servers** .\n  - **For Antigravity CLI:** Open the`/mcp` panel to view your configured MCP servers. Verified and authenticated servers display**Authed** next to their names inside the interactive TUI panel. You can select the`workspace-universal` server under the dashboard view to inspect its status and list all of its available tools.\n\n### Claude\n\nTo add the Universal Search MCP Server to Claude, configure a custom connector.\n\n1. Create an OAuth 2.0 client ID and secret of type **Web application** . For\ninstructions, see[Configure the Google Workspace MCP servers](https://developers.google.com/workspace/guides/configure-mcp-servers#claude) .\n2. In Claude settings, add a custom connector: \n  - **Server name** :`Universal Search MCP Server`\n  - **Remote MCP server URL** :`https://workspacemcp.googleapis.com/mcp/v1`\n  - **OAuth client ID** and**OAuth client secret** : Enter your credentials.\n  - **Scopes** : Include`https://www.googleapis.com/auth/gmail.readonly` ,`https://www.googleapis.com/auth/drive.readonly` ,`https://www.googleapis.com/auth/calendar.readonly` , and`https://www.googleapis.com/auth/chat.messages.readonly` .\n\n## Test the Universal Search MCP Server\n\nTry asking your MCP client questions that require searching across different products:\n\n- **\"Find anything related to Project X across my email, docs, and chat messages.\"**\n- **\"When is my next meeting about the marketing plan, and what are the latest notes and chat messages on it?\"**\n\nIf the tools execute successfully and you receive relevant responses from multiple products, your Universal Search MCP Server is correctly configured.\n\n## Supported tools\n\nThe Universal Search MCP Server offers the following tool:\n\n- `search_corpus` : Performs a search across multiple Google Workspace\nproducts (Google Drive, Gmail, Google Calendar, and\nGoogle Chat) based on the provided query.", "url": "https://wpnews.pro/news/let-ai-agents-search-across-workspace-with-the-universal-search-mcp-server", "canonical_source": "https://developers.google.com/workspace/guides/universal-search-mcp", "published_at": "2026-09-21 22:02:10+00:00", "updated_at": "2026-09-21 22:23:48.239598+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-products", "developer-tools"], "entities": ["Google", "Universal Search MCP Server", "Google Workspace", "Model Context Protocol", "Gmail", "Google Drive", "Google Calendar", "Google Chat"], "alternates": {"html": "https://wpnews.pro/news/let-ai-agents-search-across-workspace-with-the-universal-search-mcp-server", "markdown": "https://wpnews.pro/news/let-ai-agents-search-across-workspace-with-the-universal-search-mcp-server.md", "text": "https://wpnews.pro/news/let-ai-agents-search-across-workspace-with-the-universal-search-mcp-server.txt", "jsonld": "https://wpnews.pro/news/let-ai-agents-search-across-workspace-with-the-universal-search-mcp-server.jsonld"}}