Integrations
Enables access to Google Spreadsheet data, allowing retrieval of spreadsheet metadata and sheet content in markdown table format.
Connects with Google Apps Script Web Apps to securely access spreadsheet data while maintaining Google authentication security.
Spreadsheet MCP Server
This project is a Model Context Protocol (MCP) server for accessing data from Google Spreadsheets, making the spreadsheet information directly available to LLM.
function
- Acquiring basic information about a spreadsheet (such as a list of sheets)
- Get data from a specific sheet and format it in Markdown format
- Integrates with MCP clients (e.g. Claude for Desktop)
install
Setting environment variables
The following environment variables are used to configure the server:
GAS_WEB_APP_URL
: Google Apps Script Web App URLGAS_API_KEY
: API key for accessing Google Apps Script Web App
You can set these environment variables in the .env
file:
If the environment variable is not set, the server will operate in mock mode and will not access the actual Google Spreadsheet.
How to use
Standalone startup
Integration with Claude for Desktop
Add the following to your Claude for Desktop configuration file ( claude_desktop_config.json
):
To set an environment variable, add env
field as follows:
The configuration file is located here:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%AppData%\\Claude\\claude_desktop_config.json
Test with MCP Inspector
Tools provided
getSpreadsheet
Gets basic information about a spreadsheet and a list of the sheets it contains.
Input parameters :
url
: The URL of the spreadsheet
output :
- Spreadsheet name, ID, list of sheets (including number of rows and columns)
getSheetData
Gets data from a specific sheet in a spreadsheet.
Input parameters :
url
: The URL of the spreadsheetsheetName
: The name of the sheet to get
output :
- Sheet data (Markdown table format)
development
Project Structure
test
Integration with Google Apps Script
In actual use, this server works in conjunction with a Google Apps Script Web App:
- Create a Web App with Google Apps Script
- Implement an API to access the spreadsheet on the web app side (see
api/README.md
) - Set the API key and link it with the environment variables
GAS_WEB_APP_URL
andGAS_API_KEY
This approach allows you to avoid the Google authentication flow and maintain the security of your spreadsheet.
If the environment variable is not set, the script will operate in mock mode and return test data.
license
MIT
You must be authenticated.
Provides a Model Context Protocol (MCP) server that enables LLMs to directly access and interact with Google Spreadsheet data.