@piotr-agier/google-drive-mcp 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +238 -61
- package/dist/index.js +5144 -2806
- package/dist/index.js.map +4 -4
- package/package.json +12 -4
package/README.md
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
# Google Drive MCP Server
|
|
2
2
|
|
|
3
|
-
A Model Context Protocol (MCP) server that provides secure integration with Google Drive, Docs, Sheets, and
|
|
3
|
+
A Model Context Protocol (MCP) server that provides secure integration with Google Drive, Docs, Sheets, Slides, and Calendar. It allows Claude Desktop and other MCP clients to manage files in Google Drive and calendar events through a standardized interface.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- **Multi-format Support**: Work with Google Docs, Sheets, Slides, and regular files
|
|
8
|
-
- **File Management**: Create, update, delete, rename, and
|
|
7
|
+
- **Multi-format Support**: Work with Google Docs, Sheets, Slides, Calendar, and regular files
|
|
8
|
+
- **File Management**: Create, update, delete, rename, move, copy, upload, and download files and folders
|
|
9
9
|
- **Advanced Search**: Search across your entire Google Drive
|
|
10
10
|
- **Shared Drives Support**: Full access to Google Shared Drives (formerly Team Drives) in addition to My Drive
|
|
11
11
|
- **Folder Navigation**: List and navigate through folder hierarchies with path support (e.g., `/Work/Projects`)
|
|
12
|
+
- **Google Docs Editing**: Surgical text insertion/deletion, table management, image embedding, comments, and rich formatting
|
|
13
|
+
- **Google Calendar**: Full calendar management — list calendars, create/update/delete events, Google Meet integration
|
|
12
14
|
- **MCP Resource Protocol**: Files accessible as MCP resources for reading content
|
|
13
15
|
- **Secure Authentication**: OAuth 2.0 with automatic token refresh
|
|
14
16
|
|
|
@@ -67,6 +69,7 @@ and Budget Spreadsheet template.
|
|
|
67
69
|
- Google Docs API
|
|
68
70
|
- Google Sheets API
|
|
69
71
|
- Google Slides API
|
|
72
|
+
- Google Calendar API
|
|
70
73
|
- **OAuth 2.0 Credentials**: Desktop application type (Client ID only - no client secret required)
|
|
71
74
|
|
|
72
75
|
## Google Cloud Setup
|
|
@@ -84,6 +87,7 @@ and Budget Spreadsheet template.
|
|
|
84
87
|
- **Google Docs API**
|
|
85
88
|
- **Google Sheets API**
|
|
86
89
|
- **Google Slides API**
|
|
90
|
+
- **Google Calendar API**
|
|
87
91
|
- Wait for each API to be enabled before proceeding
|
|
88
92
|
|
|
89
93
|
### 3. Configure OAuth Consent Screen
|
|
@@ -102,6 +106,8 @@ and Budget Spreadsheet template.
|
|
|
102
106
|
- `.../auth/presentations`
|
|
103
107
|
- `.../auth/drive`
|
|
104
108
|
- `.../auth/drive.readonly`
|
|
109
|
+
- `.../auth/calendar`
|
|
110
|
+
- `.../auth/calendar.events`
|
|
105
111
|
|
|
106
112
|
### 4. Create OAuth 2.0 Credentials
|
|
107
113
|
- Go to "APIs & Services" > "Credentials"
|
|
@@ -332,72 +338,186 @@ Add the server to your Claude Desktop configuration:
|
|
|
332
338
|
- `itemId`: Item ID to move
|
|
333
339
|
- `destinationFolderId`: Destination folder ID
|
|
334
340
|
|
|
341
|
+
- **copyFile** - Create a copy of a Google Drive file or document
|
|
342
|
+
- `fileId`: ID of the file to copy
|
|
343
|
+
- `newName`: Name for the copied file (optional, defaults to "Copy of [original name]")
|
|
344
|
+
- `parentFolderId`: Destination folder ID (optional, defaults to same location)
|
|
345
|
+
|
|
346
|
+
- **uploadFile** - Upload a local file (any type: image, audio, video, PDF, etc.) to Google Drive
|
|
347
|
+
- `localPath`: Absolute path to the local file
|
|
348
|
+
- `name`: File name in Drive (optional, defaults to local filename)
|
|
349
|
+
- `parentFolderId`: Parent folder ID or path (optional, e.g., '/Work/Projects')
|
|
350
|
+
- `mimeType`: MIME type (optional, auto-detected from extension)
|
|
351
|
+
|
|
352
|
+
- **downloadFile** - Download a Google Drive file to a local path
|
|
353
|
+
- `fileId`: Google Drive file ID
|
|
354
|
+
- `localPath`: Absolute local path to save the file (can be a directory or full file path)
|
|
355
|
+
- `exportMimeType`: For Google Workspace files, MIME type to export as (optional, e.g., 'application/pdf', 'text/csv')
|
|
356
|
+
- `overwrite`: Whether to overwrite existing files (optional, default: false)
|
|
357
|
+
|
|
335
358
|
### Folder Operations
|
|
336
359
|
- **createFolder** - Create a new folder
|
|
337
360
|
- `name`: Folder name
|
|
338
361
|
- `parent`: Parent folder ID or path (optional)
|
|
339
362
|
|
|
340
|
-
### Google
|
|
363
|
+
### Google Docs
|
|
364
|
+
|
|
365
|
+
#### Create and Update
|
|
341
366
|
- **createGoogleDoc** - Create a Google Doc
|
|
342
367
|
- `name`: Document name
|
|
343
368
|
- `content`: Document content
|
|
344
369
|
- `parentFolderId`: Parent folder ID (optional)
|
|
345
370
|
|
|
346
|
-
- **updateGoogleDoc** -
|
|
371
|
+
- **updateGoogleDoc** - Replace all content in a Google Doc
|
|
347
372
|
- `documentId`: Document ID
|
|
348
373
|
- `content`: New content
|
|
349
374
|
|
|
350
|
-
|
|
375
|
+
#### Reading and Discovery
|
|
376
|
+
- **readGoogleDoc** - Read content of a Google Doc with format options
|
|
351
377
|
- `documentId`: Document ID
|
|
352
|
-
-
|
|
378
|
+
- `format`: Output format — `text`, `json`, or `markdown` (optional, default: text)
|
|
379
|
+
- `maxLength`: Maximum characters to return (optional)
|
|
380
|
+
|
|
381
|
+
- **getGoogleDocContent** - Get document content with text indices for formatting
|
|
382
|
+
- `documentId`: Document ID
|
|
383
|
+
- `includeFormatting`: Include font, style, and color info for each text span (optional, default: false)
|
|
384
|
+
|
|
385
|
+
- **listDocumentTabs** - List all tabs in a Google Doc with their IDs and hierarchy
|
|
386
|
+
- `documentId`: Document ID
|
|
387
|
+
- `includeContent`: Include content summary (character count) for each tab (optional)
|
|
388
|
+
|
|
389
|
+
- **listGoogleDocs** - List Google Documents with optional filtering
|
|
390
|
+
- `query`: Search query to filter by name or content (optional)
|
|
391
|
+
- `maxResults`: Maximum documents to return, 1-100 (optional, default: 20)
|
|
392
|
+
- `orderBy`: Sort order — `name`, `modifiedTime`, or `createdTime` (optional)
|
|
353
393
|
|
|
354
|
-
- **
|
|
394
|
+
- **getDocumentInfo** - Get detailed metadata about a specific Google Document
|
|
355
395
|
- `documentId`: Document ID
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
- `
|
|
360
|
-
- `
|
|
361
|
-
- `
|
|
396
|
+
|
|
397
|
+
#### Surgical Editing
|
|
398
|
+
- **insertText** - Insert text at a specific index (doesn't replace entire doc)
|
|
399
|
+
- `documentId`: Document ID
|
|
400
|
+
- `text`: Text to insert
|
|
401
|
+
- `index`: Position to insert at (1-based)
|
|
402
|
+
|
|
403
|
+
- **deleteRange** - Delete content between start and end indices
|
|
404
|
+
- `documentId`: Document ID
|
|
405
|
+
- `startIndex`: Start index (1-based, inclusive)
|
|
406
|
+
- `endIndex`: End index (exclusive)
|
|
407
|
+
|
|
408
|
+
#### Text and Paragraph Styling
|
|
409
|
+
- **applyTextStyle** - Apply text formatting (bold, italic, color, etc.) to a range or found text
|
|
410
|
+
- `documentId`: Document ID
|
|
411
|
+
- Target (use one): `startIndex`+`endIndex` OR `textToFind`+`matchInstance`
|
|
412
|
+
- `bold`, `italic`, `underline`, `strikethrough`: Text styling (optional)
|
|
362
413
|
- `fontSize`: Font size in points (optional)
|
|
363
|
-
- `
|
|
414
|
+
- `fontFamily`: Font family name (optional)
|
|
415
|
+
- `foregroundColor`: Hex color, e.g., `#FF0000` (optional)
|
|
416
|
+
- `backgroundColor`: Hex background color (optional)
|
|
417
|
+
- `linkUrl`: URL for hyperlink (optional)
|
|
364
418
|
|
|
365
|
-
- **
|
|
419
|
+
- **applyParagraphStyle** - Apply paragraph formatting
|
|
366
420
|
- `documentId`: Document ID
|
|
367
|
-
- `startIndex
|
|
368
|
-
- `
|
|
369
|
-
- `namedStyleType`: Style like HEADING_1, HEADING_2, etc. (optional)
|
|
421
|
+
- Target (use one): `startIndex`+`endIndex` OR `textToFind`+`matchInstance` OR `indexWithinParagraph`
|
|
422
|
+
- `namedStyleType`: NORMAL_TEXT, TITLE, SUBTITLE, HEADING_1 through HEADING_6 (optional)
|
|
370
423
|
- `alignment`: START, CENTER, END, or JUSTIFIED (optional)
|
|
371
|
-
- `
|
|
372
|
-
- `spaceAbove`:
|
|
373
|
-
- `
|
|
424
|
+
- `indentStart`, `indentEnd`: Indent in points (optional)
|
|
425
|
+
- `spaceAbove`, `spaceBelow`: Spacing in points (optional)
|
|
426
|
+
- `keepWithNext`: Keep with next paragraph (optional)
|
|
427
|
+
|
|
428
|
+
#### Tables and Images
|
|
429
|
+
- **insertTable** - Insert a new table at a given index
|
|
430
|
+
- `documentId`: Document ID
|
|
431
|
+
- `rows`: Number of rows
|
|
432
|
+
- `columns`: Number of columns
|
|
433
|
+
- `index`: Position to insert at (1-based)
|
|
434
|
+
|
|
435
|
+
- **editTableCell** - Edit content and/or style of a specific table cell
|
|
436
|
+
- `documentId`: Document ID
|
|
437
|
+
- `tableStartIndex`: Starting index of the table element
|
|
438
|
+
- `rowIndex`: Row index (0-based)
|
|
439
|
+
- `columnIndex`: Column index (0-based)
|
|
440
|
+
- `textContent`: New text content (optional)
|
|
441
|
+
- `bold`, `italic`, `fontSize`, `alignment`: Cell styling (optional)
|
|
442
|
+
|
|
443
|
+
- **insertImageFromUrl** - Insert an inline image from a publicly accessible URL
|
|
444
|
+
- `documentId`: Document ID
|
|
445
|
+
- `imageUrl`: Publicly accessible URL to the image
|
|
446
|
+
- `index`: Position to insert at (1-based)
|
|
447
|
+
- `width`, `height`: Image dimensions in points (optional)
|
|
448
|
+
|
|
449
|
+
- **insertLocalImage** - Upload a local image file to Drive and insert it into a document
|
|
450
|
+
- `documentId`: Document ID
|
|
451
|
+
- `localImagePath`: Absolute path to the local image file
|
|
452
|
+
- `index`: Position to insert at (1-based)
|
|
453
|
+
- `width`, `height`: Image dimensions in points (optional)
|
|
454
|
+
- `uploadToSameFolder`: Upload to same folder as document (optional, default: true)
|
|
455
|
+
|
|
456
|
+
#### Comments
|
|
457
|
+
- **listComments** - List all comments in a Google Document
|
|
458
|
+
- `documentId`: Document ID
|
|
459
|
+
- `includeDeleted`: Include deleted comments (optional, default: false)
|
|
460
|
+
- `pageSize`: Max comments to return, 1-100 (optional, default: 100)
|
|
461
|
+
- `pageToken`: Token for next page of results (optional)
|
|
462
|
+
|
|
463
|
+
- **getComment** - Get a specific comment with its full thread of replies
|
|
464
|
+
- `documentId`: Document ID
|
|
465
|
+
- `commentId`: Comment ID
|
|
466
|
+
|
|
467
|
+
- **addComment** - Add a comment anchored to a specific text range
|
|
468
|
+
- `documentId`: Document ID
|
|
469
|
+
- `startIndex`: Start index (1-based)
|
|
470
|
+
- `endIndex`: End index (exclusive)
|
|
471
|
+
- `commentText`: The comment content
|
|
472
|
+
|
|
473
|
+
- **replyToComment** - Add a reply to an existing comment
|
|
474
|
+
- `documentId`: Document ID
|
|
475
|
+
- `commentId`: Comment ID to reply to
|
|
476
|
+
- `replyText`: The reply content
|
|
477
|
+
|
|
478
|
+
- **deleteComment** - Delete a comment from the document
|
|
479
|
+
- `documentId`: Document ID
|
|
480
|
+
- `commentId`: Comment ID to delete
|
|
374
481
|
|
|
482
|
+
### Google Sheets
|
|
483
|
+
|
|
484
|
+
#### Create and Update
|
|
375
485
|
- **createGoogleSheet** - Create a Google Sheet
|
|
376
486
|
- `name`: Spreadsheet name
|
|
377
487
|
- `data`: 2D array of cell values
|
|
378
488
|
- `parentFolderId`: Parent folder ID (optional)
|
|
489
|
+
- `valueInputOption`: `RAW` (default, safe) or `USER_ENTERED` (evaluates formulas) (optional)
|
|
379
490
|
|
|
380
491
|
- **updateGoogleSheet** - Update a Google Sheet
|
|
381
492
|
- `spreadsheetId`: Spreadsheet ID
|
|
382
|
-
- `range`: Range to update (e.g.,
|
|
493
|
+
- `range`: Range to update (e.g., 'Sheet1!A1:C10')
|
|
383
494
|
- `data`: 2D array of new values
|
|
495
|
+
- `valueInputOption`: `RAW` (default, safe) or `USER_ENTERED` (evaluates formulas) (optional)
|
|
384
496
|
|
|
385
|
-
- **
|
|
386
|
-
- `
|
|
387
|
-
- `
|
|
388
|
-
- `parentFolderId`: Parent folder ID (optional)
|
|
497
|
+
- **getGoogleSheetContent** - Get spreadsheet content with cell information
|
|
498
|
+
- `spreadsheetId`: Spreadsheet ID
|
|
499
|
+
- `range`: Range to get (e.g., 'Sheet1!A1:C10')
|
|
389
500
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
- `
|
|
501
|
+
#### Sheet Management
|
|
502
|
+
- **getSpreadsheetInfo** - Get detailed information about a spreadsheet including all sheets/tabs
|
|
503
|
+
- `spreadsheetId`: Spreadsheet ID
|
|
393
504
|
|
|
394
|
-
|
|
505
|
+
- **appendSpreadsheetRows** - Append rows to the end of a sheet
|
|
506
|
+
- `spreadsheetId`: Spreadsheet ID
|
|
507
|
+
- `range`: A1 notation range indicating where to append (e.g., 'A1' or 'Sheet1!A1')
|
|
508
|
+
- `values`: 2D array of values to append
|
|
509
|
+
- `valueInputOption`: `RAW` or `USER_ENTERED` (optional, default: USER_ENTERED)
|
|
395
510
|
|
|
396
|
-
- **
|
|
511
|
+
- **addSpreadsheetSheet** - Add a new sheet/tab to an existing spreadsheet
|
|
397
512
|
- `spreadsheetId`: Spreadsheet ID
|
|
398
|
-
- `
|
|
399
|
-
- Returns cell values for the specified range
|
|
513
|
+
- `sheetTitle`: Title for the new sheet
|
|
400
514
|
|
|
515
|
+
- **listGoogleSheets** - List Google Spreadsheets with optional filtering
|
|
516
|
+
- `query`: Search query to filter by name or content (optional)
|
|
517
|
+
- `maxResults`: Maximum spreadsheets to return, 1-100 (optional, default: 20)
|
|
518
|
+
- `orderBy`: Sort order — `name`, `modifiedTime`, or `createdTime` (optional)
|
|
519
|
+
|
|
520
|
+
#### Formatting
|
|
401
521
|
- **formatGoogleSheetCells** - Format cell properties
|
|
402
522
|
- `spreadsheetId`: Spreadsheet ID
|
|
403
523
|
- `range`: Range to format (e.g., 'A1:C10')
|
|
@@ -409,10 +529,7 @@ Add the server to your Claude Desktop configuration:
|
|
|
409
529
|
- **formatGoogleSheetText** - Apply text formatting to cells
|
|
410
530
|
- `spreadsheetId`: Spreadsheet ID
|
|
411
531
|
- `range`: Range to format (e.g., 'A1:C10')
|
|
412
|
-
- `bold`:
|
|
413
|
-
- `italic`: Make text italic (optional)
|
|
414
|
-
- `strikethrough`: Strikethrough text (optional)
|
|
415
|
-
- `underline`: Underline text (optional)
|
|
532
|
+
- `bold`, `italic`, `strikethrough`, `underline`: Text styling (optional)
|
|
416
533
|
- `fontSize`: Font size in points (optional)
|
|
417
534
|
- `fontFamily`: Font name (optional)
|
|
418
535
|
- `foregroundColor`: Text color (RGB 0-1) (optional)
|
|
@@ -447,36 +564,46 @@ Add the server to your Claude Desktop configuration:
|
|
|
447
564
|
- `backgroundColor`: Cell color (RGB 0-1) (optional)
|
|
448
565
|
- `textFormat`: Text formatting with bold and foregroundColor (optional)
|
|
449
566
|
|
|
450
|
-
### Google Slides
|
|
567
|
+
### Google Slides
|
|
451
568
|
|
|
569
|
+
#### Create and Update
|
|
570
|
+
- **createGoogleSlides** - Create a presentation
|
|
571
|
+
- `name`: Presentation name
|
|
572
|
+
- `slides`: Array of slides with title and content
|
|
573
|
+
- `parentFolderId`: Parent folder ID (optional)
|
|
574
|
+
|
|
575
|
+
- **updateGoogleSlides** - Update an existing presentation
|
|
576
|
+
- `presentationId`: Presentation ID
|
|
577
|
+
- `slides`: Array of slides with title and content (replaces all existing slides)
|
|
578
|
+
|
|
579
|
+
#### Content and Formatting
|
|
452
580
|
- **getGoogleSlidesContent** - Get presentation content with element IDs
|
|
453
581
|
- `presentationId`: Presentation ID
|
|
454
582
|
- `slideIndex`: Specific slide index (optional)
|
|
455
|
-
- Returns element IDs for formatting
|
|
456
583
|
|
|
457
584
|
- **formatGoogleSlidesText** - Apply text formatting to slide elements
|
|
458
585
|
- `presentationId`: Presentation ID
|
|
459
586
|
- `objectId`: Element ID
|
|
460
|
-
- `startIndex`/`endIndex`: Text range (optional)
|
|
461
|
-
- `bold`, `italic`, `underline`, `strikethrough`: Text styling
|
|
462
|
-
- `fontSize`: Font size in points
|
|
463
|
-
- `fontFamily`: Font name
|
|
464
|
-
- `foregroundColor`: Text color (RGB 0-1)
|
|
587
|
+
- `startIndex`/`endIndex`: Text range (optional, 0-based)
|
|
588
|
+
- `bold`, `italic`, `underline`, `strikethrough`: Text styling (optional)
|
|
589
|
+
- `fontSize`: Font size in points (optional)
|
|
590
|
+
- `fontFamily`: Font name (optional)
|
|
591
|
+
- `foregroundColor`: Text color (RGB 0-1) (optional)
|
|
465
592
|
|
|
466
593
|
- **formatGoogleSlidesParagraph** - Apply paragraph formatting
|
|
467
594
|
- `presentationId`: Presentation ID
|
|
468
595
|
- `objectId`: Element ID
|
|
469
|
-
- `alignment`: START, CENTER, END, or JUSTIFIED
|
|
470
|
-
- `lineSpacing`: Line spacing multiplier
|
|
471
|
-
- `bulletStyle`: NONE, DISC, ARROW, SQUARE, DIAMOND, STAR, or NUMBERED
|
|
596
|
+
- `alignment`: START, CENTER, END, or JUSTIFIED (optional)
|
|
597
|
+
- `lineSpacing`: Line spacing multiplier (optional)
|
|
598
|
+
- `bulletStyle`: NONE, DISC, ARROW, SQUARE, DIAMOND, STAR, or NUMBERED (optional)
|
|
472
599
|
|
|
473
600
|
- **styleGoogleSlidesShape** - Style shapes and elements
|
|
474
601
|
- `presentationId`: Presentation ID
|
|
475
602
|
- `objectId`: Shape ID
|
|
476
|
-
- `backgroundColor`: Fill color (RGBA 0-1)
|
|
477
|
-
- `outlineColor`: Border color (RGB 0-1)
|
|
478
|
-
- `outlineWeight`: Border thickness in points
|
|
479
|
-
- `outlineDashStyle`: SOLID, DOT, DASH,
|
|
603
|
+
- `backgroundColor`: Fill color (RGBA 0-1) (optional)
|
|
604
|
+
- `outlineColor`: Border color (RGB 0-1) (optional)
|
|
605
|
+
- `outlineWeight`: Border thickness in points (optional)
|
|
606
|
+
- `outlineDashStyle`: SOLID, DOT, DASH, DASH_DOT, LONG_DASH, or LONG_DASH_DOT (optional)
|
|
480
607
|
|
|
481
608
|
- **setGoogleSlidesBackground** - Set slide background color
|
|
482
609
|
- `presentationId`: Presentation ID
|
|
@@ -497,18 +624,59 @@ Add the server to your Claude Desktop configuration:
|
|
|
497
624
|
- `x`, `y`, `width`, `height`: Position/size in EMU
|
|
498
625
|
- `backgroundColor`: Fill color (RGBA 0-1) (optional)
|
|
499
626
|
|
|
500
|
-
|
|
501
|
-
|
|
627
|
+
#### Speaker Notes
|
|
502
628
|
- **getGoogleSlidesSpeakerNotes** - Get speaker notes from a slide
|
|
503
629
|
- `presentationId`: Presentation ID
|
|
504
630
|
- `slideIndex`: Slide index (0-based)
|
|
505
|
-
- Returns the speaker notes text or a message if no notes exist
|
|
506
631
|
|
|
507
632
|
- **updateGoogleSlidesSpeakerNotes** - Update or set speaker notes for a slide
|
|
508
633
|
- `presentationId`: Presentation ID
|
|
509
634
|
- `slideIndex`: Slide index (0-based)
|
|
510
635
|
- `notes`: The speaker notes content to set
|
|
511
636
|
|
|
637
|
+
### Google Calendar
|
|
638
|
+
- **listCalendars** - List all accessible Google Calendars
|
|
639
|
+
- `showHidden`: Include hidden calendars (optional, default: false)
|
|
640
|
+
|
|
641
|
+
- **getCalendarEvents** - Get events from a calendar with optional filtering
|
|
642
|
+
- `calendarId`: Calendar ID (optional, default: primary)
|
|
643
|
+
- `timeMin`: Start of time range, RFC3339 (optional, e.g., '2024-01-01T00:00:00Z')
|
|
644
|
+
- `timeMax`: End of time range, RFC3339 (optional)
|
|
645
|
+
- `query`: Free text search in events (optional)
|
|
646
|
+
- `maxResults`: Maximum events to return, 1-250 (optional, default: 50)
|
|
647
|
+
- `singleEvents`: Expand recurring events into instances (optional, default: true)
|
|
648
|
+
- `orderBy`: Sort order — `startTime` or `updated` (optional, default: startTime)
|
|
649
|
+
|
|
650
|
+
- **getCalendarEvent** - Get a single calendar event by ID
|
|
651
|
+
- `eventId`: Event ID
|
|
652
|
+
- `calendarId`: Calendar ID (optional, default: primary)
|
|
653
|
+
|
|
654
|
+
- **createCalendarEvent** - Create a new calendar event with Google Meet support
|
|
655
|
+
- `summary`: Event title
|
|
656
|
+
- `start`: Start time (`dateTime` for timed events, `date` for all-day, optional `timeZone`)
|
|
657
|
+
- `end`: End time (same format as start)
|
|
658
|
+
- `calendarId`: Calendar ID (optional, default: primary)
|
|
659
|
+
- `description`: Event description (optional)
|
|
660
|
+
- `location`: Event location (optional)
|
|
661
|
+
- `attendees`: Array of email addresses (optional)
|
|
662
|
+
- `sendUpdates`: `all`, `externalOnly`, or `none` (optional, default: none)
|
|
663
|
+
- `conferenceType`: `hangoutsMeet` to add Google Meet link (optional)
|
|
664
|
+
- `recurrence`: Array of RRULE strings for recurring events (optional)
|
|
665
|
+
- `visibility`: `default`, `public`, `private`, or `confidential` (optional)
|
|
666
|
+
|
|
667
|
+
- **updateCalendarEvent** - Update an existing calendar event
|
|
668
|
+
- `eventId`: Event ID
|
|
669
|
+
- `calendarId`: Calendar ID (optional, default: primary)
|
|
670
|
+
- `summary`, `description`, `location`: Updated fields (optional)
|
|
671
|
+
- `start`, `end`: Updated times (optional)
|
|
672
|
+
- `attendees`: Updated attendee emails, replaces existing (optional)
|
|
673
|
+
- `sendUpdates`: `all`, `externalOnly`, or `none` (optional, default: none)
|
|
674
|
+
|
|
675
|
+
- **deleteCalendarEvent** - Delete a calendar event
|
|
676
|
+
- `eventId`: Event ID
|
|
677
|
+
- `calendarId`: Calendar ID (optional, default: primary)
|
|
678
|
+
- `sendUpdates`: Send cancellation notifications (optional, default: none)
|
|
679
|
+
|
|
512
680
|
## Authentication Flow
|
|
513
681
|
|
|
514
682
|
The server uses OAuth 2.0 for secure authentication:
|
|
@@ -545,7 +713,7 @@ npm run auth
|
|
|
545
713
|
### Security Features
|
|
546
714
|
- **No Client Secrets**: Desktop OAuth flow works with client ID only
|
|
547
715
|
- **Secure Token Storage**: Tokens stored with 0600 permissions in XDG-compliant location
|
|
548
|
-
- **Scoped Access**: Minimal permissions requested (drive.file, documents, spreadsheets, presentations)
|
|
716
|
+
- **Scoped Access**: Minimal permissions requested (drive.file, documents, spreadsheets, presentations, calendar)
|
|
549
717
|
- **Local Execution**: All processing happens on your machine
|
|
550
718
|
- **Automatic Token Refresh**: Reduces need for re-authentication
|
|
551
719
|
- **Token Migration**: Legacy tokens automatically moved to secure location
|
|
@@ -750,11 +918,20 @@ google-drive-mcp/
|
|
|
750
918
|
├── src/ # Source code
|
|
751
919
|
│ ├── index.ts # Main server implementation
|
|
752
920
|
│ ├── auth.ts # Main authentication module
|
|
753
|
-
│
|
|
754
|
-
│
|
|
755
|
-
│
|
|
756
|
-
│
|
|
757
|
-
│
|
|
921
|
+
│ ├── auth/ # Authentication components
|
|
922
|
+
│ │ ├── client.ts # OAuth2 client setup
|
|
923
|
+
│ │ ├── server.ts # Local auth server
|
|
924
|
+
│ │ ├── tokenManager.ts # Token storage and validation
|
|
925
|
+
│ │ └── utils.ts # Auth utilities
|
|
926
|
+
│ ├── tools/ # Tool implementations by service
|
|
927
|
+
│ │ ├── drive.ts # File management tools
|
|
928
|
+
│ │ ├── docs.ts # Google Docs tools
|
|
929
|
+
│ │ ├── sheets.ts # Google Sheets tools
|
|
930
|
+
│ │ ├── slides.ts # Google Slides tools
|
|
931
|
+
│ │ └── calendar.ts # Google Calendar tools
|
|
932
|
+
│ ├── utils.ts # Shared utility functions
|
|
933
|
+
│ ├── types.ts # TypeScript type definitions
|
|
934
|
+
│ └── download-file.ts # File download helper
|
|
758
935
|
├── dist/ # Compiled JavaScript (generated)
|
|
759
936
|
├── scripts/ # Build scripts
|
|
760
937
|
│ └── build.js # Custom build script
|