Google Slides MCP Server

Google Slides MCP Server

By matteoantoci GitHub

MCP Server for Google Slides

google-slides mcp
Overview

what is Google Slides MCP Server?

Google Slides MCP Server is a Model Context Protocol (MCP) server designed for programmatic interaction with the Google Slides API, enabling users to create, read, and modify Google Slides presentations.

how to use Google Slides MCP Server?

To use the server, clone the repository, install dependencies, obtain Google API credentials, configure the server with your credentials, build the server, and then run it to start listening for requests.

key features of Google Slides MCP Server?

  • Create new Google Slides presentations programmatically.
  • Retrieve details of existing presentations.
  • Batch update presentations with multiple modifications.
  • Access specific slides within a presentation.

use cases of Google Slides MCP Server?

  1. Automating the creation of presentation slides for reports.
  2. Updating existing presentations with new content dynamically.
  3. Integrating Google Slides functionality into other applications or workflows.

FAQ from Google Slides MCP Server?

  • What are the prerequisites for using the server?

You need Node.js, npm, a Google Cloud Project with the Google Slides API enabled, and OAuth 2.0 credentials.

  • Is there a way to automate the authorization process?

Yes, you can use the Google OAuth 2.0 Playground to generate a refresh token for automated access.

  • Can I modify existing presentations?

Yes, the server allows batch updates to modify existing presentations.

Content

Google Slides MCP Server

This project provides a Model Context Protocol (MCP) server for interacting with the Google Slides API. It allows you to create, read, and modify Google Slides presentations programmatically.

Prerequisites

  • Node.js (v18 or later recommended)
  • npm (usually comes with Node.js)
  • Google Cloud Project with the Google Slides API enabled.
  • OAuth 2.0 Credentials (Client ID and Client Secret) for your Google Cloud Project.
  • A Google Refresh Token associated with the OAuth 2.0 credentials and the necessary Google Slides API scopes.

Setup

  1. Clone the repository (if applicable) or ensure you are in the project directory.

  2. Install dependencies:

    npm install
    
  3. Obtain Google API Credentials:

    • Go to the Google Cloud Console.
    • Create a new project or select an existing one.
    • 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" > "OAuth client ID".
    • If prompted, configure the OAuth consent screen. For "User type", choose "External" unless you have a Google Workspace account and want to restrict it internally. Provide an app name, user support email, and developer contact information.
    • On the "Scopes" page during consent screen setup, click "ADD OR REMOVE SCOPES". Search for and add the following scopes:
      • https://www.googleapis.com/auth/presentations (To view and manage your presentations)
      • (Optional: Add https://www.googleapis.com/auth/drive.readonly or other Drive scopes if needed for specific operations like listing files, although not strictly required for basic Slides operations)
    • Save the consent screen configuration.
    • Go back to "Credentials", click "+ CREATE CREDENTIALS" > "OAuth client ID".
    • Select "Desktop app" as the Application type.
    • Give it a name (e.g., "Slides MCP Client").
    • Click "Create". You will see your Client ID and Client Secret. Copy these down securely. You can also download the JSON file containing these credentials.
  4. Obtain a Google Refresh Token:

    • A refresh token allows the server to obtain new access tokens without requiring user interaction each time. Generating one typically involves a one-time authorization flow.
    • You can use the Google OAuth 2.0 Playground for this:
      • Go to the OAuth 2.0 Playground.
      • Click the gear icon (Settings) in the top right.
      • Check "Use your own OAuth credentials".
      • Enter the Client ID and Client Secret you obtained in the previous step.
      • In the "Step 1 - Select & authorize APIs" section on the left, find "Slides API v1" and select the https://www.googleapis.com/auth/presentations scope (and any other Drive scopes if you added them).
      • Click "Authorize APIs".
      • Sign in with the Google account you want the server to act on behalf of.
      • Grant the requested permissions.
      • You will be redirected back to the Playground. In "Step 2 - Exchange authorization code for tokens", you should see the Refresh token and Access token. Copy the Refresh token securely.
  5. Configure Credentials in MCP Settings: Locate your MCP settings file (e.g., .../User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json). Find the entry for "google-slides-mcp" and update its "env" block with your actual credentials:

    "google-slides-mcp": {
      // ... other settings ...
      "env": {
        "GOOGLE_CLIENT_ID": "YOUR_CLIENT_ID",
        "GOOGLE_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
        "GOOGLE_REFRESH_TOKEN": "YOUR_REFRESH_TOKEN"
      }
      // ... other settings ...
    }
    

    Replace YOUR_CLIENT_ID, YOUR_CLIENT_SECRET, and YOUR_REFRESH_TOKEN with the actual values you obtained. The MCP runner will inject these values into the server's environment when it starts.

Building the Server

Compile the TypeScript code to JavaScript:

npm run build

This will create a build directory containing the compiled JavaScript code.

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.
      • writeControl (object, optional): Controls write request execution (e.g., using revision IDs).
    • Output: JSON object representing the result of the batch update.
  • get_page: Retrieves details about a specific page (slide) within a presentation.

    • Input:
      • presentationId (string, required): The ID of the presentation containing the page.
      • pageObjectId (string, required): The object ID of the page (slide) to retrieve.
    • Output: JSON object representing the page details.

(More tools can be added by extending src/index.ts)

No tools information available.
School MCP
School MCP by 54yyyu

A Model Context Protocol (MCP) server for academic tools, integrating with Canvas and Gradescope platforms.

canvas mcp
View Details
repo-template
repo-template by loonghao

A Model Context Protocol (MCP) server for Python package intelligence, providing structured queries for PyPI packages and GitHub repositories. Features include dependency analysis, version tracking, and package metadata retrieval for LLM interactions.

-

google-calendar mcp
View Details
strava-mcp
strava-mcp by jeremysilva1098

MCP server for strava

strava mcp
View Details

Model Context Protocol (MCP) server implementation for Rhinoceros/Grasshopper integration, enabling AI models to interact with parametric design tools

grasshopper mcp
View Details

MCP configuration to connect AI agent to a Linux machine.

security mcp
View Details

AI assistant built with Streamlit, NVIDIA NIM (LLaMa 3.3:70B) / Ollama, and Model Control Protocol (MCP).

python mcp
View Details