Skip to content

Add comprehensive Google Drive file management capabilities#7

Merged
a-bonus merged 1 commit intoa-bonus:mainfrom
njackson:feature/google-drive-integration
May 30, 2025
Merged

Add comprehensive Google Drive file management capabilities#7
a-bonus merged 1 commit intoa-bonus:mainfrom
njackson:feature/google-drive-integration

Conversation

@njackson
Copy link
Copy Markdown
Contributor

🚀 Feature Overview

This PR adds comprehensive Google Drive file management capabilities to the existing Google Docs MCP server, transforming it into a complete Google Drive management solution while preserving all existing document editing features.

✨ New Features Added

📋 Google Drive Discovery Tools (4 tools)

  • `listGoogleDocs` - Lists Google Documents with filtering and sorting options
  • `searchGoogleDocs` - Searches documents by name/content with advanced criteria
  • `getRecentGoogleDocs` - Gets recently modified documents with date filtering
  • `getDocumentInfo` - Gets detailed metadata about specific documents

📁 File Management Tools (8 tools)

Folder Management:

  • `createFolder` - Creates new folders with optional parent folder specification
  • `listFolderContents` - Lists folder contents with file type icons and metadata
  • `getFolderInfo` - Gets detailed folder information and metadata

File Operations:

  • `moveFile` - Moves files/folders between locations with parent management
  • `copyFile` - Creates copies of files with custom naming and location
  • `renameFile` - Renames files and folders
  • `deleteFile` - Deletes files (with trash/permanent options)

Document Creation:

  • `createDocument` - Creates new Google Docs with optional initial content
  • `createFromTemplate` - Creates documents from templates with text replacement functionality

🔧 Technical Changes

Core Infrastructure

  • Enhanced Authentication: Updated OAuth scope from `drive.file` to `drive` for full Google Drive access
  • Google Drive API Integration: Added `drive_v3` client alongside existing `docs_v1` client
  • Helper Functions: Added `getDriveClient()` for consistent Drive API access

Code Quality

  • Comprehensive Error Handling: All tools include detailed error handling with user-friendly messages
  • Type Safety: Full TypeScript implementation with proper type definitions
  • Consistent API: All tools follow the same pattern for parameters and responses
  • Rich Metadata: Tools return detailed information including links, timestamps, and ownership

📚 Documentation Updates

  • Updated README.md: Comprehensive documentation of all new features
  • Added vscode.md: Complete VS Code integration guide
  • Enhanced SAMPLE_TASKS.md: 15+ practical examples including new Google Drive management tasks

🔄 Backward Compatibility

  • ✅ All existing Google Docs editing tools remain unchanged and fully functional
  • ✅ No breaking changes to existing API
  • ✅ Maintains compatibility with existing MCP clients

🎯 Use Cases

This enhancement enables powerful workflows like:

  • Document Organization: Create folder structures and organize documents
  • Batch Operations: Find, copy, and organize multiple documents
  • Template Management: Create documents from templates with dynamic content
  • File Discovery: Search and filter documents across entire Drive
  • Collaborative Workflows: Manage shared folders and document permissions

🧪 Testing

  • ✅ All tools have been tested with comprehensive error scenarios
  • ✅ TypeScript compilation passes without errors
  • ✅ Server starts successfully and all tools are available
  • ✅ Backward compatibility verified with existing functionality

This PR transforms the Google Docs MCP server into the Ultimate Google Docs & Drive MCP Server - a comprehensive solution for both document editing and file management through the MCP protocol."

• Enhanced OAuth scope from drive.file to full drive access
• Added Google Drive API integration alongside existing Google Docs API
• Implemented 12 new Google Drive management tools:
  - File discovery: listGoogleDocs, searchGoogleDocs, getRecentGoogleDocs, getDocumentInfo
  - Folder management: createFolder, listFolderContents, getFolderInfo
  - File operations: moveFile, copyFile, renameFile, deleteFile
  - Document creation: createDocument, createFromTemplate
• Updated documentation with comprehensive examples and VS Code integration guide
• Maintained backward compatibility with all existing Google Docs editing tools
• Added proper error handling and TypeScript typing for all new features

This transforms the server from a Google Docs editor into a complete Google Drive management solution.
@a-bonus a-bonus merged commit 54e40a4 into a-bonus:main May 30, 2025
@a-bonus
Copy link
Copy Markdown
Owner

a-bonus commented May 30, 2025

Amazing, thank you for this!!🔥🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants