{"id":23479525,"url":"https://github.com/MarkusPfundstein/mcp-gsuite","last_synced_at":"2025-08-27T07:31:23.706Z","repository":{"id":265953072,"uuid":"896638209","full_name":"MarkusPfundstein/mcp-gsuite","owner":"MarkusPfundstein","description":"MCP Server to interact with Google Gsuite prodcuts","archived":false,"fork":false,"pushed_at":"2025-04-14T10:41:50.000Z","size":93,"stargazers_count":353,"open_issues_count":17,"forks_count":71,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-24T09:01:00.571Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarkusPfundstein.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-30T22:32:38.000Z","updated_at":"2025-05-23T17:04:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"2a9b2a38-a22b-41ae-9484-2c21c79fec11","html_url":"https://github.com/MarkusPfundstein/mcp-gsuite","commit_stats":null,"previous_names":["markuspfundstein/mcp-gsuite"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MarkusPfundstein/mcp-gsuite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkusPfundstein%2Fmcp-gsuite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkusPfundstein%2Fmcp-gsuite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkusPfundstein%2Fmcp-gsuite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkusPfundstein%2Fmcp-gsuite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarkusPfundstein","download_url":"https://codeload.github.com/MarkusPfundstein/mcp-gsuite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkusPfundstein%2Fmcp-gsuite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272304637,"owners_count":24910603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-27T02:00:09.397Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-24T19:30:04.545Z","updated_at":"2025-08-27T07:31:23.700Z","avatar_url":"https://github.com/MarkusPfundstein.png","language":"Python","funding_links":[],"categories":["Google Workspace","Productivity","Workplace \u0026 Productivity","API Integration MCP Servers","📚 Projects (1974 total)","MCP 服务器精选列表","Legend","🤖 AI/ML","サーバー実装","MCP Servers","Scheduling and Calendars","MCP Frameworks and libraries","Python","Uncategorized","Table of Contents","Server Implementations"],"sub_categories":["Google Workspace","MCP Servers","💬 通讯与协作 (Slack, Email, Calendar, Social, etc.)","💬 \u003ca name=\"communication\"\u003e\u003c/a\u003eCommunication","💬 \u003ca name=\"communication\"\u003e\u003c/a\u003eコミュニケーション","💬 Communication","Python","Uncategorized","Other Tools and Integrations","🏢 \u003ca name=\"workplace-and-productivity\"\u003e\u003c/a\u003eWorkplace \u0026 Productivity"],"readme":"# mcp-gsuite MCP server\n\n[![smithery badge](https://smithery.ai/badge/mcp-gsuite)](https://smithery.ai/server/mcp-gsuite)\nMCP server to interact with Google products.\n\n## Example prompts\n\nRight now, this MCP server supports Gmail and Calendar integration with the following capabilities:\n\n1. General\n* Multiple google accounts\n\n2. Gmail\n* Get your Gmail user information\n* Query emails with flexible search (e.g., unread, from specific senders, date ranges, with attachments)\n* Retrieve complete email content by ID\n* Create new draft emails with recipients, subject, body and CC options\n* Delete draft emails\n* Reply to existing emails (can either send immediately or save as draft)\n* Retrieve multiple emails at once by their IDs.\n* Save multiple attachments from emails to your local system.\n\n3. Calendar\n* Manage multiple calendars\n* Get calendar events within specified time ranges\n* Create calendar events with:\n  + Title, start/end times\n  + Optional location and description\n  + Optional attendees\n  + Custom timezone support\n  + Notification preferences\n* Delete calendar events\n\nExample prompts you can try:\n\n* Retrieve my latest unread messages\n* Search my emails from the Scrum Master\n* Retrieve all emails from accounting\n* Take the email about ABC and summarize it\n* Write a nice response to Alice's last email and upload a draft.\n* Reply to Bob's email with a Thank you note. Store it as draft\n\n* What do I have on my agenda tomorrow?\n* Check my private account's Family agenda for next week\n* I need to plan an event with Tim for 2hrs next week. Suggest some time slots.\n\n## Quickstart\n\n### Install\n\n### Installing via Smithery\n\nTo install mcp-gsuite for Claude Desktop automatically via [Smithery](https://smithery.ai/server/mcp-gsuite):\n\n```bash\nnpx -y @smithery/cli install mcp-gsuite --client claude\n```\n\n#### Oauth 2\n\nGoogle Workspace (G Suite) APIs require OAuth2 authorization. Follow these steps to set up authentication:\n\n1. Create OAuth2 Credentials:\n   - Go to the [Google Cloud Console](https://console.cloud.google.com/)\n   - Create a new project or select an existing one\n   - Enable the Gmail API and Google Calendar API for your project\n   - Go to \"Credentials\" → \"Create Credentials\" → \"OAuth client ID\"\n   - Select \"Desktop app\" or \"Web application\" as the application type\n   - Configure the OAuth consent screen with required information\n   - Add authorized redirect URIs (include `http://localhost:4100/code` for local development)\n\n2. Required OAuth2 Scopes:\n   \n\n```json\n   [\n     \"openid\",\n     \"https://mail.google.com/\",\n     \"https://www.googleapis.com/auth/calendar\",\n     \"https://www.googleapis.com/auth/userinfo.email\"\n   ]\n```\n\n3. Then create a `.gauth.json` in your working directory with client\n\n```json\n{\n    \"web\": {\n        \"client_id\": \"$your_client_id\",\n        \"client_secret\": \"$your_client_secret\",\n        \"redirect_uris\": [\"http://localhost:4100/code\"],\n        \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n        \"token_uri\": \"https://oauth2.googleapis.com/token\"\n    }\n}\n```\n\n4. Create a `.accounts.json` file with account information\n\n```json\n{\n    \"accounts\": [\n        {\n            \"email\": \"alice@bob.com\",\n            \"account_type\": \"personal\",\n            \"extra_info\": \"Additional info that you want to tell Claude: E.g. 'Contains Family Calendar'\"\n        }\n    ]\n}\n```\n\nYou can specifiy multiple accounts. Make sure they have access in your Google Auth app. The `extra_info` field is especially interesting as you can add info here that you want to tell the AI about the account (e.g. whether it has a specific agenda)\n\nNote: When you first execute one of the tools for a specific account, a browser will open, redirect you to Google and ask for your credentials, scope, etc. After a successful login, it stores the credentials in a local file called `.oauth.{email}.json` . Once you are authorized, the refresh token will be used.\n\n#### Claude Desktop\n\nOn MacOS: `~/Library/Application\\ Support/Claude/claude_desktop_config.json`\n\nOn Windows: `%APPDATA%/Claude/claude_desktop_config.json`\n\n\u003cdetails\u003e\n  \u003csummary\u003eDevelopment/Unpublished Servers Configuration\u003c/summary\u003e\n  \n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-gsuite\": {\n      \"command\": \"uv\",\n      \"args\": [\n        \"--directory\",\n        \"\u003cdir_to\u003e/mcp-gsuite\",\n        \"run\",\n        \"mcp-gsuite\"\n      ]\n    }\n  }\n}\n```\n\n\nNote: You can also use the `uv run mcp-gsuite --accounts-file /path/to/custom/.accounts.json` to specify a different accounts file or `--credentials-dir /path/to/custom/credentials` to specify a different credentials directory.\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-gsuite\": {\n      \"command\": \"uv\",\n      \"args\": [\n        \"--directory\",\n        \"\u003cdir_to\u003e/mcp-gsuite\",\n        \"run\",\n        \"mcp-gsuite\",\n        \"--accounts-file\",\n        \"/path/to/custom/.accounts.json\",\n        \"--credentials-dir\",\n        \"/path/to/custom/credentials\"\n      ]\n    }\n  }\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003ePublished Servers Configuration\u003c/summary\u003e\n  \n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-gsuite\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"mcp-gsuite\",\n        \"--accounts-file\",\n        \"/path/to/custom/.accounts.json\",\n        \"--credentials-dir\",\n        \"/path/to/custom/credentials\"\n      ]\n    }\n  }\n}\n```\n\n\u003c/details\u003e\n\n### Configuration Options\n\nThe MCP server can be configured with several command-line options to specify custom paths for authentication and account information:\n\n* `--gauth-file`: Specifies the path to the `.gauth.json` file containing OAuth2 client configuration. Default is `./.gauth.json`.\n* `--accounts-file`: Specifies the path to the `.accounts.json` file containing information about the Google accounts. Default is `./.accounts.json`.\n* `--credentials-dir`: Specifies the directory where OAuth credentials are stored after successful authentication. Default is the current working directory with a subdirectory for each account as `.oauth.{email}.json`.\n\nThese options allow for flexibility in managing different environments or multiple sets of credentials and accounts, especially useful in development and testing scenarios.\n\nExample usage:\n\n```bash\nuv run mcp-gsuite --gauth-file /path/to/custom/.gauth.json --accounts-file /path/to/custom/.accounts.json --credentials-dir /path/to/custom/credentials\n```\n\nThis configuration is particularly useful when you have multiple instances of the server running with different configurations or when deploying to environments where the default paths are not suitable.\n\n## Development\n\n### Building and Publishing\n\nTo prepare the package for distribution:\n\n1. Sync dependencies and update lockfile:\n\n```bash\nuv sync\n```\n\n2. Build package distributions:\n\n```bash\nuv build\n```\n\nThis will create source and wheel distributions in the `dist/` directory.\n\n3. Publish to PyPI:\n\n```bash\nuv publish\n```\n\nNote: You'll need to set PyPI credentials via environment variables or command flags:\n* Token: `--token` or `UV_PUBLISH_TOKEN`\n* Or username/password: `--username`/`UV_PUBLISH_USERNAME` and `--password`/`UV_PUBLISH_PASSWORD`\n\n### Debugging\n\nSince MCP servers run over stdio, debugging can be challenging. For the best debugging\nexperience, we strongly recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector).\n\nYou can launch the MCP Inspector via [ `npm` ](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) with this command:\n\n```bash\nnpx @modelcontextprotocol/inspector uv --directory /path/to/mcp-gsuite run mcp-gsuite\n```\n\nUpon launching, the Inspector will display a URL that you can access in your browser to begin debugging.\n\nYou can also watch the server logs with this command:\n\n```bash\ntail -n 20 -f ~/Library/Logs/Claude/mcp-server-mcp-gsuite.log\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarkusPfundstein%2Fmcp-gsuite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMarkusPfundstein%2Fmcp-gsuite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarkusPfundstein%2Fmcp-gsuite/lists"}