This guide shows you how to integrate the Google Workspace MCP Server with VS Code using the MCP extension.
Before setting up VS Code integration, make sure you have:
- Completed the main setup - Follow the README.md setup instructions first
- VS Code installed - Download from code.visualstudio.com
- Working MCP server - Verify your server works with Claude Desktop first
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "MCP" or "Model Context Protocol"
- Install the official MCP extension
- Open VS Code Settings (Ctrl+, / Cmd+,)
- Search for "MCP" in settings
- Find "MCP: Servers" configuration
- Add a new server configuration:
{
"google-workspace": {
"command": "node",
"args": ["${workspaceFolder}/dist/server.js"],
"env": {
"NODE_ENV": "production"
}
}
}- Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
- Type "MCP: Restart Servers" and run it
- Check the Output panel and select "MCP" from the dropdown
- You should see your server connecting successfully
Once configured, you can use the MCP server with AI assistants in VS Code:
"List my recent Google Docs from the last 7 days"
"Read the content of document ID: 1ABC..."
"Create a new document called 'Project Notes' in my Work folder"
"Search for documents containing 'meeting notes'"
"Show me the contents of my root Drive folder"
"Create a folder called 'Project X' in folder ID: 1DEF..."
"Move document ID: 1GHI... to the Project X folder"
"Copy my template document and rename it to 'New Report'"
"Add a heading 'Summary' to the beginning of document ID: 1JKL..."
"Format all text containing 'important' as bold in my document"
"Insert a table with 3 columns and 5 rows at the end of the document"
"Apply paragraph formatting to make all headings centered"
- Check the path - Ensure the absolute path in your configuration is correct
- Verify build - Run
npm run buildin your project directory - Check permissions - Ensure
token.jsonandcredentials.jsonexist and are readable
- Re-authorize - Delete
token.jsonand run the server manually once:cd /path/to/your/google-docs-mcp node dist/server.js - Follow the authorization flow again
- Restart VS Code after successful authorization
- Restart MCP servers using Command Palette
- Check server logs in VS Code Output panel (MCP channel)
The server provides these tools in VS Code:
listGoogleDocs- List documents with filteringsearchGoogleDocs- Search by name/contentgetRecentGoogleDocs- Get recently modified docsgetDocumentInfo- Get detailed document metadata
readGoogleDoc- Read document contentappendToGoogleDoc- Add text to endinsertText- Insert at specific positiondeleteRange- Remove contentapplyTextStyle- Format text (bold, italic, colors)applyParagraphStyle- Format paragraphs (alignment, spacing)formatMatchingText- Find and format textinsertTable- Create tablesinsertPageBreak- Add page breaks
createFolder- Create new folderslistFolderContents- List folder contentsgetFolderInfo- Get folder metadatamoveFile- Move files/folderscopyFile- Copy files/foldersrenameFile- Rename files/foldersdeleteFile- Delete files/folderscreateDocument- Create new documentscreateFromTemplate- Create from templates
- Use specific document IDs - More reliable than document names
- Combine operations - Create and format documents in single requests
- Check tool results - Review what was actually done before proceeding
- Use templates - Create template documents for consistent formatting
- The server uses OAuth 2.0 for secure authentication
- Credentials are stored locally in
token.jsonandcredentials.json - Never share these files or commit them to version control
- The server only has access to your Google Drive, not other Google services
1. "Create a new document called 'Monthly Report' in my Reports folder"
2. "Add the title 'Monthly Performance Report' as a centered Heading 1"
3. "Insert a table with 4 columns and 6 rows for the data"
4. "Add section headings for Executive Summary, Key Metrics, and Action Items"
1. "Create a folder called 'Q1 Project' in my Work folder"
2. "Search for all documents containing 'Q1' in the title"
3. "Move the found documents to the Q1 Project folder"
4. "Create a new document called 'Q1 Project Overview' in that folder"
This integration brings the full power of Google Docs and Drive management directly into your VS Code workflow!