New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mcp-google-docs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mcp-google-docs

MCP server for Google Drive, Docs and Sheets

latest
npmnpm
Version
1.0.2
Version published
Weekly downloads
167
24.63%
Maintainers
1
Weekly downloads
 
Created
Source

MCP Google Docs

English | 中文

English

Lightweight MCP Server for querying, reading, and modifying Google Drive documents and spreadsheets.

Setup

1. Create Google Cloud Project

  • Go to Google Cloud Console
  • Create a new project
  • Enable Google Drive API, Google Docs API, Google Sheets API
  • Create OAuth 2.0 credentials (Desktop app type)
  • Save your Client ID and Client Secret

2. Configure MCP Client

Add to your Claude Desktop config:

{
  "mcpServers": {
    "google-docs": {
      "command": "npx",
      "args": ["-y", "mcp-google-docs"],
      "env": {
        "GOOGLE_CLIENT_ID": "your_client_id",
        "GOOGLE_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}

3. First Use

Call auth_login tool, browser will open Google authorization page.

Tools

ToolDescription
auth_loginOAuth login
auth_statusCheck auth status
gdrive_listList files
gdrive_searchSearch files
gdrive_infoGet file info
gdocs_readRead document
gdocs_insertInsert text
gdocs_appendAppend text
gdocs_replaceFind and replace
gsheets_infoGet spreadsheet info
gsheets_readRead sheet
gsheets_updateUpdate cells
gsheets_batch_updateBatch update
gsheets_append_rowAppend row
gsheets_append_rowsAppend multiple rows at once
gsheets_insert_rowsInsert empty rows at position

Prompt Template

## Google Docs MCP Rules

### Workflow
1. Run auth_login first if not authenticated
2. Use gdrive_search or gdrive_list to find files
3. Use read/update tools to operate

### Required
- Always read before modifying
- Use batch_update for bulk operations

### Forbidden
- Never guess file IDs, always search first
- Never update more than 100 cells at once

中文

轻量级 MCP Server,支持查询、阅读、修改 Google Drive 中的文档和表格。

安装配置

1. 创建 Google Cloud 项目

  • 访问 Google Cloud Console
  • 创建新项目
  • 启用 Google Drive API、Google Docs API、Google Sheets API
  • 创建 OAuth 2.0 凭据(桌面应用类型)
  • 记录 Client ID 和 Client Secret

2. 配置 MCP 客户端

在 Claude Desktop 配置文件中添加:

{
  "mcpServers": {
    "google-docs": {
      "command": "npx",
      "args": ["-y", "mcp-google-docs"],
      "env": {
        "GOOGLE_CLIENT_ID": "your_client_id",
        "GOOGLE_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}

3. 首次使用

调用 auth_login 工具,浏览器会弹出 Google 授权页面,授权后即可使用。

工具列表

工具说明
auth_loginOAuth 授权登录
auth_status检查授权状态
gdrive_list列出文件
gdrive_search搜索文件
gdrive_info获取文件信息
gdocs_read读取文档
gdocs_insert插入文本
gdocs_append追加文本
gdocs_replace查找替换
gsheets_info获取表格信息
gsheets_read读取表格
gsheets_update更新单元格
gsheets_batch_update批量更新
gsheets_append_row追加行
gsheets_append_rows批量追加多行
gsheets_insert_rows在指定位置插入空行

使用提示词

## Google Docs MCP 使用规则

### 流程
1. 首次使用先调用 auth_login 授权
2. 用 gdrive_search 或 gdrive_list 找到目标文件
3. 用对应的 read/update 工具操作

### 强制
- 修改前必须先读取确认内容
- 批量操作使用 batch_update

### 禁止
- 不要猜测文件ID,必须先搜索
- 不要一次修改超过100个单元格

License

MIT

Keywords

mcp

FAQs

Package last updated on 05 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts