google-spreadsheet-mcp
Allows AI agents to read, write, and manage Google Sheets spreadsheets, including data operations (get, read, append, update), sheet management (add, delete, rename), row/column operations (insert, delete), input rules (dropdowns, checkboxes), and conditional formatting.
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., "@google-spreadsheet-mcpread values from Sheet1"
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.
Google Spreadsheet MCP Server
Google スプレッドシートを操作するための MCP (Model Context Protocol) サーバーです。 Claude Code などの AI エージェントからスプレッドシートの読み書きが可能になります。
機能
データ操作
ツール | 説明 |
| スプレッドシートのタイトルとシート(タブ)一覧を取得 |
| 指定範囲のデータを読み込み |
| 指定範囲の末尾にデータを追記 |
| 指定範囲のデータを上書き更新 |
シート管理
ツール | 説明 |
| 新しいシート(タブ)を追加 |
| シート(タブ)を削除 |
| シート(タブ)の名前を変更 |
行列操作
ツール | 説明 |
| 指定位置に空の行を挿入 |
| 指定位置に空の列を挿入 |
| 指定範囲の行を削除 |
| 指定範囲の列を削除 |
入力規則
ツール | 説明 |
| ドロップダウンリストを設定(固定値) |
| ドロップダウンリストを設定(セル範囲参照) |
| チェックボックスを設定 |
| 入力規則一覧を取得 |
| 指定範囲の入力規則を削除 |
条件付き書式
ツール | 説明 |
| カスタム数式による条件付き書式を追加 |
| 条件付き書式ルール一覧を取得 |
| 指定したインデックスの条件付き書式を削除 |
Related MCP server: gworkspace-mcp
セットアップ
1. GCP プロジェクト設定
Google Cloud Console でプロジェクトを作成
Google Sheets API を有効化
APIs & Services → Enable APIs → 「Google Sheets API」を検索 → 有効化
2. OAuth クライアント ID 作成
APIs & Services → Credentials → Create Credentials → OAuth client ID
アプリケーションの種類: ウェブアプリケーション
名前を入力(例:
sheets-mcp)承認済みのリダイレクトURI:
http://localhost:8080/callbackを追加Create → JSON をダウンロード →
credentials/client_secret.jsonとして保存
3. ビルド
pnpm install
pnpm run build4. Claude Code 設定
.mcp.json をプロジェクトルートに作成:
{
"mcpServers": {
"google-spreadsheet": {
"command": "node",
"args": ["/path/to/google-spreadsheet-mcp/dist/index.js"],
"env": {
"CLIENT_SECRET_PATH": "/path/to/credentials/client_secret.json",
"TOKEN_PATH": "/path/to/credentials/token.json"
}
}
}
}5. 初回認証
初回起動時にブラウザが開き、Google アカウントでの認証を求められます。
認証後、トークンが TOKEN_PATH に保存され、以降は自動的に認証されます。
Note: 自分の Google アカウントで認証するため、既にアクセス権のあるスプレッドシートはすべて操作可能です。
使用例
シート情報を取得
https://docs.google.com/spreadsheets/d/xxx/edit のシート情報を取得してデータを読み込み
このスプレッドシートのシート1 A1:C10 を読み込んでデータを追記
シート1 に以下のデータを追加して:
- 山田, 25, エンジニア
- 佐藤, 30, デザイナーデータを更新
A1:B2 を以下に更新して:
- 名前, 年齢
- 田中, 28シートを追加
「売上データ」という名前のシートを追加してシートの名前を変更
シート1 を「顧客リスト」に名前変更してドロップダウンを設定
D列にドロップダウンを設定して。選択肢は「承認」「却下」「保留」チェックボックスを設定
E列にチェックボックスを設定して条件付き書式を追加
D列が「承認」の場合は行全体を緑色にして制限事項
新規スプレッドシートの作成は非対応
書式設定はカスタム数式による条件付き書式のみ対応(フォント変更等は非対応)
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/CHIHI913/google-spreadsheet-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server