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
  • Ejecute sin esfuerzo LLM Backends, API, frontends y servicios con un solo comando.

  • 1Panel-dev
  • 🔥 1Panel proporciona una interfaz web intuitiva y un servidor MCP para administrar sitios web, archivos, contenedores, bases de datos y LLM en un servidor de Linux.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 llM 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Resumen de los mejores recursos del mundo.

  • rulego
  • ⛓️Rulego es un marco de motor de regla de orquestación de componentes de alta generación de alto rendimiento, de alto rendimiento y de alto rendimiento para GO.

  • sigoden
  • Cree fácilmente herramientas y agentes de LLM utilizando funciones Plain Bash/JavaScript/Python.

  • hkr04
  • SDK liviano C ++ MCP (Protocolo de contexto del modelo)

  • RockChinQ
  • 😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 Qq / 微信(企业微信、个人微信) / 飞书 / 钉钉 / Discord / Telegram / Slack 等平台 | 支持 Chatgpt 、 Deepseek 、 DiFy 、 Claude 、 Gemini 、 Xai 、 PPIO 、 Ollama 、 LM Studio 、阿里云百炼、火山方舟、 Siliconflow 、 Qwen 、 Moonshot 、 Chatglm 、 SillyTraven 、 MCP 等 LLM 的机器人 / Agente | Plataforma de bots de mensajería instantánea basada en LLM, admite Discord, Telegram, WeChat, Lark, Dingtalk, QQ, Slack

  • dmayboroda
  • Trapo conversacional local con contenedores configurables

  • modelscope
  • Iniciar aplicaciones de múltiples agentes empoderadas con Building LLM de manera más fácil.

  • paulwing
  • Un repositorio de pruebas creado con el servicio MCP

    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!