Metadata-Version: 2.4
Name: gsuite-mcp
Version: 0.7.0
Summary: MCP server for Google Workspace (Gmail, Calendar, Drive, Sheets, Tasks, Contacts, read-only Search Console, GA4, Tag Manager), built on gsuite-sdk
Author-email: Pablo Alaniz <alanizpablo@gmail.com>
License: MIT
Project-URL: Homepage, https://pabloalaniz.github.io/google-suite/
Project-URL: Repository, https://github.com/PabloAlaniz/google-suite
Keywords: mcp,model-context-protocol,google-workspace,gmail,google-sheets,agents
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Communications :: Email
Classifier: Topic :: Office/Business
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: gsuite-sdk>=0.3.0
Requires-Dist: mcp<3,>=2.3

# gsuite-mcp

<!-- mcp-name: io.github.PabloAlaniz/gsuite-sdk -->

An [MCP](https://modelcontextprotocol.io) server for Google Workspace: Gmail,
Calendar, Drive, Sheets, Tasks and Contacts, built on
[gsuite-sdk](https://pypi.org/project/gsuite-sdk/). It runs locally over stdio
and uses your own Google login.

## Setup

1. Get an OAuth client file from Google Cloud
   ([guide](https://pabloalaniz.github.io/google-suite/GETTING_CREDENTIALS/))
   and log in once with the gsuite CLI:

   ```bash
   pip install "gsuite-sdk[cli]"
   gsuite auth login                                   # Gmail, Calendar, Drive, Sheets
   gsuite auth login --force --scopes default,tasks,contacts   # + Tasks and Contacts
   gsuite auth login --force --scopes default,tasks,contacts,marketing  # + Search Console, GA4, Tag Manager (read-only)
   ```

   The token is saved to `tokens.db` in the current directory (or
   `GSUITE_TOKEN_DB_PATH`).

2. Add the server to your MCP client, pointing at that token with absolute
   paths:

   ```json
   {
     "mcpServers": {
       "gsuite": {
         "command": "uvx",
         "args": ["gsuite-mcp"],
         "env": {
           "GSUITE_TOKEN_DB_PATH": "/Users/you/gsuite/tokens.db",
           "GSUITE_CREDENTIALS_FILE": "/Users/you/gsuite/credentials.json",
           "GSUITE_DEFAULT_TIMEZONE": "America/Argentina/Buenos_Aires"
         }
       }
     }
   }
   ```

   Claude Code: `claude mcp add gsuite -e GSUITE_TOKEN_DB_PATH=/Users/you/gsuite/tokens.db -- uvx gsuite-mcp`

## Tools

| Area | Tools |
|---|---|
| Account | `auth_status` |
| Gmail | `gmail_search`, `gmail_read`, `gmail_send`, `gmail_reply`, `gmail_create_draft` |
| Calendar | `calendar_list_events`, `calendar_create_event`, `calendar_delete_event`, `calendar_free_busy` |
| Drive | `drive_search`, `drive_read_file`, `drive_upload`, `drive_share` |
| Sheets | `sheets_read`, `sheets_append`, `sheets_update`, `sheets_upsert` |
| Tasks | `tasks_list`, `tasks_add`, `tasks_complete` |
| Contacts | `contacts_search`, `contacts_get` |
| Search Console (read-only) | `searchconsole_list_sites`, `searchconsole_query`, `searchconsole_inspect_url`, `searchconsole_list_sitemaps` |
| Analytics GA4 (read-only) | `analytics_account_summaries`, `analytics_list_properties`, `analytics_run_report`, `analytics_run_realtime_report` |
| Tag Manager (read-only) | `tagmanager_list_accounts`, `tagmanager_list_containers`, `tagmanager_list_workspaces`, `tagmanager_list_tags`, `tagmanager_list_triggers`, `tagmanager_list_variables`, `tagmanager_list_versions` |

Search Console, Analytics and Tag Manager need the opt-in read-only scopes
(`--scopes ...,marketing`) and their APIs enabled in your Cloud project. A login
replaces the stored scopes, so keep listing the sets you already use.

Read tools are annotated read-only; tools that send, share, overwrite or
delete are marked so clients can ask before running them. Dates are ISO 8601;
times without an offset use `GSUITE_DEFAULT_TIMEZONE` (UTC by default).

The same capabilities are available as an [agent skill](https://github.com/PabloAlaniz/google-suite/tree/main/skills/gsuite-sdk),
a CLI and a REST API: see [gsuite-sdk](https://pabloalaniz.github.io/google-suite/).

## License

MIT
