{"_id":"@ibarcarty/mcp-server-google-drive","_rev":"8-e552340f9b09fac790777631314a09f5","name":"@ibarcarty/mcp-server-google-drive","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.0":{"name":"@ibarcarty/mcp-server-google-drive","version":"1.0.0","keywords":["mcp","mcp-server","model-context-protocol","google-drive","google-docs","google-sheets","google-workspace","ai","tools","claude","shared-drives","llm"],"author":{"name":"Ibar Carty"},"license":"MIT","_id":"@ibarcarty/mcp-server-google-drive@1.0.0","maintainers":[{"name":"ibarcarty","email":"ibar.carty.h@gmail.com"}],"homepage":"https://github.com/ibarcarty/mcp-server-google-drive#readme","bugs":{"url":"https://github.com/ibarcarty/mcp-server-google-drive/issues"},"bin":{"mcp-server-google-drive":"dist/index.js"},"dist":{"shasum":"6e80f67e6253995875277663b094d4f45ccc782f","tarball":"https://registry.npmjs.org/@ibarcarty/mcp-server-google-drive/-/mcp-server-google-drive-1.0.0.tgz","fileCount":163,"integrity":"sha512-J1swSul9S9rSnVuE2ccSV1lgR+aldK3RaOrt5QZyy0IDHOnq3vVu0Yv0nSxIYnO9exVLWHPggkP70wj9sg/STQ==","signatures":[{"sig":"MEUCIQC9CL8OOnBL/wQlcg2kelPV4sz/55hbx1pPSJFke84S5gIgabpzL5LczSYUoS2bDPZ0mf7lR/iR3yiZiQ0jdzDcYgQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":165650},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"39a59233ec33aaff53fc863ac20b80772913f3ba","scripts":{"dev":"tsx src/index.ts","build":"tsc","watch":"tsc --watch","prepare":"npm run build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"ibarcarty","email":"ibar.carty.h@gmail.com"},"repository":{"url":"git+https://github.com/ibarcarty/mcp-server-google-drive.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for Google Drive with full CRUD operations, shared drive support, and Google Workspace file export","directories":{},"_nodeVersion":"24.13.0","dependencies":{"zod":"^3.25.0","open":"^11.0.0","googleapis":"^171.0.0","google-auth-library":"^10.6.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-google-drive_1.0.0_1776170563359_0.47723373644303924","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ibarcarty/mcp-server-google-drive","version":"1.0.1","keywords":["mcp","mcp-server","model-context-protocol","google-drive","google-docs","google-sheets","google-slides","google-workspace","ai","tools","claude","shared-drives","llm"],"author":{"name":"Ibar Carty"},"license":"MIT","_id":"@ibarcarty/mcp-server-google-drive@1.0.1","maintainers":[{"name":"ibarcarty","email":"ibar.carty.h@gmail.com"}],"homepage":"https://github.com/ibarcarty/mcp-server-google-drive","bugs":{"url":"https://github.com/ibarcarty/mcp-server-google-drive/issues"},"bin":{"mcp-server-google-drive":"dist/index.js"},"dist":{"shasum":"856ba8531b5c1577738fae078a6d7ec69b1c3457","tarball":"https://registry.npmjs.org/@ibarcarty/mcp-server-google-drive/-/mcp-server-google-drive-1.0.1.tgz","fileCount":163,"integrity":"sha512-0EmF0KbCNZzIm/4iI1/Jwe4KK8cIPS85wA6vW9Itu1C3NcYd2VLdGVryPn77cKmfkXx2557zaRAAtx1jZWp19A==","signatures":[{"sig":"MEUCIH2DW4mrANGmGbRUWSdh1nHiN7FlpGGwdZb1G/HHtlbTAiEApcC76N1OZcW1pqjY72hCmL1DWOI+vsmfOAukX3FMqvQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":165860},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"bed6e987eecde1f07094a692981c0671151a0d6f","scripts":{"dev":"tsx src/index.ts","build":"tsc","watch":"tsc --watch","prepare":"npm run build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"ibarcarty","email":"ibar.carty.h@gmail.com"},"repository":{"url":"git+https://github.com/ibarcarty/mcp-server-google-drive.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for Google Drive, Google Docs, Google Sheets, and Google Slides with full read/write operations, shared drive support, and OAuth2 authentication","directories":{},"_nodeVersion":"24.13.0","dependencies":{"zod":"^3.25.0","open":"^11.0.0","googleapis":"^171.0.0","google-auth-library":"^10.6.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-google-drive_1.0.1_1776171866772_0.7810218333620704","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@ibarcarty/mcp-server-google-drive","version":"1.1.0","keywords":["mcp","mcp-server","model-context-protocol","google-drive","google-docs","google-sheets","google-slides","google-workspace","ai","tools","claude","shared-drives","llm","markdown","gfm"],"author":{"name":"Ibar Carty"},"license":"MIT","_id":"@ibarcarty/mcp-server-google-drive@1.1.0","maintainers":[{"name":"ibarcarty","email":"ibar.carty.h@gmail.com"}],"homepage":"https://github.com/ibarcarty/mcp-server-google-drive","bugs":{"url":"https://github.com/ibarcarty/mcp-server-google-drive/issues"},"bin":{"mcp-server-google-drive":"dist/index.js"},"dist":{"shasum":"3b5bddb683dd53a500dd7e14e984656dd460d73a","tarball":"https://registry.npmjs.org/@ibarcarty/mcp-server-google-drive/-/mcp-server-google-drive-1.1.0.tgz","fileCount":191,"integrity":"sha512-ELyAu/6rxE0MEDvB8y03MsXOR6fsJ0exCtNmHj70oG76PXhenNkhXwClsTKW5JHOrNpPVF5penAyWah2zxjiow==","signatures":[{"sig":"MEYCIQDnCUQndQfdcYnUQ3VT1WcKrI9JXlss4XfCIi13LxO5aAIhAISQ8SEpXotXzl46npkd3SgH//a7wdq1lGeiEXE5vGyZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":259245},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"e9cdcdc0d342b07abe9f6894c17c637a4f483b50","scripts":{"dev":"tsx src/index.ts","build":"tsc","watch":"tsc --watch","prepare":"npm run build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"ibarcarty","email":"ibar.carty.h@gmail.com"},"deprecated":"Stale build artifacts included. Please use v1.1.1 or later.","repository":{"url":"git+https://github.com/ibarcarty/mcp-server-google-drive.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for Google Drive, Google Docs, Google Sheets, and Google Slides with full read/write operations, rich markdown-to-docs formatting, theming, shared drive support, and OAuth2 authentication","directories":{},"_nodeVersion":"24.13.0","dependencies":{"zod":"^3.25.0","open":"^11.0.0","unified":"^11.0.5","googleapis":"^171.0.0","remark-gfm":"^4.0.1","remark-parse":"^11.0.0","google-auth-library":"^10.6.0","mdast-util-to-string":"^4.0.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","typescript":"^5.7.0","@types/node":"^22.0.0","@types/mdast":"^4.0.4"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-google-drive_1.1.0_1776559892469_0.1853386408123292","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@ibarcarty/mcp-server-google-drive","version":"1.1.1","keywords":["mcp","mcp-server","model-context-protocol","google-drive","google-docs","google-sheets","google-slides","google-workspace","ai","tools","claude","shared-drives","llm","markdown","gfm"],"author":{"name":"Ibar Carty"},"license":"MIT","_id":"@ibarcarty/mcp-server-google-drive@1.1.1","maintainers":[{"name":"ibarcarty","email":"ibar.carty.h@gmail.com"}],"homepage":"https://github.com/ibarcarty/mcp-server-google-drive","bugs":{"url":"https://github.com/ibarcarty/mcp-server-google-drive/issues"},"bin":{"mcp-server-google-drive":"dist/index.js"},"dist":{"shasum":"80549de77f2057e63aab816cb3b7b20ce337c6c1","tarball":"https://registry.npmjs.org/@ibarcarty/mcp-server-google-drive/-/mcp-server-google-drive-1.1.1.tgz","fileCount":187,"integrity":"sha512-cdkCA5pn1aS8HkofZ8dlybFJONmGaGPYi/ra5zgfxwb95QMwMrJbh8ELO07IlaQDYkmargTZ193KiRkDq1hBAQ==","signatures":[{"sig":"MEQCIBQ6gW0j6/w5rIvX6YBIuYzhfYtWoiWVzBUMjw/ZkwNOAiB5J2WBvPMpt7yajUgKq9NxMXFfH0HiPoMIjOJI/iNyKw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":249457},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"8b779da0295d4d6f29334cb84c2b022506622d8b","scripts":{"dev":"tsx src/index.ts","build":"npm run clean && tsc","clean":"node scripts/clean-dist.mjs","watch":"tsc --watch","prepare":"npm run build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"ibarcarty","email":"ibar.carty.h@gmail.com"},"repository":{"url":"git+https://github.com/ibarcarty/mcp-server-google-drive.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for Google Drive, Google Docs, Google Sheets, and Google Slides with full read/write operations, rich markdown-to-docs formatting, theming, shared drive support, and OAuth2 authentication","directories":{},"_nodeVersion":"24.13.0","dependencies":{"zod":"^3.25.0","open":"^11.0.0","unified":"^11.0.5","googleapis":"^171.0.0","remark-gfm":"^4.0.1","remark-parse":"^11.0.0","google-auth-library":"^10.6.0","mdast-util-to-string":"^4.0.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","typescript":"^5.7.0","@types/node":"^22.0.0","@types/mdast":"^4.0.4"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-google-drive_1.1.1_1776560289775_0.16431570845304622","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@ibarcarty/mcp-server-google-drive","version":"1.2.0","keywords":["mcp","mcp-server","model-context-protocol","google-drive","google-docs","google-sheets","google-slides","google-workspace","ai","tools","claude","shared-drives","llm","markdown","gfm"],"author":{"name":"Ibar Carty"},"license":"MIT","_id":"@ibarcarty/mcp-server-google-drive@1.2.0","maintainers":[{"name":"ibarcarty","email":"ibar.carty.h@gmail.com"}],"homepage":"https://github.com/ibarcarty/mcp-server-google-drive","bugs":{"url":"https://github.com/ibarcarty/mcp-server-google-drive/issues"},"bin":{"mcp-server-google-drive":"dist/index.js"},"dist":{"shasum":"9429e6861f8096312f4dbfc9217f060bb62bd8f7","tarball":"https://registry.npmjs.org/@ibarcarty/mcp-server-google-drive/-/mcp-server-google-drive-1.2.0.tgz","fileCount":199,"integrity":"sha512-/EXjFPXfaxZR6pCEwUrOiSCUG9bpV4IkzTQWQhfIuqQrKE7YjpfNtpfTUyVf4TyZ1mduBTFpGaQmc4VBkA1yGQ==","signatures":[{"sig":"MEUCIQCFTGM8bZzykWCOCjv+sW2D4X7ia+0e0B0YzYMTqmVV8wIgGc1fdbbsNfLJOE9oNKz9wgYfBKFOpw/CIdQXhtDerEU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":292079},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"581c08cf2d133aac8ef40ae81ae416f2541ac0c9","scripts":{"dev":"tsx src/index.ts","test":"tsx --test test/unit/read-file.test.ts test/unit/delete-file.test.ts test/unit/file-info.test.ts","build":"npm run clean && tsc","clean":"node scripts/clean-dist.mjs","smoke":"node test/smoke-live.mjs","watch":"tsc --watch","prepare":"npm run build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"ibarcarty","email":"ibar.carty.h@gmail.com"},"repository":{"url":"git+https://github.com/ibarcarty/mcp-server-google-drive.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for Google Drive, Google Docs, Google Sheets, and Google Slides with full read/write operations, rich markdown-to-docs formatting, theming, shared drive support, and OAuth2 authentication","directories":{},"_nodeVersion":"24.13.0","dependencies":{"zod":"^3.25.0","open":"^11.0.0","unified":"^11.0.5","googleapis":"^171.0.0","remark-gfm":"^4.0.1","remark-parse":"^11.0.0","google-auth-library":"^10.6.0","mdast-util-to-string":"^4.0.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","typescript":"^5.7.0","@types/node":"^22.0.0","@types/mdast":"^4.0.4"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-google-drive_1.2.0_1786540948484_0.6060255092785194","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@ibarcarty/mcp-server-google-drive","version":"1.3.0","keywords":["mcp","mcp-server","model-context-protocol","google-drive","google-docs","google-sheets","google-slides","google-calendar","google-workspace","ai","tools","claude","shared-drives","llm","markdown","gfm"],"author":{"name":"Ibar Carty"},"license":"MIT","_id":"@ibarcarty/mcp-server-google-drive@1.3.0","maintainers":[{"name":"ibarcarty","email":"ibar.carty.h@gmail.com"}],"homepage":"https://github.com/ibarcarty/mcp-server-google-drive","bugs":{"url":"https://github.com/ibarcarty/mcp-server-google-drive/issues"},"bin":{"mcp-server-google-drive":"dist/index.js"},"dist":{"shasum":"214e05f1eb1b4cd00b37edef8fd3938dc094860e","tarball":"https://registry.npmjs.org/@ibarcarty/mcp-server-google-drive/-/mcp-server-google-drive-1.3.0.tgz","fileCount":219,"integrity":"sha512-6s00L7u0Vl3NqM0+IXGQstefqaLalPcHUXqAJwfZH69STL1Vy8W2CLIXRErVC1Rzs7xTLAYJOot0M+KFctoKDg==","signatures":[{"sig":"MEQCIAExDKEKTp168jKnpxfHf8Id5kFm1USWaAm9j4tgl8qFAiAqCH9dq57+gMcdU4+5Kx+WkcF9bECr4lhDeE37I5Om4Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":329950},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"6a5604ba6bb822017fcb43afbc038623897f81c2","scripts":{"dev":"tsx src/index.ts","test":"tsx --test test/unit/read-file.test.ts test/unit/delete-file.test.ts test/unit/file-info.test.ts test/unit/calendar.test.ts","build":"npm run clean && tsc","clean":"node scripts/clean-dist.mjs","smoke":"node test/smoke-live.mjs","watch":"tsc --watch","prepare":"npm run build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"ibarcarty","email":"ibar.carty.h@gmail.com"},"repository":{"url":"git+https://github.com/ibarcarty/mcp-server-google-drive.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for Google Drive, Google Docs, Google Sheets, Google Slides, and Google Calendar with full read/write operations, rich markdown-to-docs formatting, theming, shared drive support, and OAuth2 authentication","directories":{},"_nodeVersion":"24.13.0","dependencies":{"zod":"^3.25.0","open":"^11.0.0","unified":"^11.0.5","googleapis":"^171.0.0","remark-gfm":"^4.0.1","remark-parse":"^11.0.0","google-auth-library":"^10.6.0","mdast-util-to-string":"^4.0.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","typescript":"^5.7.0","@types/node":"^22.0.0","@types/mdast":"^4.0.4"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-google-drive_1.3.0_1786923835823_0.9061929798401531","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@ibarcarty/mcp-server-google-drive","version":"1.4.0","description":"MCP server for Google Drive, Google Docs, Google Sheets, Google Slides, and Google Calendar with full read/write operations, rich markdown-to-docs formatting, theming, shared drive support, and OAuth2 authentication","type":"module","main":"dist/index.js","bin":{"mcp-server-google-drive":"dist/index.js"},"scripts":{"clean":"node scripts/clean-dist.mjs","build":"npm run clean && tsc","prepare":"npm run build","dev":"tsx src/index.ts","watch":"tsc --watch","typecheck":"tsc --noEmit","test":"tsx --test test/unit/read-file.test.ts test/unit/delete-file.test.ts test/unit/file-info.test.ts test/unit/calendar.test.ts test/unit/gmail.test.ts","smoke":"node test/smoke-live.mjs"},"keywords":["mcp","mcp-server","model-context-protocol","google-drive","google-docs","google-sheets","google-slides","google-calendar","google-workspace","ai","tools","claude","shared-drives","llm","markdown","gfm"],"author":{"name":"Ibar Carty"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ibarcarty/mcp-server-google-drive.git"},"homepage":"https://github.com/ibarcarty/mcp-server-google-drive","bugs":{"url":"https://github.com/ibarcarty/mcp-server-google-drive/issues"},"engines":{"node":">=20.0.0"},"dependencies":{"@modelcontextprotocol/sdk":"^1.29.0","google-auth-library":"^10.6.0","googleapis":"^171.0.0","mdast-util-to-string":"^4.0.0","open":"^11.0.0","remark-gfm":"^4.0.1","remark-parse":"^11.0.0","unified":"^11.0.5","zod":"^3.25.0"},"devDependencies":{"@types/mdast":"^4.0.4","@types/node":"^22.0.0","tsx":"^4.7.0","typescript":"^5.7.0"},"gitHead":"42448440649443cfacf37757a19215e6244f2117","types":"./dist/index.d.ts","_id":"@ibarcarty/mcp-server-google-drive@1.4.0","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-fkZQsqC7+05u2nztwtttJWlp5Zaio91ysQ+gRXiqfjXnl01D1xSVkenJccycPq0m6wuBNzyLf4PlB/AbLrgXGg==","shasum":"67322212923001ea19e1d8a36ca948be98248cc1","tarball":"https://registry.npmjs.org/@ibarcarty/mcp-server-google-drive/-/mcp-server-google-drive-1.4.0.tgz","fileCount":227,"unpackedSize":343764,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC27fQVKZuR0fO/LdyQBpHC3uzIcinz1AGEdTWFQmglEwIhAIKOr4Yfaa6WqAWYGjdKFq8EuPeW6P6TusTyoCUSSB8W"}]},"_npmUser":{"name":"ibarcarty","email":"ibar.carty.h@gmail.com"},"directories":{},"maintainers":[{"name":"ibarcarty","email":"ibar.carty.h@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server-google-drive_1.4.0_1787226497195_0.5504797707885771"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-14T12:42:43.287Z","modified":"2026-08-20T11:48:17.494Z","1.0.0":"2026-04-14T12:42:43.500Z","1.0.1":"2026-04-14T13:04:26.941Z","1.1.0":"2026-04-19T00:51:32.626Z","1.1.1":"2026-04-19T00:58:09.935Z","1.2.0":"2026-08-12T13:22:28.633Z","1.3.0":"2026-08-16T23:43:55.966Z","1.4.0":"2026-08-20T11:48:17.353Z"},"bugs":{"url":"https://github.com/ibarcarty/mcp-server-google-drive/issues"},"author":{"name":"Ibar Carty"},"license":"MIT","homepage":"https://github.com/ibarcarty/mcp-server-google-drive","keywords":["mcp","mcp-server","model-context-protocol","google-drive","google-docs","google-sheets","google-slides","google-calendar","google-workspace","ai","tools","claude","shared-drives","llm","markdown","gfm"],"repository":{"type":"git","url":"git+https://github.com/ibarcarty/mcp-server-google-drive.git"},"description":"MCP server for Google Drive, Google Docs, Google Sheets, Google Slides, and Google Calendar with full read/write operations, rich markdown-to-docs formatting, theming, shared drive support, and OAuth2 authentication","maintainers":[{"name":"ibarcarty","email":"ibar.carty.h@gmail.com"}],"readme":"# @ibarcarty/mcp-server-google-drive\n\nA Model Context Protocol (MCP) server for Google Drive, Google Docs, Google Sheets, Google Slides, Google Calendar and Gmail drafts with **full read/write operations** and **rich markdown formatting**. Search, read, create, edit, delete, move, copy files, edit documents with native formatting, manage spreadsheets, modify presentations, manage calendar events, leave Gmail drafts for human review, and control permissions — including shared drives.\n\nBuilt with official Google APIs (`googleapis`) and the official MCP SDK (`@modelcontextprotocol/sdk`).\n\n## Features\n\n- **33 tools** for complete Google Drive, Docs, Sheets, Slides, Calendar and Gmail-draft management\n- **Google Calendar**: list events (recurring events expanded), create timed or all-day events with recurrence (RRULE) and reminders, update, and delete. All-day end dates are inclusive (the server handles the API's exclusive convention)\n- **Gmail drafts — never send**: `gmail_create_draft` leaves a draft in the user's Drafts folder for human review. By design this server ships **no send capability**: the human always presses Send in Gmail\n- **Safe reads for any size**: regular files are read by byte ranges (`offset`/`maxBytes`) — a 90MB file no longer kills the transport, you page through it\n- **Office files readable**: `.docx`/`.xlsx`/`.pptx` (and legacy/OpenDocument variants) are converted to text on read via a temporary Google Workspace copy — no more lossy binary dumps\n- **Shared-drive-aware deletes**: when permanent deletion is not permitted (non-organizer in a shared drive), the file is moved to trash with a clear explanation instead of a misleading `File not found`\n- **File metadata by ID** (`drive_get_file_info`): name, type, size, timestamps, parent folder resolved to its name, shared drive, owners, capabilities\n- **Rich markdown → Google Docs** (`docs_write_markdown`): headings, bold, italic, strikethrough, inline code, code blocks, tables, lists, links, blockquotes — all as native Google Docs formatting\n- **Document theming** (`docs_apply_theme`): apply a consistent visual theme (typography, colors, spacing, margins) to an entire document. Built-in `corporate` and `minimal` themes. Custom themes loadable from a JSON file via env var\n- **Corporate document templates** (`docs_apply_corporate_template`): initialize a document with title, metadata, change log, classification badge, and footer — useful for standard corporate deliverables\n- **Google Docs editing**: read, append, insert, find & replace, and write formatted markdown\n- **Google Sheets editing**: read, write, append rows, and clear cell ranges\n- **Google Slides editing**: read presentations, add slides, insert text, and find & replace\n- **File management**: create, read, update, delete, move, copy files and folders\n- **Permissions**: share files, list access, revoke permissions\n- **Shared drives** supported by default in all operations\n- **Google Workspace export**: Docs → Markdown, Sheets → CSV, Slides → text\n- **Two transport modes**: local (stdio) and remote (Streamable HTTP for Cloud Run)\n- **OAuth2** with automatic token refresh\n- **TypeScript** — fully typed, strict mode\n\n## Quick Start\n\n### 1. Set up OAuth credentials\n\nFollow the [OAuth Setup Guide](docs/oauth-setup.md) to create credentials in Google Cloud Console.\n\n**Important:** You must enable these APIs in your GCP project:\n- Google Drive API\n- Google Docs API\n- Google Sheets API\n- Google Slides API\n- Google Calendar API (for the `calendar_*` tools)\n\n### 2. Install\n\n**From npm:**\n```bash\nnpx @ibarcarty/mcp-server-google-drive auth\n```\n\n**From source:**\n```bash\ngit clone https://github.com/ibarcarty/mcp-server-google-drive.git\ncd mcp-server-google-drive\nnpm install --ignore-scripts\nnpm run build\nnode dist/index.js auth\n```\n\nThis opens your browser to authorize with your Google account. Tokens are saved locally.\n\n### 3. Configure Claude Code / Claude Desktop\n\n**From npm:**\n```json\n{\n  \"mcpServers\": {\n    \"google-drive\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@ibarcarty/mcp-server-google-drive\"],\n      \"env\": {\n        \"GDRIVE_MCP_OAUTH_PATH\": \"/path/to/your/oauth-credentials.json\"\n      }\n    }\n  }\n}\n```\n\n**From source:**\n```json\n{\n  \"mcpServers\": {\n    \"google-drive\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/mcp-server-google-drive/dist/index.js\"],\n      \"env\": {\n        \"GDRIVE_MCP_OAUTH_PATH\": \"/path/to/your/oauth-credentials.json\"\n      }\n    }\n  }\n}\n```\n\nSee [Local Setup Guide](docs/setup-local.md) for detailed instructions.\n\n## Tools\n\n### Drive — File Operations\n\n| Tool | Description |\n|------|-------------|\n| `drive_list_files` | List files/folders with filtering, pagination, and sorting |\n| `drive_search` | Search by name or content (full-text search) |\n| `drive_read_file` | Read file content by byte ranges. Auto-exports Workspace files, converts Office files to text |\n| `drive_get_file_info` | Metadata for an ID: name, size, parent folder (resolved to its name), shared drive, capabilities |\n| `drive_create_file` | Create a new file with optional content |\n| `drive_create_folder` | Create a new folder |\n| `drive_update_file` | Update file content or rename |\n| `drive_delete_file` | Delete a file or folder (falls back to trash in shared drives when permanent delete is not permitted) |\n| `drive_move_file` | Move to a different folder |\n| `drive_copy_file` | Copy a file, optionally to a different folder |\n\n### Drive — Permissions\n\n| Tool | Description |\n|------|-------------|\n| `drive_share` | Share a file with a user (reader/writer/commenter) |\n| `drive_list_permissions` | List who has access to a file |\n| `drive_remove_permission` | Revoke access from a user |\n\n### Google Docs — Document Editing\n\n| Tool | Description |\n|------|-------------|\n| `docs_read` | Read document content with structure (headings, indexes) |\n| `docs_append_text` | Append plain text at the end of a document |\n| `docs_insert_text` | Insert plain text at a specific position (by index) |\n| `docs_replace_text` | Find and replace text throughout a document |\n| `docs_write_markdown` | Write GitHub Flavored Markdown with native rich formatting (headings, bold, italic, strikethrough, inline code, code blocks, tables, lists, links, blockquotes) |\n| `docs_apply_theme` | Apply a predefined visual theme (typography, colors, spacing, margins) to an entire document. Built-in: `corporate`, `minimal`. Custom themes loadable from JSON |\n| `docs_apply_corporate_template` | Initialize a document with title, metadata, change log, classification badge, and footer |\n\n#### Markdown-to-Docs example\n\n```javascript\n// Write rich markdown to an existing Google Doc\nawait mcp.callTool(\"docs_write_markdown\", {\n  documentId: \"1abc...xyz\",\n  markdown: `\n# Project Report\n\n## Summary\nThis project delivers **three key features**:\n\n- Feature A with *italic emphasis*\n- Feature B using \\`inline code\\`\n- Feature C — [see docs](https://example.com)\n\n## Timeline\n\n| Phase | Start | End |\n|-------|-------|-----|\n| Design | Jan | Feb |\n| Build | Mar | May |\n`,\n  mode: \"append\",  // or \"replace_all\"\n});\n\n// Apply the built-in corporate theme\nawait mcp.callTool(\"docs_apply_theme\", {\n  documentId: \"1abc...xyz\",\n  theme: \"corporate\",\n});\n```\n\n#### Custom themes\n\nBuilt-in themes (`corporate`, `minimal`) cover most cases. For custom branding, point `GDRIVE_MCP_CUSTOM_THEMES_PATH` to a JSON file:\n\n```json\n{\n  \"my-brand\": {\n    \"name\": \"my-brand\",\n    \"fontFamily\": \"Arial\",\n    \"lineSpacing\": 115,\n    \"margins\": { \"top\": 71, \"bottom\": 71, \"left\": 71, \"right\": 71 },\n    \"styles\": {\n      \"TITLE\":       { \"fontSize\": 26, \"bold\": true, \"color\": { \"red\": 0.0,  \"green\": 0.32, \"blue\": 0.53 }, \"spaceAbove\": 0,  \"spaceBelow\": 12 },\n      \"SUBTITLE\":    { \"fontSize\": 16,                \"color\": { \"red\": 0.18, \"green\": 0.18, \"blue\": 0.18 }, \"spaceAbove\": 0,  \"spaceBelow\": 12 },\n      \"HEADING_1\":   { \"fontSize\": 20, \"bold\": true, \"color\": { \"red\": 0.0,  \"green\": 0.32, \"blue\": 0.53 }, \"spaceAbove\": 16, \"spaceBelow\": 6 },\n      \"HEADING_2\":   { \"fontSize\": 16, \"bold\": true, \"color\": { \"red\": 0.30, \"green\": 0.51, \"blue\": 0.74 }, \"spaceAbove\": 12, \"spaceBelow\": 4 },\n      \"HEADING_3\":   { \"fontSize\": 13, \"bold\": true, \"color\": { \"red\": 0.30, \"green\": 0.51, \"blue\": 0.74 }, \"spaceAbove\": 10, \"spaceBelow\": 4 },\n      \"HEADING_4\":   { \"fontSize\": 12, \"bold\": true, \"color\": { \"red\": 0.18, \"green\": 0.18, \"blue\": 0.18 }, \"spaceAbove\": 8,  \"spaceBelow\": 2 },\n      \"HEADING_5\":   { \"fontSize\": 11, \"bold\": true, \"color\": { \"red\": 0.18, \"green\": 0.18, \"blue\": 0.18 }, \"spaceAbove\": 6,  \"spaceBelow\": 2 },\n      \"HEADING_6\":   { \"fontSize\": 10, \"bold\": true, \"color\": { \"red\": 0.18, \"green\": 0.18, \"blue\": 0.18 }, \"spaceAbove\": 6,  \"spaceBelow\": 2 },\n      \"NORMAL_TEXT\": { \"fontSize\": 11,                \"color\": { \"red\": 0.18, \"green\": 0.18, \"blue\": 0.18 }, \"spaceAbove\": 0,  \"spaceBelow\": 4 }\n    }\n  }\n}\n```\n\nThen apply it by name: `{ theme: \"my-brand\" }`.\n\nThe markdown is parsed with `remark` + `remark-gfm` (CommonMark + GFM extensions) and converted to native Google Docs `batchUpdate` requests (`insertText`, `updateTextStyle`, `updateParagraphStyle`, `insertTable`, `createParagraphBullets`, `updateTableCellStyle`). No markdown characters remain in the document — it becomes native Google Docs formatting.\n\n### Google Sheets — Spreadsheet Editing\n\n| Tool | Description |\n|------|-------------|\n| `sheets_read_range` | Read cell values from a range (A1 notation) |\n| `sheets_write_range` | Write values to a range of cells |\n| `sheets_append_rows` | Append rows after the last row with data |\n| `sheets_clear_range` | Clear values in a range (formatting preserved) |\n\n### Google Slides — Presentation Editing\n\n| Tool | Description |\n|------|-------------|\n| `slides_read` | Read all slides with text content and element IDs |\n| `slides_add_slide` | Add a new slide to the presentation |\n| `slides_add_text` | Insert text into a specific shape/placeholder |\n| `slides_replace_text` | Find and replace text across all slides |\n\n### Google Calendar — Event Management\n\n| Tool | Description |\n|------|-------------|\n| `calendar_list_events` | List events in a time window (recurring events expanded into instances, ordered by start time). Returns the event IDs used by update/delete |\n| `calendar_create_event` | Create a timed or all-day event, with optional recurrence (RRULE), reminders (popup/email), location and description. Timed events default to Europe/Madrid and 1h duration; all-day end dates are inclusive |\n| `calendar_update_event` | Patch fields of an existing event (only the provided fields change) |\n| `calendar_delete_event` | Delete an event by ID (a recurring event's parent removes all instances) |\n\n### Gmail — Drafts only (red line: no sending)\n\n| Tool | Description |\n|------|-------------|\n| `gmail_create_draft` | Create a plain-text DRAFT (to/cc/bcc, UTF-8 safe subject and body) in the authenticated user's Drafts folder. The server **never sends email** — there is deliberately no send tool; the user reviews the draft in Gmail and presses Send themselves |\n\n## Configuration\n\nAll configuration is via environment variables. All are optional with sensible defaults.\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `GDRIVE_MCP_OAUTH_PATH` | `~/.config/mcp-server-google-drive/oauth-credentials.json` | OAuth client credentials file |\n| `GDRIVE_MCP_TOKEN_PATH` | `~/.config/mcp-server-google-drive/tokens.json` | Saved tokens file |\n| `GDRIVE_MCP_SCOPES` | `https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/calendar,https://www.googleapis.com/auth/gmail.compose` | OAuth scopes (comma-separated) |\n| `GDRIVE_MCP_TRANSPORT` | `stdio` | Transport: `stdio` or `http` |\n| `GDRIVE_MCP_PORT` | `8080` | HTTP port (for `http` transport) |\n| `GDRIVE_MCP_HOST` | `0.0.0.0` | HTTP bind address |\n| `GDRIVE_MCP_CUSTOM_THEMES_PATH` | *(unset)* | Optional path to a JSON file with custom theme specifications |\n\nOn Windows, the default config directory is `%APPDATA%/mcp-server-google-drive/`.\n\n## Deployment\n\n### Local (recommended for personal use)\n\nUses stdio transport. See [Local Setup Guide](docs/setup-local.md).\n\n### Google Cloud Run (for teams)\n\nUses Streamable HTTP transport. See [Cloud Run Deployment Guide](docs/setup-cloudrun.md).\n\n## Development\n\n```bash\ngit clone https://github.com/ibarcarty/mcp-server-google-drive.git\ncd mcp-server-google-drive\nnpm install --ignore-scripts\nnpm run build\nnpm test          # unit tests (node:test via tsx, API fully mocked)\nnpm run smoke     # live smoke test against the real Drive API (requires credentials; creates and removes its own fixtures)\n```\n\n## OAuth Scopes\n\nThis server uses `https://www.googleapis.com/auth/drive` (full Drive access — also covers Google Docs, Google Sheets, and Google Slides) plus `https://www.googleapis.com/auth/calendar` (Google Calendar) and `https://www.googleapis.com/auth/gmail.compose` (Gmail drafts) by default.\n\n**About `gmail.compose`:** Google offers no drafts-only scope — `gmail.compose` technically permits sending. This server's guarantee is structural: it ships **no send tool** (nothing calls `drafts.send` or `messages.send`, enforced by contract tests). If you don't want the Gmail tools at all, set `GDRIVE_MCP_SCOPES` without `gmail.compose`.\n\n**Upgrading from ≤1.3.x:** tokens saved before an upgrade lack the newer scopes (calendar since v1.3.0, gmail.compose since v1.4.0). Re-run the auth flow once (`node dist/index.js auth` or `npx @ibarcarty/mcp-server-google-drive auth`) to grant them; the affected tools return an actionable error until then.\n\nIf you only need access to files created by this app, you can use the more restrictive `drive.file` scope:\n\n```bash\nGDRIVE_MCP_SCOPES=https://www.googleapis.com/auth/drive.file npx @ibarcarty/mcp-server-google-drive auth\n```\n\n**Note:** The `drive` scope requires Google verification for apps with 100+ users. For personal use or small teams (< 100 users), testing mode works without verification.\n\n## Limitations\n\n- `docs_write_markdown` covers CommonMark + GFM (headings, emphasis, lists, links, code blocks, blockquotes, tables, strikethrough). Images, footnotes, and task lists with interactive checkboxes are rendered as plain text or placeholders.\n- Google Slides editing supports text operations and adding slides. Complex layout operations (positioning shapes, animations) require using the raw Slides API.\n- Export of Workspace files has a 10MB limit (Google API limitation).\n- Binary file uploads are limited to text content passed as strings. For large binary files, use Google Drive directly.\n- Binary files (PDF, images, archives…) are reported with their metadata but not returned inline — decoding them as text would be lossy. Office files are the exception: they are converted to text on read.\n- `drive_read_file` returns at most 2MB per call (default window 200KB). Page through larger files with `offset`.\n- Reading a byte range of a UTF-8 text file may split a multibyte character at the window boundaries.\n\n## Changelog\n\n### v1.4.0\n\n- **NEW** Gmail drafts (1 tool, test-first with 7 contract tests): `gmail_create_draft` builds an RFC 2822 message (RFC 2047 UTF-8 subject encoding, base64 body, CRLF header-injection rejected) and creates a DRAFT via `users.drafts.create`.\n- **Red line by design: the server never sends email.** No send tool exists; the contract tests assert zero calls to `drafts.send`/`messages.send` in every scenario. The user reviews drafts in Gmail and sends manually.\n- Default OAuth scopes now include `https://www.googleapis.com/auth/gmail.compose`. Existing tokens keep working for everything else; re-run the auth flow once to enable the draft tool. Requires the Gmail API enabled in the GCP project.\n\n### v1.3.0\n\n- **NEW** Google Calendar support (4 tools, test-first with 13 contract tests): `calendar_list_events` (recurring events expanded via `singleEvents`, ordered by start time), `calendar_create_event` (timed or all-day; RRULE recurrence; popup/email reminders; Europe/Madrid default timezone; 1h default duration; inclusive all-day end dates converted to the API's exclusive convention), `calendar_update_event` (patch semantics), `calendar_delete_event`.\n- Default OAuth scopes now include `https://www.googleapis.com/auth/calendar`. Existing tokens keep working for Drive/Docs/Sheets/Slides; re-run the auth flow once to enable the calendar tools. A 403 for a missing scope returns an actionable message instead of a raw API error.\n- Requires the Google Calendar API to be enabled in the GCP project.\n\n### v1.2.0\n\nFour defects found using the server against a large real-world Drive, all fixed test-first (17 unit tests + an 11-case live smoke suite, `test/`):\n\n- **FIX** `drive_read_file` no longer downloads files whole: reads go through byte ranges (`Range` header) with a 200KB default window and new `offset`/`maxBytes` parameters. Previously a 90MB file crashed the stdio transport (`Connection closed`). Truncated responses say exactly how to continue.\n- **FIX** `drive_read_file` converts Office files (`.docx`, `.xlsx`, `.pptx`, legacy and OpenDocument variants) to text via a temporary Google Workspace copy (always cleaned up, even on failure). Previously the raw bytes were decoded as UTF-8, producing irreversible `U+FFFD` mojibake. Binary files (PDF, images, archives) are now reported instead of dumped; binary *export formats* of Workspace files get a clear message pointing to the text formats.\n- **FIX** `drive_delete_file` handles shared drives correctly: the Drive API answers an ambiguous **404 \"File not found\"** (not 403) when a non-organizer attempts a permanent delete in a shared drive — verified live, with and without `supportsAllDrives`. The tool now checks `capabilities` first and falls back to moving the item to the trash with a transparent message; a genuine 404 explains both possible causes.\n- **NEW** `drive_get_file_info`: metadata for a file/folder ID — name, type, size, timestamps, parent folder resolved to its name, shared drive name, owners, capabilities, links. Previously there was no way to identify an item from its ID without listing its contents.\n- **FIX** The MCP server now announces its real version (was hardcoded to an older one).\n\n### v1.1.1\n\n- **Maintenance**: harden `build` script to clean `dist/` before compiling (prevents stale artifacts from previous compilations being published). Users should upgrade from v1.1.0 to this version.\n- No functional changes vs v1.1.0.\n\n### v1.1.0\n\n- **NEW** `docs_write_markdown`: convert GitHub Flavored Markdown to native Google Docs formatting (headings, bold, italic, strikethrough, inline code, code blocks, tables, lists, links, blockquotes).\n- **NEW** `docs_apply_theme`: apply a consistent visual theme across a document. Built-in themes: `corporate` (Arial, corporate blue), `minimal` (Inter, neutral). Custom themes can be loaded from a JSON file via `GDRIVE_MCP_CUSTOM_THEMES_PATH`.\n- **NEW** `docs_apply_corporate_template`: initialize a document with a standard corporate structure (title, metadata, change log, classification badge, footer).\n- Parser powered by `unified` + `remark-parse` + `remark-gfm` (industry standard).\n- Zero extra token cost vs raw text — model sends markdown, server handles the conversion.\n\n### v1.0.1\n\n- Initial public release with 24 tools across Drive, Docs, Sheets, Slides.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}