Spreadsheet MCP Server
Servidor MCP de hojas de cálculo
Este proyecto es un servidor de Protocolo de Contexto de Modelo (MCP) para acceder a datos en hojas de cálculo de Google. Permite que LLM utilice directamente la información de la hoja de cálculo.
función
Adquirir información básica sobre una hoja de cálculo (como una lista de hojas)
Obtener datos de una hoja específica y formatearla en formato Markdown
Se integra con clientes MCP (por ejemplo, Claude para escritorio)
Related MCP server: MCP Google Workspace Server
instalar
# リポジトリのクローン
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 buildConfiguración de variables de entorno
Las siguientes variables de entorno se utilizan para configurar el servidor:
GAS_WEB_APP_URL: URL de la aplicación web de Google Apps ScriptGAS_API_KEY: Clave API para acceder a la aplicación web de Google Apps Script
Puede configurar estas variables de entorno en el archivo .env :
GAS_WEB_APP_URL=https://script.google.com/macros/s/your-deployment-id/exec
GAS_API_KEY=your-api-keySi no se configura la variable de entorno, el servidor funcionará en modo simulado y no accederá a la hoja de cálculo de Google real.
Cómo utilizar
Startup independiente
npm startIntegración con Claude para escritorio
Agregue lo siguiente a su archivo de configuración de Claude for Desktop ( claude_desktop_config.json ):
{
"mcpServers": {
"spreadsheet": {
"command": "node",
"args": ["<absolute-path-to-project>/build/index.js"]
}
}
}Para establecer una variable de entorno, agregue env de la siguiente manera:
{
"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"
}
}
}
}El archivo de configuración se encuentra aquí:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonVentanas:
%AppData%\\Claude\\claude_desktop_config.json
Prueba con MCP Inspector
npx @modelcontextprotocol/inspector node build/index.jsHerramientas proporcionadas
obtenerHoja de cálculo
Obtiene información básica sobre una hoja de cálculo y una lista de las hojas que contiene.
Parámetros de entrada :
url: La URL de la hoja de cálculo
producción :
Nombre de la hoja de cálculo, ID, lista de hojas (incluido el número de filas y columnas)
obtenerDatosDeHoja
Obtiene datos de una hoja específica en una hoja de cálculo.
Parámetros de entrada :
url: La URL de la hoja de cálculosheetName: El nombre de la hoja a obtener
producción :
Datos de la hoja (formato de tabla Markdown)
desarrollo
Estructura del proyecto
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.tsprueba
# 単体テスト実行
npm test
# ウォッチモードでテスト
npm run test:watchIntegración con Google Apps Script
En el uso real, este servidor funciona junto con una aplicación web de Google Apps Script:
Crear una aplicación web con Google Apps Script
Implementar una API para acceder a la hoja de cálculo en el lado de la aplicación web (ver
api/README.md)Establezca la clave API y vincúlela con las variables de entorno
GAS_WEB_APP_URLyGAS_API_KEY
Este enfoque le permite evitar el flujo de autenticación de Google y mantener la seguridad de su hoja de cálculo.
Si no se configura la variable de entorno, el script funcionará en modo simulado y devolverá datos de prueba.
licencia
Instituto Tecnológico de Massachusetts (MIT)
Available Tools
2 toolsgetSheetDataC
スプレッドシートの特定シートのデータを取得
Inputs: url (required), sheetName (required).
getSpreadsheetB
スプレッドシートの基本情報と含まれるシート一覧を取得
Inputs: url (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: getSheetData retrieves data from a specific sheet within a spreadsheet, while getSpreadsheet provides metadata and a list of sheets for the entire spreadsheet. There is no overlap or ambiguity between these operations.
Both tools follow a consistent verb_noun naming pattern (getSheetData and getSpreadsheet), using camelCase uniformly. The naming is predictable and readable across the tool set.
With only 2 tools, this server feels thin for a spreadsheet domain, which typically requires operations like create, update, delete, or search. The count is too low for comprehensive coverage, limiting agent functionality.
The tool set is severely incomplete for spreadsheet operations, lacking essential CRUD actions such as creating or modifying sheets, updating cell data, or deleting content. This will cause significant agent failures in handling typical spreadsheet tasks.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
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.16,929 PyPI1,021MIT
- 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 gradedqualityBmaintenanceMCP server for Google Sheets - read, write, and query spreadsheet data.599 npm2MIT
- AlicenseNot gradedqualityBmaintenanceA 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.2,201 PyPI12MIT