@beatmaster/google-sheets-mcp
v1.3.1
Published
MCP server for Google Spreadsheets - read, write, create, format, share
Maintainers
Readme
@beatmaster/google-sheets-mcp
MCP (Model Context Protocol) server for Google Spreadsheets. Enables AI assistants like Claude to read, write, create, format, and share Google Spreadsheets.
Google スプレッドシート用の MCP サーバーです。Claude などの AI アシスタントから、スプレッドシートの読み書き・作成・書式設定・共有ができます。
Features / 機能一覧
| Tool | Description | 説明 | |------|-------------|------| | sheets_read | Read data from a spreadsheet | スプレッドシートのデータを読み取り | | sheets_write | Write data (CSV/TSV/JSON) | データの書き込み(CSV/TSV/JSON対応) | | sheets_create | Create a new spreadsheet | 新規スプレッドシート作成 | | sheets_delete | Delete a spreadsheet | スプレッドシート削除 | | sheets_list_all | List all spreadsheets in Drive | Google Drive内のスプシ一覧 | | sheets_list | List sheets/tabs | シート(タブ)一覧取得 | | sheets_add_sheet | Add a new sheet tab | シートタブ追加 | | sheets_format | Format cells (bold, color, borders) | セル書式設定(太字・色・罫線等) | | sheets_auto_resize | Auto-resize columns/rows to fit content | カラム幅・行高さの自動調整 | | sheets_merge | Merge or unmerge cells | セルの結合・結合解除 | | sheets_preview | Visual HTML preview with formatting | 書式付きHTMLプレビュー(ブラウザ表示) | | sheets_share | Share with others | 他ユーザーへの共有 |
Prerequisites / 事前準備
- A Google Cloud project with Sheets API and Drive API enabled
- OAuth2 credentials (Client ID and Client Secret)
- Google Sheets API と Google Drive API を有効にした Google Cloud プロジェクト
- OAuth2 認証情報(クライアント ID とクライアント シークレット)
Setup / セットアップ
1. Install / インストール
npm install -g @beatmaster/google-sheets-mcp2. Google Cloud Setup / Google Cloud の設定
- Go to Google Cloud Console / Google Cloud Console にアクセス
- Create a new project / 新規プロジェクトを作成
- Enable Google Sheets API and Google Drive API / Google Sheets API と Google Drive API を有効化
- Create OAuth2 credentials (Desktop app) / OAuth2 認証情報を作成(デスクトップアプリ)
- Add your Google account as a test user (if in testing mode) / テストユーザーに自分の Google アカウントを追加
3. Authenticate / 認証
Set your credentials and run the auth setup:
認証情報を設定して初回認証を実行します:
Windows:
set GOOGLE_CLIENT_ID=your-client-id
set GOOGLE_CLIENT_SECRET=your-client-secret
google-sheets-mcp-authMac / Linux:
export GOOGLE_CLIENT_ID="your-client-id"
export GOOGLE_CLIENT_SECRET="your-client-secret"
google-sheets-mcp-authThis opens a browser for Google authentication. The token is saved to ~/.google-sheets-mcp/oauth-token.json.
ブラウザが開き、Google 認証後にトークンが ~/.google-sheets-mcp/oauth-token.json に保存されます。
4. Configure MCP Client / MCP クライアントの設定
Add to your Claude Code config (~/.claude.json):
Claude Code の設定ファイル(~/.claude.json)に追加:
Mac / Linux (npx):
{
"mcpServers": {
"google-sheets": {
"command": "npx",
"args": ["-y", "@beatmaster/google-sheets-mcp"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id",
"GOOGLE_CLIENT_SECRET": "your-client-secret"
}
}
}
}Windows (global install):
{
"mcpServers": {
"google-sheets": {
"command": "google-sheets-mcp",
"args": [],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id",
"GOOGLE_CLIENT_SECRET": "your-client-secret"
}
}
}
}Restart Claude Code after saving.
保存後、Claude Code を再起動してください。
License
MIT
