Spreadsheet MCP Server
The Spreadsheet MCP Server allows LLMs to interact with Google Spreadsheet data via the Model Context Protocol (MCP).
Retrieve basic spreadsheet info: Get spreadsheet name, ID, and list of sheets with their row/column counts using
getSpreadsheet.Extract specific sheet data: Fetch data from a named sheet and format it as a markdown table using
getSheetData.Integrate with MCP clients: Seamlessly connect with MCP clients like Claude for Desktop.
Mock mode operation: Continue development/testing even when Google APIs are inaccessible.
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.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Spreadsheet MCP Servershow me the data from the 'Sales Q1' sheet in our budget spreadsheet"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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)
Related MCP server: MCP Google Workspace Server
install
# リポジトリのクローン
git clone https://github.com/your-username/spreadsheet-mcp-server.git
cd spreadsheet-mcp-server
# 依存関係のインストール
npm install
# 環境変数の設定
cp .env.example .env
# .envファイルを編集してGAS_WEB_APP_URLとGAS_API_KEYを設定
# ビルド
npm run buildSetting 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:
GAS_WEB_APP_URL=https://script.google.com/macros/s/your-deployment-id/exec
GAS_API_KEY=your-api-keyIf 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
npm startIntegration with Claude for Desktop
Add the following to your Claude for Desktop configuration file ( claude_desktop_config.json ):
{
"mcpServers": {
"spreadsheet": {
"command": "node",
"args": ["<absolute-path-to-project>/build/index.js"]
}
}
}To set an environment variable, add env field as follows:
{
"mcpServers": {
"spreadsheet": {
"command": "node",
"args": ["<absolute-path-to-project>/build/index.js"],
"env": {
"GAS_WEB_APP_URL": "https://script.google.com/macros/s/your-deployment-id/exec",
"GAS_API_KEY": "your-api-key"
}
}
}
}The configuration file is located here:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%AppData%\\Claude\\claude_desktop_config.json
Test with MCP Inspector
npx @modelcontextprotocol/inspector node build/index.jsTools 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
src/
├── index.ts # エントリポイント
├── server.ts # MCPサーバー設定
├── config.ts # 環境変数と設定管理
├── tools/ # ツール実装
│ ├── getSpreadsheet.ts
│ ├── getSheetData.ts
│ └── index.ts
├── api/ # API処理
│ ├── README.md # API仕様
│ ├── spreadsheet.ts
│ └── types.ts
└── utils/ # ユーティリティ
└── format.tstest
# 単体テスト実行
npm test
# ウォッチモードでテスト
npm run test:watchIntegration 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_URLandGAS_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
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that integrates with Google Drive and Google Sheets, enabling users to create, read, update, and manage spreadsheets through natural language commands.980MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI agents to interact with Google Workspace services including Drive, Docs, and Sheets through natural language commands.8MIT
- AlicenseNot gradedqualityAmaintenanceMCP server for Google Sheets - read, write, and query spreadsheet data.2502MIT
- AlicenseNot gradedqualityCmaintenanceA full-featured Model Context Protocol server that gives AI assistants real-time access to Google Workspace services including Drive, Gmail, Calendar, Sheets, Docs, and Apps Script.10MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/HosakaKeigo/spreadsheet-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server