This project provides a Model Context Protocol (MCP) server for interacting with the Google Slides API. It allows you to create, read, modify, and manage Google Slides presentations programmatically through a secure service account authentication method.
Quick Start for Gemini CLI (Primary Method)
MCP server for Google Slides integration with service account authentication
Stars
4
Tools
—
Uptime
—
Complete Setup Instructions
Follow these step-by-step instructions to set up the Google Slides MCP server with Gemini CLI:
Create working directory
mkdir ~/coding_projects/working
Navigate to working directory
cd ~/coding_projects/working
Create keys directory for Google service account
mkdir -p ~/coding_projects/working/keys
Copy your Google service account key
Drag and drop your google_service_account_key.json file to the directory: ~/coding_projects/working/keys
Make sure the file is named exactly google_service_account_key.json
Create .env file with Gemini API key
vi ~/coding_projects/working/.env
Press i to enter insert mode
Type: GEMINI_API_KEY=your_actual_api_key_here
Press ESC, then type :wq and press Enter to save and exit
Create MCP configuration directory
mkdir -p ~/coding_projects/working/.gemini
Configure MCP settings
vi ~/coding_projects/working/.gemini/settings.json
Navigate to "APIs & Services" > "Enabled APIs & services".
Click "+ ENABLE APIS AND SERVICES", search for "Google Slides API", and enable it.
Navigate to "APIs & Services" > "Credentials".
Click "+ CREATE CREDENTIALS" > "Service account".
Fill in the service account details:
Service account name (e.g., "slides-mcp-service")
Service account ID (will be auto-generated)
Service account description (optional)
Click "Create".
Skip the optional steps for granting roles and user access.
Click "Done".
Find your newly created service account in the list and click on it.
Go to the "Keys" tab.
Click "Add Key" > "Create new key".
Choose "JSON" as the key type.
Click "Create". A JSON file will be downloaded to your computer.
Important: Rename this file to google_service_account_key.json and place it in the keys directory of this project.
Grant Permissions (if needed):
If you need to access specific Google Slides presentations that are not owned by the service account:
Share the presentations with the service account email (found in the JSON key file as client_email)
Grant at least "Editor" permissions for full functionality
Acknowledgments
This project is based on the original work by Matteo Antoci: google-slides-mcp. The original project is licensed under GPL-3.0, and this modified version maintains the same license. We are grateful to Matteo Antoci and all contributors to the original project for creating this foundation.
Major Changes from Original:
Authentication Method: Changed from OAuth 2.0 with refresh tokens to Service Account authentication for improved security and easier deployment
New Features: Added move_presentation tool for moving/copying presentations to Google Drive folders
Enhanced Security: Using service account key file stored locally instead of environment variables for credentials
Drive API Integration: Added Google Drive API scopes to support file management operations
MCP Configuration for Other Tools
This MCP server can also be used with other AI tools that support the Model Context Protocol:
Note: First install globally with npm install -g @bohachu/google-slides-mcp
After editing the configuration:
Completely quit Claude Desktop
Restart Claude Desktop
Look for the MCP indicator (🔌) in the bottom-right corner of the chat input
Claude Code
Using CLI (after global installation):
# First install globally
npm install -g @bohachu/google-slides-mcp
# Add the server
claude mcp add google-slides google-slides-mcp
# For project-specific configuration
claude mcp add google-slides -s project google-slides-mcp
Direct configuration file:
User config: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
Refresh and ensure the server indicator turns green
Important Notes for All Tools:
First install the server globally: npm install -g @bohachu/google-slides-mcp
The service account key must be present at keys/google_service_account_key.json relative to the current working directory
No environment variables are needed as the server loads credentials from the key file
After configuration changes, restart the respective tool for changes to take effect
For Windows users, use forward slashes in paths or escape backslashes (e.g., C:/path/to/file or C:\\path\\to\\file)
Troubleshooting MCP Connection:
Claude Desktop/Code: Check logs at ~/Library/Logs/Claude/mcp*.log (macOS) or %APPDATA%\Claude\logs\mcp*.log (Windows)
Cursor: Open Output panel (Ctrl+Shift+U) and select "MCP Logs" from dropdown
Gemini CLI: Run with --debug flag for detailed logging
Ensure Node.js is installed and accessible from command line (node --version)
Verify the build directory exists and contains index.js after running npm run build
Running the Server
Execute the compiled code:
npm run start
The server will start and listen for MCP requests on standard input/output (stdio). You should see a message like: Google Slides MCP server running and connected via stdio.
Available Tools
The server exposes the following tools via the Model Context Protocol:
create_presentation: Creates a new Google Slides presentation.
Input:
title (string, required): The title for the new presentation.
Output: JSON object representing the created presentation details.
get_presentation: Retrieves details about an existing presentation.
Input:
presentationId (string, required): The ID of the presentation to retrieve.
fields (string, optional): A field mask (e.g., "slides,pageSize") to limit the returned data.
Output: JSON object representing the presentation details.
batch_update_presentation: Applies a series of updates to a presentation. This is the primary method for modifying slides (adding text, shapes, images, creating slides, etc.).
Input:
presentationId (string, required): The ID of the presentation to update.
requests (array, required): An array of request objects defining the updates. Refer to the Google Slides API batchUpdate documentation for the structure of individual requests.