Skip to main content
Glama

gdrive-mcp

Un servidor MCP (Model Context Protocol) que expone una carpeta de Google Drive mediante Streamable HTTP, creado para ejecutarse en Vercel y alojado en GitHub.

Proporciona dos herramientas:

Herramienta

Descripción

list_files

Lista los archivos/carpetas de la carpeta de Drive configurada (búsqueda opcional)

read_file

Lee contenido de texto y exporta automáticamente Google Docs/Sheets/Slides

Arquitectura

  • server.ts — Punto de entrada del servidor HTTP de Node.js (endpoint MCP de Streamable HTTP).

  • src/mcp.ts — Definición del servidor MCP + herramientas.

  • src/drive.ts — Cliente de Google Drive que usa una cuenta de servicio.

La autenticación es de solo lectura (drive.readonly) mediante una cuenta de servicio de Google.


Related MCP server: gdrive-mcp-server

1. Configuración de Google Cloud (cuenta de servicio)

  1. Ve a Google Cloud Console y crea un proyecto.

  2. Habilita la API de Google Drive: APIs & ServicesLibrary → busca "Google Drive API" → Habilitar.

  3. Crea una cuenta de servicio: IAM & AdminService AccountsCreate Service Account.

  4. Crea una clave JSON para la cuenta: abre la cuenta de servicio → Keys → Añadir clave → Crear clave nueva → JSON. Descarga el archivo.

  5. Anota el correo electrónico de la cuenta de servicio (tiene un formato como name@project.iam.gserviceaccount.com).

  6. Comparte la carpeta de Drive con ese correo electrónico:

    • Abre tu carpeta en Google Drive → clic derecho → Share.

    • Pega el correo electrónico de la cuenta de servicio y dale acceso de Lector.

  7. Copia el ID de la carpeta (la parte que aparece después de /folders/ en la URL).


2. Configuración local

git clone <your-repo-url>
cd gdrive-mcp
npm install

Crea un archivo .env (copia .env.example):

DRIVE_FOLDER_ID=1XM-0CtgvW3PGDekC8qLa2ghxRyvTfjwD
GOOGLE_SERVICE_ACCOUNT_KEY=<base64 of service-account.json>

Codifica en base64 la clave de la cuenta de servicio:

  • Linux/macOS: base64 -w0 service-account.json

  • PowerShell: [Convert]::ToBase64String([IO.File]::ReadAllBytes("service-account.json"))


3. Despliegue en Vercel

Opción A — Vercel + GitHub (recomendada)

  1. Sube este repositorio a GitHub.

  2. En VercelAñadir nuevo → Proyecto → importa el repositorio de GitHub.

  3. Añade las variables de entorno (DRIVE_FOLDER_ID, GOOGLE_SERVICE_ACCOUNT_KEY).

  4. Despliega. El endpoint MCP será:

    https://<your-project>.vercel.app

Opción B — Vercel CLI

npm i -g vercel
vercel login
vercel env add DRIVE_FOLDER_ID
vercel env add GOOGLE_SERVICE_ACCOUNT_KEY
vercel --prod

4. Subir a GitHub (primera vez)

git init
git add .
git commit -m "Add gdrive-mcp server"
git branch -M main
git remote add origin https://github.com/<you>/gdrive-mcp.git
git push -u origin main

5. Conectar un cliente MCP

Apunta tu cliente a la URL del despliegue con el transporte Streamable HTTP. Ejemplo de claude_desktop_config.json:

{
  "mcpServers": {
    "gdrive": {
      "type": "http",
      "url": "https://<your-project>.vercel.app"
    }
  }
}

Para clientes que utilizan el formato de configuración MCP genérico:

{
  "mcpServers": {
    "gdrive": {
      "url": "https://<your-project>.vercel.app"
    }
  }
}

El endpoint es stateless, por lo que cada petición crea un transporte nuevo — ideal para entornos serverless. El acceso se controla mediante el uso compartido de la carpeta de Google Drive con la cuenta de servicio.

Variables de entorno

Variable

Obligatoria

Descripción

DRIVE_FOLDER_ID

ID de la carpeta de Google Drive

GOOGLE_SERVICE_ACCOUNT_KEY

Clave JSON de la cuenta de servicio codificada en base64

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    A read-only Google Drive MCP server that allows searching files, reading file content (with auto-export for Google Docs, Sheets, Slides), and retrieving file metadata via OAuth authentication.
    26
    2
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables MCP-compatible AI assistants to interact with a user's Google Drive, including listing, searching, reading, creating, updating, and deleting files, with authentication via Google OAuth.
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables Google Drive file operations (list, search, read, create) via MCP using OAuth2 authentication with token persistence.
  • F
    license
    Not graded
    quality
    B
    maintenance
    A read-only MCP server that exposes a configured Google Drive folder to MCP clients, enabling them to list, search, and extract content from various file formats like Excel, CSV, PDF, DOCX, and images.

View all related MCP servers

Related MCP Connectors

  • Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.

  • Google Docs MCP Pack — read, create, and edit Google Docs via OAuth.

  • Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shafinaz-ops/gdrive-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server