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
  • Führen Sie mühelos LLM -Backends, APIs, Frontends und Dienste mit einem Befehl aus.

  • 1Panel-dev
  • 🔥 1Panel bietet eine intuitive Weboberfläche und einen MCP -Server, um Websites, Dateien, Container, Datenbanken und LLMs auf einem Linux -Server zu verwalten.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 llm 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Zusammenfassung der weltbesten LLM -Ressourcen.

  • rulego
  • ⛓️Rugele ist ein leichter, leistungsstarker, leistungsstarker, eingebetteter Komponenten-Orchestrierungsregel-Motor-Rahmen für GO.

  • sigoden
  • Erstellen Sie einfach LLM -Tools und -Argarten mit einfachen Bash/JavaScript/Python -Funktionen.

  • hkr04
  • Leichtes C ++ MCP (Modellkontextprotokoll) SDK

  • RockChinQ
  • 😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 qq / 微信(企业微信、个人微信) / 飞书 / 钉钉 / diskord / telegram / slack 等平台 | 支持 Chatgpt 、 Deepseek 、 Diffy 、 Claude 、 Gemini 、 xai 、 ppio 、 、 ulama 、 lm Studio 、阿里云百炼、火山方舟、 siliconflow 、 qwen 、 mondshot 、 chatglm 、 sillytraven 、 mcp 等 llm 的机器人 / agent | LLM-basierte Instant Messaging Bots-Plattform, unterstützt Zwietracht, Telegramm, Wechat, Lark, Dingtalk, QQ, Slack

  • dmayboroda
  • On-Premise-Konversationslappen mit konfigurierbaren Behältern

  • modelscope
  • Bauen Sie LLM-Multi-Agent-Anwendungen auf einfachere Weise auf.

  • paulwing
  • Ein Test -Repository, das mit MCP -Dienst erstellt wurde

    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!