spreadsheet_local_mcp_server
服务介绍
Spreadsheet Local MCP Server
Google Spreadsheet / Google Drive 取得 Local MCP (Model Context Protocol)
Stdio 使用通信Claude Desktop MCP 直接利用
機能
- 取得: Google Spreadsheet Google Drive 上 Excel 読込
- Google Sheets API Drive API 併用Excel
前提条件
- Node.js (v18以上推奨)
- Google Cloud Platform
- Google Sheets API 有効化
- Google Drive API 有効化
- OAuth 2.0 ID 作成
-
git clone <repository-url> cd spreadsheet_local_mcp_server -
依存関係
npm install -
環境変数設定
.env.example.env作成必要値設定cp .env.example .env.env編集:PORT=8080 GOOGLE_REDIRECT_URI=http://localhost:8080/auth/callback注意: Google Cloud Console OAuth 同意画面設定自分追加 URI (
http://localhost:8080/auth/callback) 許可済 URI 追加 -
npm run build
MCP 設定 (Claude Desktop)
Claude Desktop 使用claude_desktop_config.json (通常 ~/Library/Application Support/Claude/claude_desktop_config.json ) 以下追加
{
"mcpServers": {
"spreadsheet-local": {
"command": "node",
"args": ["/absolute/path/to/spreadsheet_local_mcp_server/dist/index.js"],
"env": {
"GOOGLE_REDIRECT_URI": "http://localhost:8080/auth/callback"
}
}
}
}
/absolute/path/to/... 部分実際絶対置換
認証
初回利用時期限切時認証必要
MCP 起動認証必要場合自動的 (http://localhost:8080) 立上開
Google 権限許可認証完了MCP 機能利用可能
利用可能
get_data
Google Spreadsheet Google Drive 上取得
- 引数:
url(string, 必須): Google Spreadsheet URL Google Drive URLsheetName(string, ): 名省略時最初使用
構成
src/index.ts: 認証起動制御 MCP 初期化行src/mcp.ts: MCP 設定 (Stdio) 定義 (get_data)src/auth.ts: Google OAuth 認証src/sheets.ts: Google Sheets API 操作src/drive.ts: Google Drive API 操作