Sponsored by Deepsite.site

Google Sheets API MCP Server

Created By
mattcoatsworth8 months ago
Content

Google Sheets API MCP Server

A comprehensive Model Context Protocol (MCP) server for interacting with the Google Sheets API. This server provides tools and resources for managing spreadsheets, sheets, values, and developer metadata.

## Features

- Create, read, update, and delete spreadsheets
- Manage sheets within spreadsheets
- Read, write, append, and clear values
- Work with developer metadata
- Access spreadsheet data through MCP resources

## Prerequisites

- Node.js 16 or higher
- Google Cloud Platform project with the Google Sheets API enabled
- OAuth 2.0 credentials (client ID, client secret, refresh token)

## Setup

1. Clone this repository
2. Install dependencies:
   ```
   npm install
   ```
3. Create a `.env` file based on `.env.example` with your Google API credentials:
   ```
   CLIENT_ID=your_client_id
   CLIENT_SECRET=your_client_secret
   REDIRECT_URI=your_redirect_uri
   REFRESH_TOKEN=your_refresh_token
   ```

## Usage

### Running the server

```
npm start
```

### Development mode

```
npm run dev
```

### Testing with MCP Inspector

```
npm run inspect
```

## Available Tools

### Spreadsheet Management

- `createSpreadsheet`: Create a new spreadsheet
- `getSpreadsheet`: Get spreadsheet details
- `batchUpdate`: Apply multiple updates to a spreadsheet

### Sheet Management

- `copySheet`: Copy a sheet to another spreadsheet
- `addSheet`: Add a new sheet to a spreadsheet
- `deleteSheet`: Delete a sheet from a spreadsheet
- `updateSheetProperties`: Update sheet properties

### Values Management

- `getValues`: Get values from a range
- `updateValues`: Update values in a range
- `appendValues`: Append values to a range
- `clearValues`: Clear values from a range
- `batchGetValues`: Get values from multiple ranges
- `batchUpdateValues`: Update values in multiple ranges

### Developer Metadata

- `getDeveloperMetadata`: Get all developer metadata
- `createDeveloperMetadata`: Create new developer metadata
- `updateDeveloperMetadata`: Update existing developer metadata
- `deleteDeveloperMetadata`: Delete developer metadata

## Available Resources

- `sheets://spreadsheet/{spreadsheetId}`: Get spreadsheet details
- `sheets://spreadsheet/{spreadsheetId}/sheet/{sheetName}`: Get sheet details
- `sheets://spreadsheet/{spreadsheetId}/values/{range}`: Get values from a range
- `sheets://spreadsheet/{spreadsheetId}/metadata`: Get all developer metadata

## Authentication

This server uses OAuth 2.0 for authentication with the Google Sheets API. You need to provide the following credentials in the `.env` file:

- `CLIENT_ID`: Your Google API client ID
- `CLIENT_SECRET`: Your Google API client secret
- `REDIRECT_URI`: The redirect URI configured in your Google API project
- `REFRESH_TOKEN`: A refresh token obtained through the OAuth 2.0 flow

## License

MIT
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Playwright McpPlaywright MCP server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
WindsurfThe new purpose-built IDE to harness magic
Tavily Mcp
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
ChatWiseThe second fastest AI chatbot™
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Amap Maps高德地图官方 MCP Server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
DeepChatYour AI Partner on Desktop
CursorThe AI Code Editor
Serper MCP ServerA Serper MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.