Skip to main content
Glama
Google Tasks MCP Server

Google Tasks MCP Server

Google Tasks MCP サーバー

この Model Context Protocol (MCP) サーバーは、MCP クライアントと Google Tasks の間のブリッジを提供し、Claude Desktop、Cursor、Codex などのクライアントから直接タスクリストやタスクを管理できるようにします。

[!NOTE] このプロジェクトのコードは(一部の修正を除き)すべて "vibe coded" されています。つまり、私からの指示に基づき Claude/Copilot によって生成されました。

機能

この MCP サーバーは以下の機能を提供します:

タスクリスト管理

  • list-tasklists - すべてのタスクリストを一覧表示

  • get-tasklist - 特定のタスクリストの詳細を取得

  • create-tasklist - 新しいタスクリストを作成

  • update-tasklist - 既存のタスクリストを更新

  • delete-tasklist - タスクリストを削除

タスク管理

  • list-tasks - タスクリスト内のすべてのタスクを一覧表示(ページネーション対応)

  • get-task - 特定のタスクの詳細を取得

  • create-task - 新しいタスクを作成

  • update-task - 既存のタスクを更新

  • delete-task - タスクを削除

  • complete-task - タスクを完了としてマーク

  • move-task - タスクを移動(並べ替え、親の変更、またはタスクリスト間での移動)

  • clear-completed-tasks - リストから完了したタスクをすべて削除

Related MCP server: Google Tasks MCP Server

セットアップ手順

1. Google Cloud プロジェクトの作成と API の有効化

  1. Google Cloud Console にアクセスします

  2. 新しいプロジェクトを作成します

  3. 「API とサービス」>「ライブラリ」に移動します

  4. 「Google Tasks API」を検索して有効にします

  5. 「API とサービス」>「認証情報」に移動します

  6. 「認証情報を作成」>「OAuth クライアント ID」をクリックします

  7. OAuth 同意画面を設定します(個人利用であれば「外部」で問題ありません)

  8. アプリケーションの種類として「ウェブアプリケーション」を選択します

  9. 承認済みのリダイレクト URI として http://localhost:3000/oauth2callback を追加します

  10. クライアント ID とシークレットを作成します

2. 環境変数の設定

プロジェクトディレクトリに .env ファイルを作成します:

GOOGLE_CLIENT_ID=your_client_id_here
GOOGLE_CLIENT_SECRET=your_client_secret_here
GOOGLE_REDIRECT_URI=http://localhost:3000/oauth2callback

環境変数:

  • GOOGLE_CLIENT_ID (必須) - Google OAuth クライアント ID

  • GOOGLE_CLIENT_SECRET (必須) - Google OAuth クライアントシークレット

  • GOOGLE_REDIRECT_URI (任意) - OAuth リダイレクト URI(デフォルトは http://localhost:3000/oauth2callback)

注意: サーバーは起動時に GOOGLE_CLIENT_ID と GOOGLE_CLIENT_SECRET が設定されているかを確認し、欠落しているか無効な場合は明確なエラーメッセージを表示して停止します。

3. サーバーのビルド

  1. 依存関係をインストールします:

npm install
  1. サーバーをビルドします:

npm run build

4. MCP クライアントの設定

Codex

~/.codex/config.toml にサーバーを追加します:

[mcp_servers.google-tasks]
command = "zsh"
args = ["-lc", "cd /path/to/google-tasks-mcp && exec node build/index.js"]

/path/to/google-tasks-mcp をこのプロジェクトへのパスに置き換え、Codex を再起動してください。

サーバーが登録されているか確認するには:

codex mcp list
codex mcp get google-tasks

Claude for Desktop

  1. Claude for Desktop をインストールします

  2. Claude の設定ファイルを開きます:

    • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

  3. Google Tasks MCP サーバーの設定を追加します:

{
  "mcpServers": {
    "google-tasks": {
      "command": "node",
      "args": ["/path/to/google-tasks-mcp/build/index.js"]
    }
  }
}

パスを自身の環境に合わせて置き換え、Claude for Desktop を再起動してください。

認証フロー

Google Tasks MCP サーバーを初めて使用する場合:

  1. authenticate ツールを使用して認証 URL を取得します

  2. ブラウザでその URL にアクセスし、Google アカウントでサインインします

  3. 承認後、ブラウザページにコードが表示されます

  4. set-auth-code ツールにそのコードを入力して認証を完了します

  5. これで、他のすべてのツールを使用して Google Tasks を操作できるようになります

注意: 認証トークン(リフレッシュトークンを含む)は、制限された権限(600)で ~/.config/google-tasks-mcp/credentials.json に自動的に保存されます。つまり:

  • 認証は一度だけ - サーバーを再起動しても認証情報は保持されます

  • 自動トークン更新 - アクセストークンは期限切れ(通常1時間後)になると、保存されたリフレッシュトークンを使用して自動的に更新されます

  • 再認証不要 - 初回セットアップ後は、アクセスを取り消したり認証ファイルを削除したりしない限り、再認証は不要です

要件

  • Node.js 20+ (package.json の engines を参照)

  • MCP 対応クライアント

  • Tasks API が有効な Google Cloud プロジェクト

実装の特徴

この MCP サーバーには以下の改善が含まれています:

  • 永続的なトークンストレージ - 認証情報は制限された権限でディスク(~/.config/google-tasks-mcp/credentials.json)に保存されるため、認証は一度だけで済みます

  • 環境変数の検証 - 起動時に必要な認証情報が設定されているかを確認し、明確なエラーメッセージを表示します

  • 自動トークン更新 - OAuth トークンは期限切れ時に自動的に更新されるため、セッション中や再起動後に再認証する必要はありません

  • 強化された入力検証 - ID 形式、文字列長、RFC 3339 日付形式など、すべての入力に対する包括的な検証

  • HTML サニタイズ - OAuth コールバックのレスポンスは XSS 脆弱性を防ぐためにサニタイズされます

  • 正常なシャットダウン - SIGINT/SIGTERM シグナル受信時の適切なリソースクリーンアップ

  • 型安全性 - 適切なインターフェースを備えたコードベース全体での完全な TypeScript 型安全性

  • 設定可能なリダイレクト URI - OAuth リダイレクト URI は GOOGLE_REDIRECT_URI 環境変数でカスタマイズ可能

スクリーンショット

Claude Desktop

Claude Desktop スクリーンショット

Cursor

Cursor スクリーンショット

ライセンス

このプロジェクトはデモンストレーション目的のみのものです。自己責任で使用してください。

Available Tools

15 tools
authenticateB

Get URL to authenticate with Google Tasks

Inputs: no named parameters.

clear-completed-tasksC

Clear all completed tasks from a task list

Inputs: tasklist (required).

complete-taskC

Mark a task as completed

Inputs: tasklist (required), task (required).

create-taskC

Create a new task in a task list

Inputs: tasklist (required), title (required), notes, due.

create-tasklistC

Create a new task list

Inputs: title (required).

delete-taskC

Delete a task

Inputs: tasklist (required), task (required).

delete-tasklistC

Delete a task list

Inputs: tasklist (required).

get-taskC

Get a specific task by ID

Inputs: tasklist (required), task (required).

get-tasklistC

Get a task list by ID

Inputs: tasklist (required).

list-tasklistsB

List all task lists

Inputs: no named parameters.

list-tasksC

List all tasks in a task list

Inputs: tasklist (required), showCompleted, showHidden, showDeleted.

move-taskC

Move a task to another position

Inputs: tasklist (required), task (required), parent, previous.

set-auth-codeC

Set the authentication code received from Google OAuth flow

Inputs: code (required).

update-taskC

Update an existing task

Inputs: tasklist (required), task (required), title, notes, +2 more.

update-tasklistC

Update an existing task list

Inputs: tasklist (required), title (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 15 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose with no ambiguity. Each tool targets specific resources (tasks or tasklists) and actions (create, get, list, update, delete, complete, clear, move), making it easy for an agent to select the right tool. The separation between task operations and tasklist operations is particularly clear.

    Naming Consistency5/5

    The naming follows a perfectly consistent verb-noun pattern throughout all 15 tools. Every tool uses snake_case with clear action verbs (create, get, list, update, delete, etc.) followed by the resource name (task, tasklist), and multi-word resources use hyphens consistently (e.g., clear-completed-tasks).

    Tool Count5/5

    With 15 tools, this server is well-scoped for managing Google Tasks. Each tool earns its place by covering essential CRUD operations for both tasks and tasklists, plus additional workflow actions like moving tasks and clearing completed ones. The count is appropriate for the domain without being overwhelming.

    Completeness5/5

    The tool surface provides complete coverage for the Google Tasks domain. It includes full CRUD operations for both tasks and tasklists, plus lifecycle actions like completing tasks, moving tasks, and clearing completed tasks. Authentication tools are also included, ensuring no dead ends for agents.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    Appeared in Searches