Cover image
Try Now
2025-04-14

Google-Sheet-MCP-Server

3 years

Works with Finder

0

Github Watches

0

Github Forks

0

Github Stars

Google Sheets MCP Server

A powerful Model Context Protocol (MCP) server implementation for seamless Google Sheets API integration, enabling AI assistants to create, read, update, and manage Google Sheets.

Features

  • Create, read, update, and delete Google Sheets
  • Manage sheet data with cell-level operations
  • Format cells and ranges
  • Share spreadsheets with other users
  • Search for spreadsheets
  • Comprehensive authentication options

Authentication Options

This MCP server supports multiple authentication methods:

  1. Service Account Authentication (recommended for production)

    • Provide a path to a service account key file
    • Or provide the service account JSON content directly
  2. API Key Authentication (simpler for development)

    • Provide a Google API key
  3. OAuth2 Authentication (for user-specific operations)

    • Provide OAuth client ID, client secret, and refresh token

Setup

Prerequisites

  • Node.js (v16 or higher)
  • A Google Cloud Project with the Google Sheets API enabled
  • Authentication credentials (see below)

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/google-sheets-mcp-server.git
    cd google-sheets-mcp-server
    
  2. Install dependencies:

    npm install
    
  3. Set up authentication:

    • Create a .env file based on the .env.example template
    • Add your Google Cloud credentials
  4. Build the project:

    npm run build
    
  5. Start the server:

    npm start
    

OAuth Setup

For operations that require user consent (like creating/editing spreadsheets), you'll need OAuth credentials:

  1. Create OAuth credentials in the Google Cloud Console
  2. Update the CLIENT_ID and CLIENT_SECRET in src/get-refresh-token.js
  3. Install required dependencies:
    npm install open server-destroy
    
  4. Run the script to get a refresh token:
    node src/get-refresh-token.js
    
  5. Follow the browser prompts to authorize the application
  6. Copy the refresh token to your .env file

Available Tools

The server provides the following tools:

  • google_sheets_create: Create a new Google Sheet
  • google_sheets_get: Get a Google Sheet by ID
  • google_sheets_update_values: Update values in a Google Sheet
  • google_sheets_append_values: Append values to a Google Sheet
  • google_sheets_get_values: Get values from a Google Sheet
  • google_sheets_clear_values: Clear values from a Google Sheet
  • google_sheets_add_sheet: Add a new sheet to an existing spreadsheet
  • google_sheets_delete_sheet: Delete a sheet from a spreadsheet
  • google_sheets_list: List Google Sheets accessible to the authenticated user
  • google_sheets_delete: Delete a Google Sheet
  • google_sheets_share: Share a Google Sheet with specific users
  • google_sheets_search: Search for Google Sheets by title
  • google_sheets_format_cells: Format cells in a Google Sheet
  • google_sheets_verify_connection: Verify connection with Google Sheets API

Example Usage

Here's an example of how to use this MCP server with Claude:

You can now use Google Sheets! Try these commands:

1. Create a new spreadsheet:
   "Create a new Google Sheet titled 'Monthly Budget'"

2. Add data to the spreadsheet:
   "Add expense categories and amounts to my Monthly Budget spreadsheet"

3. Format the spreadsheet:
   "Format the header row to be bold and centered"

4. Share the spreadsheet:
   "Share my Monthly Budget spreadsheet with john@example.com"

License

MIT

相关推荐

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • sigoden
  • 使用普通的bash/javascript/python函数轻松创建LLM工具和代理。

  • hkr04
  • 轻巧的C ++ MCP(模型上下文协议)SDK

  • RockChinQ
  • 😎简单易用、🧩丰富生态 -大模型原生即时通信机器人平台| 适配QQ / 微信(企业微信、个人微信) /飞书 /钉钉 / discord / telegram / slack等平台| 支持chatgpt,deepseek,dify,claude,基于LLM的即时消息机器人平台,支持Discord,Telegram,微信,Lark,Dingtalk,QQ,Slack

  • dmayboroda
  • 带有可配置容器的本地对话抹布

  • paulwing
  • 使用MCP服务创建的测试存储库

  • evilsocket
  • 简单的代理开发套件。

    Reviews

    2.8 (6)
    Avatar
    user_AA6L51EW
    2025-04-24

    The google-sheet-mcp-server by Meerkats-Ai is an outstanding tool for managing and automating Google Sheets tasks. It streamlines workflows and enhances productivity with its intuitive interface. Highly recommend for anyone looking to optimize their data management processes!

    Avatar
    user_lQtIegs4
    2025-04-24

    google-sheet-mcp-server by Meerkats-Ai is a game-changer for managing data on Google Sheets. It's incredibly efficient and integrates seamlessly into my workflow. The user-friendly interface and robust functionalities make it a top choice for anyone looking to streamline their data management tasks. Highly recommend!

    Avatar
    user_WNCFHfhc
    2025-04-24

    I've been using the google-sheet-mcp-server by Meerkats-Ai, and it has significantly streamlined my workflow. The seamless integration with Google Sheets and the efficient data management capabilities are impressive. It saves me tons of time and makes data handling a breeze. Highly recommend for anyone looking to enhance their productivity with reliable automation tools.

    Avatar
    user_gZvvrBHw
    2025-04-24

    The google-sheet-mcp-server by Meerkats-Ai is a fantastic tool for managing and automating Google Sheets tasks. As a loyal MCP user, I've found it intuitive, efficient, and a huge time saver. The seamless integration and user-friendly interface make it a must-have for anyone looking to optimize their spreadsheet workflows. Highly recommend!

    Avatar
    user_df5DPU62
    2025-04-24

    The google-sheet-mcp-server by Meerkats-Ai is a game-changer for managing Google Sheets efficiently. Its smooth integration and user-friendly interface simplify complex tasks, saving valuable time. A must-have for anyone looking to streamline their workflow with seamless Google Sheets management. Highly recommended!

    Avatar
    user_iV1S5w9q
    2025-04-24

    I've been using google-sheet-mcp-server by Meerkats-Ai and it has significantly streamlined my workflow. Its seamless integration with Google Sheets allows for efficient data management and processing. The setup was straightforward, and the support provided is fantastic. Highly recommended for anyone looking to enhance their productivity with Google Sheets!