Spreadsheet MCP Server logo

Spreadsheet MCP Server

by HosakaKeigo

This project is a Model Context Protocol (MCP) server for accessing data in Google Spreadsheets. It enables LLMs to directly utilize spreadsheet information.

View on GitHub

Last updated: N/A

What is Spreadsheet MCP Server?

The Spreadsheet MCP Server is a server that allows Large Language Models (LLMs) to access and utilize data directly from Google Spreadsheets via the Model Context Protocol (MCP).

How to use Spreadsheet MCP Server?

  1. Clone the repository. 2. Install dependencies using npm install. 3. Configure environment variables (GAS_WEB_APP_URL and GAS_API_KEY) in a .env file. 4. Build the project using npm run build. 5. Start the server using npm start. Alternatively, integrate with Claude for Desktop by modifying the claude_desktop_config.json file.

Key features of Spreadsheet MCP Server

  • Retrieves basic spreadsheet information (e.g., sheet list)

  • Retrieves data from specific sheets and formats it in Markdown

  • Integrates with MCP clients like Claude for Desktop

  • Supports mock mode for testing without actual Google Spreadsheet access

  • Provides tools for fetching spreadsheet metadata and sheet data

Use cases of Spreadsheet MCP Server

  • Enabling LLMs to answer questions based on spreadsheet data

  • Automating tasks that require spreadsheet data processing

  • Integrating spreadsheet data into LLM-powered applications

  • Providing LLMs with context from spreadsheets for more informed responses

FAQ from Spreadsheet MCP Server

What is the purpose of GAS_WEB_APP_URL?

It specifies the URL of the Google Apps Script Web App that the server interacts with to access the spreadsheet.

What is the purpose of GAS_API_KEY?

It is the API key used to authenticate requests to the Google Apps Script Web App.

How do I set up the Google Apps Script Web App?

You need to create a Web App in Google Apps Script that accesses the spreadsheet and exposes an API. Refer to api/README.md for API specifications.

What happens if the environment variables are not set?

The server will operate in mock mode and return test data instead of accessing a real Google Spreadsheet.

How do I test the server?

You can use the MCP Inspector or integrate it with Claude for Desktop. You can also run the unit tests using npm test.