Skip to main content
Glama

Google Sheets MCP Server

Googleスプレッドシートと連携するMCP(Model Context Protocol)サーバーです。 ローカル用です。

機能

  • スプレッドシートの読み取り

  • スプレッドシートへの書き込み

  • 行の追加

  • スプレッドシート情報の取得

  • 新しいシートの作成

Related MCP server: Google Sheets MCP Server

前提

node -v
v24.8.0

セットアップ

1. 依存関係のインストール

npm install

2. Google Cloud認証の設定

  1. Google Cloud Consoleでプロジェクトを作成

  2. Google Sheets APIを有効化

  3. サービスアカウントを作成し、JSONキーファイルをダウンロード

  4. ダウンロードしたキーファイルをkey/ディレクトリに配置(mkdir key)

3. ビルド

npm run build

4. 起動

npm run start

使用方法

Cursorでの使用

mcp.jsonを設定してCursorで使用できます:

{
  "mcp": {
    "servers": {
      "google-sheets": {
        "command": "node",
        "args": ["プロジェクトまでの絶対パス/dist/index.js"],
        "env": {
          "GOOGLE_APPLICATION_CREDENTIALS": "プロジェクトまでの絶対パス/key/your-service-account-key.json"
        }
      }
    }
  }
}

重要: GOOGLE_APPLICATION_CREDENTIALSのパスは、ダウンロードしたサービスアカウントキーファイルの実際のパスに変更してください。 重要: スプレットシートの右上にある「共有」からサービスアカウントのメールアドレスを追加

利用可能なツール

  • read_sheet: スプレッドシートの指定された範囲のデータを読み取る

  • write_sheet: スプレッドシートの指定された範囲にデータを書き込む

  • append_row: スプレッドシートの最後に新しい行を追加する

  • get_sheet_info: スプレッドシートの基本情報を取得する

  • create_sheet: 新しいシートを作成する

注意事項

  • サービスアカウントのキーファイルは機密情報です。.gitignoreに追加して、リポジトリにコミットしないでください

  • スプレッドシートにアクセスするには、サービスアカウントのメールアドレスをスプレッドシートの共有設定に追加する必要があります

  • 各利用者は自分のGoogle Cloudプロジェクトでサービスアカウントを作成し、キーファイルをダウンロードする必要があります

Available Tools

5 tools
append_rowC

スプレッドシートの最後に新しい行を追加します

Inputs: spreadsheetId (required), sheetName (required), values (required).

create_sheetC

新しいシートを作成します

Inputs: spreadsheetId (required), sheetName (required).

get_sheet_infoC

スプレッドシートの基本情報を取得します

Inputs: spreadsheetId (required).

read_sheetC

スプレッドシートの指定された範囲のデータを読み取ります

Inputs: spreadsheetId (required), range (required).

write_sheetC

スプレッドシートの指定された範囲にデータを書き込みます

Inputs: spreadsheetId (required), range (required), values (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

    TDQS

    B3.4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: append_row adds rows, create_sheet creates sheets, get_sheet_info retrieves metadata, read_sheet reads data, and write_sheet writes data. The descriptions clearly differentiate between operations on data versus structure.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with snake_case naming (e.g., append_row, create_sheet, read_sheet). The verbs are action-oriented and predictable, making the set easy to navigate.

    Tool Count4/5

    Five tools is reasonable for a Google Sheets server, covering core operations like reading, writing, appending, creating sheets, and getting info. It's slightly lean but functional; minor additions like update or delete operations could enhance it without being necessary.

    Completeness4/5

    The tools cover essential CRUD-like operations for Google Sheets: create (create_sheet), read (read_sheet, get_sheet_info), and write/append (write_sheet, append_row). A minor gap is the lack of explicit update or delete tools, but agents can work around this using write_sheet for updates.

    Related MCP Connectors

    Related MCP Servers