MCP.so
登录

Google Sheets MCP Server

@Meerkats-Ai

基本信息

分类

其他

许可证

MIT

传输方式

stdio

作者

Meerkats-Ai

关于 Google Sheets MCP Server

google-sheet-mcp-server

Google Sheets MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "google-sheet-mcp-server": {
      "command": "node",
      "args": [
        "src/get-refresh-token.js"
      ]
    }
  }
}

Google Sheets MCP Server 工具

14

Create a new Google Sheet

Get a Google Sheet by ID

Update values in a Google Sheet

Append values to a Google Sheet

Get values from a Google Sheet

Clear values from a Google Sheet

Add a new sheet to an existing spreadsheet

Delete a sheet from a spreadsheet

List Google Sheets accessible to the authenticated user

Delete a Google Sheet

Share a Google Sheet with specific users

Search for Google Sheets by title

Format cells in a Google Sheet

Verify connection with Google Sheets API

概览

What is Google Sheets MCP Server?

A Model Context Protocol (MCP) server that integrates with the Google Sheets API, allowing AI assistants to programmatically create, read, update, and manage Google Sheets.

How to use Google Sheets MCP Server?

Clone the repository, install dependencies (npm install), configure authentication via a .env file (supports service account, API key, or OAuth2), build (npm run build), then start (npm start). Use the provided tools (e.g., google_sheets_create, google_sheets_get) to interact with sheets.

Key features of Google Sheets MCP Server

  • Create, read, update, and delete Google Sheets
  • Cell-level operations and range manipulation
  • Format cells and ranges
  • Share spreadsheets with other users
  • Search for spreadsheets by title
  • Multiple authentication methods: service account, API key, OAuth2

Use cases of Google Sheets MCP Server

  • Automatically create and populate a monthly budget spreadsheet
  • Append expense data to an existing sheet
  • Format header rows with bold and centered text
  • Share spreadsheets with collaborators via email
  • Search for and retrieve specific sheets by title

常见问题

1

What authentication methods are supported?

The server supports Service Account (recommended for production), API Key (simpler for development), and OAuth2 (for user-specific operations).

2

How do I obtain an OAuth2 refresh token?

Run `node src/get-refresh-token.js` after configuring `CLIENT_ID` and `CLIENT_SECRET` in the script, then follow the browser prompts to authorize and copy the token to your `.env` file.

3

What are the prerequisites for using this server?

Node.js v16 or higher, a Google Cloud Project with the Google Sheets API enabled, and valid authentication credentials (service account, API key, or OAuth2).

4

What tools does the server provide?

The server includes tools for creating, getting, updating, appending, clearing, and formatting sheet data, as well as adding/deleting sheets, sharing, searching, listing, and verifying the connection.

5

Can I use this server with Claude or other AI assistants?

Yes, the README includes example usage with Claude, showing commands like "Create a new Google Sheet titled 'Monthly Budget'" and "Format the header row to be bold and centered."

评论

其他 分类下的更多 MCP 服务器