{"_id":"@alanxchen/google-workspace-mcp","_rev":"5-86ed20e6ceb1ee9509cd2c2f82323967","name":"@alanxchen/google-workspace-mcp","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@alanxchen/google-workspace-mcp","version":"1.0.0","keywords":["mcp","model-context-protocol","google-workspace","gmail","calendar","drive","oauth"],"author":{"name":"alanx"},"license":"MIT","_id":"@alanxchen/google-workspace-mcp@1.0.0","maintainers":[{"name":"alanxchen","email":"alanxchen+oss@gmail.com"}],"bin":{"google-workspace-mcp":"build/index.js"},"dist":{"shasum":"6ee1902aace01d997ecdebf50e39e142d99784b3","tarball":"https://registry.npmjs.org/@alanxchen/google-workspace-mcp/-/google-workspace-mcp-1.0.0.tgz","fileCount":40,"integrity":"sha512-dxzlt0XYvu+Z8eu6dQptl7Be3updEoVGJyVld2j4Ae/TNJcG/aESRTGbd040paZTopDmfdJgxRz5asDjiuL1hw==","signatures":[{"sig":"MEYCIQCOQXbdKEwKTK9yXbUgBA+U/dLyfCxZzS1mJXmFEyqKCgIhANDLEKsckmkfl0g5u3kTLdYPaonz/BUrOYXl0SEFQy5y","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":150476},"main":"./build/index.js","type":"module","types":"./build/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":"./build/index.js"},"gitHead":"cc996305b5ead4ffb13b8d784bfb3903e948bd5a","scripts":{"dev":"tsc && node build/index.js","build":"tsc","start":"node build/index.js","watch":"tsc --watch","prepare":"npm run build"},"_npmUser":{"name":"alanxchen","email":"alanxchen+oss@gmail.com"},"_npmVersion":"11.6.2","description":"Unified Google Workspace MCP Server for Gmail, Calendar, Drive, Docs, Sheets, Slides, and People","directories":{},"_nodeVersion":"24.13.0","dependencies":{"open":"^10.1.0","googleapis":"^144.0.0","@modelcontextprotocol/sdk":"^1.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/google-workspace-mcp_1.0.0_1771324544185_0.00008621497424510238","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@alanxchen/google-workspace-mcp","version":"1.0.1","keywords":["mcp","model-context-protocol","google-workspace","gmail","calendar","drive","oauth"],"author":{"name":"alanx"},"license":"MIT","_id":"@alanxchen/google-workspace-mcp@1.0.1","maintainers":[{"name":"alanxchen","email":"alanxchen+oss@gmail.com"}],"bin":{"google-workspace-mcp":"build/index.js"},"dist":{"shasum":"f1654a3fb079f92cfc540ca13b2b8cd2692829ec","tarball":"https://registry.npmjs.org/@alanxchen/google-workspace-mcp/-/google-workspace-mcp-1.0.1.tgz","fileCount":40,"integrity":"sha512-nn+40YcDe45vf/3xjywzNccBWaKSwGA3g++K2GzonRMWhXhJVo5BNqebN/1GxRR+Wvcj3A7Ixo02ZRwVvWsPLA==","signatures":[{"sig":"MEQCIBGs2B1QYGNHTlEYZk6PoJ943RoirLMbZeMhnt0HynH1AiBNBt2FN60B1DNBBkhclnERGBusGfG6RO18sRoMPgsx1Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":157622},"main":"./build/index.js","type":"module","types":"./build/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":"./build/index.js"},"gitHead":"cc996305b5ead4ffb13b8d784bfb3903e948bd5a","scripts":{"dev":"tsc && node build/index.js","build":"tsc","start":"node build/index.js","watch":"tsc --watch","prepare":"npm run build"},"_npmUser":{"name":"alanxchen","email":"alanxchen+oss@gmail.com"},"_npmVersion":"11.6.2","description":"Unified Google Workspace MCP Server for Gmail, Calendar, Drive, Docs, Sheets, Slides, and People","directories":{},"_nodeVersion":"24.13.0","dependencies":{"open":"^10.1.0","googleapis":"^144.0.0","@modelcontextprotocol/sdk":"^1.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/google-workspace-mcp_1.0.1_1771325415350_0.8060715692517282","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@alanxchen/google-workspace-mcp","version":"1.0.2","keywords":["mcp","model-context-protocol","google-workspace","gmail","calendar","drive","oauth"],"author":{"name":"alanx"},"license":"MIT","_id":"@alanxchen/google-workspace-mcp@1.0.2","maintainers":[{"name":"alanxchen","email":"alanxchen+oss@gmail.com"}],"bin":{"google-workspace-mcp":"build/index.js"},"dist":{"shasum":"b24be6f8c5c919cee1f3ccaa9cc84d4047f70301","tarball":"https://registry.npmjs.org/@alanxchen/google-workspace-mcp/-/google-workspace-mcp-1.0.2.tgz","fileCount":40,"integrity":"sha512-qaMe655aJNrHvVJcUjQDQ1ncC8IGvpU2CW1PVSFNnfuyyAXmI5STwxUJKFksMwzvSY34Gq+smYNOilosbnV5gQ==","signatures":[{"sig":"MEYCIQC4jG0VFJbK1Y06g1UgVVmODxKAD39RzF5LAEkEfcIqPQIhAPGjC2otN8FpzSLRXlOGKKriCrwvnnXuhRx+OfzoWen5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":157957},"main":"./build/index.js","type":"module","types":"./build/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":"./build/index.js"},"gitHead":"cc996305b5ead4ffb13b8d784bfb3903e948bd5a","scripts":{"dev":"tsc && node build/index.js","build":"tsc","start":"node build/index.js","watch":"tsc --watch","prepare":"npm run build"},"_npmUser":{"name":"alanxchen","email":"alanxchen+oss@gmail.com"},"_npmVersion":"11.6.2","description":"Unified Google Workspace MCP Server for Gmail, Calendar, Drive, Docs, Sheets, Slides, and People","directories":{},"_nodeVersion":"24.13.0","dependencies":{"open":"^10.1.0","googleapis":"^144.0.0","@modelcontextprotocol/sdk":"^1.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/google-workspace-mcp_1.0.2_1771330500318_0.8036968525154109","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@alanxchen/google-workspace-mcp","version":"2.0.0","keywords":["mcp","model-context-protocol","google-workspace","gmail","calendar","drive","oauth"],"author":{"name":"alanx"},"license":"MIT","_id":"@alanxchen/google-workspace-mcp@2.0.0","maintainers":[{"name":"alanxchen","email":"alanxchen+oss@gmail.com"}],"bin":{"google-workspace-mcp":"build/index.js"},"dist":{"shasum":"7de0d621acf136fb5673ea2bdbc20d50503ac7e3","tarball":"https://registry.npmjs.org/@alanxchen/google-workspace-mcp/-/google-workspace-mcp-2.0.0.tgz","fileCount":41,"integrity":"sha512-D1OinPOvDJ62RkDjvQcOzB/4cASKhmoxA4HvnIL+1WZB6kYMvwUJUDPbWN8ILF/6MwEfQ8ETuMIXyDDA2DT0/A==","signatures":[{"sig":"MEUCIBAg/BDkpoL/8xZEngxSp3VYK6Twi5bxKDIgwAi0bg2sAiEA2bX1TyRZd/4pA4SHoLWd2PFf0z9fEjLd4s+liPs+BAo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":159296},"main":"./build/index.js","type":"module","types":"./build/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":"./build/index.js"},"gitHead":"c1857504abed61b50443118a907762ec463724f6","scripts":{"dev":"tsc && node build/index.js","build":"tsc","start":"node build/index.js","watch":"tsc --watch","prepare":"npm run build"},"_npmUser":{"name":"alanxchen","email":"alanxchen+oss@gmail.com"},"_npmVersion":"10.9.4","description":"Unified Google Workspace MCP Server for Gmail, Calendar, Drive, Docs, Sheets, Slides, and People","directories":{},"_nodeVersion":"22.22.0","dependencies":{"open":"^10.1.0","googleapis":"^144.0.0","@modelcontextprotocol/sdk":"^1.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/google-workspace-mcp_2.0.0_1771515840065_0.07602510622629488","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@alanxchen/google-workspace-mcp","version":"2.0.1","description":"Unified Google Workspace MCP Server for Gmail, Calendar, Drive, Docs, Sheets, Slides, and People","type":"module","main":"./build/index.js","exports":{".":"./build/index.js"},"bin":{"google-workspace-mcp":"build/index.js"},"scripts":{"build":"tsc","watch":"tsc --watch","start":"node build/index.js","dev":"tsc && node build/index.js","prepare":"npm run build"},"keywords":["mcp","model-context-protocol","google-workspace","gmail","calendar","drive","oauth"],"author":{"name":"alanx"},"license":"MIT","publishConfig":{"access":"public"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.4","googleapis":"^144.0.0","open":"^10.1.0"},"devDependencies":{"@types/node":"^22.10.2","typescript":"^5.7.2"},"engines":{"node":">=18.0.0"},"_id":"@alanxchen/google-workspace-mcp@2.0.1","gitHead":"59a568e29e681d204a1e2fead8534341a6202078","types":"./build/index.d.ts","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-ONnHM2H+/AAIi96WBC+NynI0V+x8IKuq2GL0d1yUdgx2uzuHbfqq+tZTUDOYTEHr2KTwerbUresliUeIV6olPA==","shasum":"350e63db08b9520518f9fc8bdd38f910d32af3d3","tarball":"https://registry.npmjs.org/@alanxchen/google-workspace-mcp/-/google-workspace-mcp-2.0.1.tgz","fileCount":41,"unpackedSize":189111,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDeTMQQ/bSMXV9QtEwiSKjgpH7gCSt346FQAH3cHNjP3AIgIhpwBsTs5V4m6JYC9nNtrBX9ONUvJSvVCZZVQpZ2l/8="}]},"_npmUser":{"name":"alanxchen","email":"alanxchen+oss@gmail.com"},"directories":{},"maintainers":[{"name":"alanxchen","email":"alanxchen+oss@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/google-workspace-mcp_2.0.1_1771567136541_0.3985919629921786"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-17T10:35:44.057Z","modified":"2026-02-20T05:58:56.792Z","1.0.0":"2026-02-17T10:35:44.330Z","1.0.1":"2026-02-17T10:50:15.481Z","1.0.2":"2026-02-17T12:15:00.512Z","2.0.0":"2026-02-19T15:44:00.204Z","2.0.1":"2026-02-20T05:58:56.695Z"},"author":{"name":"alanx"},"license":"MIT","keywords":["mcp","model-context-protocol","google-workspace","gmail","calendar","drive","oauth"],"description":"Unified Google Workspace MCP Server for Gmail, Calendar, Drive, Docs, Sheets, Slides, and People","maintainers":[{"name":"alanxchen","email":"alanxchen+oss@gmail.com"}],"readme":"# Google Workspace MCP Server\n\nA unified Model Context Protocol (MCP) server for Gmail, Google Calendar, Google Drive, Google Docs, Google Sheets, Google Slides, and Google People.\n\n## Highlights\n- 45 tools across Gmail, Calendar, Drive, Docs, Sheets, Slides, and People APIs\n- Published npm package for easy MCP client integration\n- OAuth token caching to avoid repeated auth prompts\n- Robust auth modes for both local desktop and sandboxed environments\n- Non-blocking MCP startup (tool discovery is not blocked by auth)\n\n## Package\n```bash\nnpx -y @alanxchen/google-workspace-mcp@1.0.2\n```\n\n## Features\n### Gmail (11 tools)\n- Search emails with Gmail query syntax\n- Read, send, and reply to emails\n- Send emails with optional file attachments (`attachmentPaths` or `attachments`)\n- Create drafts\n- Trash emails, mark as read/unread\n- List and manage labels\n- Get profile information\n\n### Calendar (8 tools)\n- List calendars and events\n- Create, update, and delete events\n- Find free time slots\n- Quick add events with natural language\n\n### Drive (11 tools)\n- List and search files\n- Get file metadata and content\n- Create folders, copy/move/delete files\n- Share files with permissions\n- Export Google Docs/Sheets/Slides\n- Get storage quota\n\n### Docs (4 tools)\n- List document structure\n- Read document text\n- Create docs\n- Append text to docs\n\n### Sheets (4 tools)\n- Read cell ranges\n- Update cell ranges\n- Append rows\n- Create spreadsheets\n\n### Slides (3 tools)\n- Get presentation metadata\n- Create presentations\n- Create slides\n\n### People (4 tools)\n- List contacts\n- Search contacts\n- Create contacts\n- Get contact details\n\n## Prerequisites\n- Node.js 18+\n- Google Cloud project with these APIs enabled:\n  - Gmail API\n  - Google Calendar API\n  - Google Drive API\n  - Google Docs API\n  - Google Sheets API\n  - Google Slides API\n  - Google People API\n- OAuth 2.0 Desktop app credentials JSON\n\n## OAuth Setup\n1. In Google Cloud Console, configure OAuth consent screen and add required scopes:\n   - `https://www.googleapis.com/auth/gmail.modify`\n   - `https://www.googleapis.com/auth/calendar`\n   - `https://www.googleapis.com/auth/drive`\n   - `https://www.googleapis.com/auth/documents`\n   - `https://www.googleapis.com/auth/spreadsheets`\n   - `https://www.googleapis.com/auth/presentations`\n   - `https://www.googleapis.com/auth/contacts`\n2. Create OAuth client credentials with application type: **Desktop app**\n3. Save credentials JSON to:\n   - Windows: `%USERPROFILE%\\.google-workspace-mcp\\credentials.json`\n   - macOS/Linux: `~/.google-workspace-mcp/credentials.json`\n\n## Authentication Behavior\n- Credentials are loaded from `~/.google-workspace-mcp/credentials.json`\n- Tokens are saved at `~/.google-workspace-mcp/token.json`\n- Startup is non-blocking; auth is initialized on first tool call\n- Auth flow mode is controlled by `GOOGLE_WORKSPACE_MCP_AUTH_FLOW`:\n  - `auto` (default): browser callback first, then device-code fallback\n  - `browser`: force localhost callback browser flow\n  - `device`: force device-code flow\n\n## Client Configuration\n### Manus\n```json\n{\n  \"mcpServers\": {\n    \"google-workspace\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@alanxchen/google-workspace-mcp@1.0.2\"]\n    }\n  }\n}\n```\n\nIf browser callback cannot complete in the sandbox, use device flow:\n\n```json\n{\n  \"mcpServers\": {\n    \"google-workspace\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@alanxchen/google-workspace-mcp@1.0.2\"],\n      \"env\": {\n        \"GOOGLE_WORKSPACE_MCP_AUTH_FLOW\": \"device\"\n      }\n    }\n  }\n}\n```\n\n### Claude Desktop\n**Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`  \n**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"google-workspace\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@alanxchen/google-workspace-mcp@1.0.2\"]\n    }\n  }\n}\n```\n\n### OpenClaw / Other MCP clients\nUse the same stdio command:\n\n```json\n{\n  \"google-workspace\": {\n    \"command\": \"npx\",\n    \"args\": [\"-y\", \"@alanxchen/google-workspace-mcp@1.0.2\"]\n  }\n}\n```\n\n## Local Development\n```bash\nnpm install\nnpm run build\nnpm start\n```\n\n## Example Prompts\n- \"Search my unread emails from last week\"\n- \"Create a calendar event for tomorrow at 2pm\"\n- \"List Drive files modified in the last 7 days\"\n- \"Append these rows to my Google Sheet\"\n- \"Find contact details for Jane in Google Contacts\"\n\n## Security\n- Tokens are stored locally in user home directory\n- No credentials or tokens are packaged in npm release artifacts\n- Never commit `credentials.json` or `token.json`\n- Revoke OAuth grants at https://myaccount.google.com/permissions\n\n## Architecture\n```\nsrc/\n├── index.ts          # MCP server entry + request handlers\n├── auth.ts           # OAuth auth + token management\n└── tools/            # Google Workspace capability handlers\n```\n\n## License\nMIT\n","readmeFilename":"README.md"}