Provides tools for reading and writing Google Sheets data, including reading cell ranges, writing data to specific ranges, appending rows, retrieving spreadsheet information, and creating new sheets within a spreadsheet.
Google Sheets MCP Server
Googleスプレッドシートと連携するMCP(Model Context Protocol)サーバーです。
機能
- スプレッドシートの読み取り
- スプレッドシートへの書き込み
- 行の追加
- スプレッドシート情報の取得
- 新しいシートの作成
前提
セットアップ
1. 依存関係のインストール
2. Google Cloud認証の設定
- Google Cloud Consoleでプロジェクトを作成
- Google Sheets APIを有効化
- サービスアカウントを作成し、JSONキーファイルをダウンロード
- ダウンロードしたキーファイルを
key/
ディレクトリに配置(mkdir key
)
3. ビルド
4. 起動
使用方法
Cursorでの使用
mcp.json
を設定してCursorで使用できます:
重要: GOOGLE_APPLICATION_CREDENTIALS
のパスは、ダウンロードしたサービスアカウントキーファイルの実際のパスに変更してください。
重要: スプレットシートの右上にある「共有」からサービスアカウントのメールアドレスを追加
利用可能なツール
read_sheet
: スプレッドシートの指定された範囲のデータを読み取るwrite_sheet
: スプレッドシートの指定された範囲にデータを書き込むappend_row
: スプレッドシートの最後に新しい行を追加するget_sheet_info
: スプレッドシートの基本情報を取得するcreate_sheet
: 新しいシートを作成する
注意事項
- サービスアカウントのキーファイルは機密情報です。
.gitignore
に追加して、リポジトリにコミットしないでください - スプレッドシートにアクセスするには、サービスアカウントのメールアドレスをスプレッドシートの共有設定に追加する必要があります
- 各利用者は自分のGoogle Cloudプロジェクトでサービスアカウントを作成し、キーファイルをダウンロードする必要があります
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables interaction with Google Spreadsheets through the Model Context Protocol. Supports reading, writing, appending rows, creating sheets, and retrieving spreadsheet information with Google Cloud service account authentication.