Skip to main content
Glama
ashrafur02-sys

drive-file-browser-mcp

Drive File Browser MCP

AIアシスタント(Claude Desktop、Claude Code、Cursor、opencode、または任意のMCPクライアント)がGoogle Driveフォルダ内のファイルを閲覧、検索、読み取りできるようにするModel Context Protocol(MCP)サーバーです。

2つのモードで実行できます:

提供ツール

ツール

説明

list_files

Driveフォルダ内のファイルとサブフォルダを一覧表示

search_files

ファイル名で検索(大文字小文字を区別しない部分一致)

get_file_info

特定のファイルのメタデータを取得(名前、種類、タイムスタンプなど)

read_file

ファイルの内容を読み取り — Google DocsはMarkdown、SheetsはCSV、Slidesはプレーンテキストとしてエクスポート。プレーンテキストファイルはそのまま返し、バイナリファイルはリンクを返します

Related MCP server: mcp-google-gdrive

リモートデプロイ(Vercel)

サーバーは以下で稼働中です:

https://drive-file-browser-mcp.vercel.app/api/mcp

ステートレスなStreamable HTTPトランスポートを使用するため、リモートHTTP MCPサーバーをサポートする任意のMCPクライアントで動作します。エンドポイントはBearer APIキーで保護されています。

クライアントの接続

Claude Desktop / Claude Codeclaude_desktop_config.json または .mcp.json):

{
  "mcpServers": {
    "drive-browser": {
      "type": "http",
      "url": "https://drive-file-browser-mcp.vercel.app/api/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_API_KEY>"
      }
    }
  }
}

任意のHTTPクライアント — ヘッダー Content-Type: application/jsonAccept: application/json, text/event-streamAuthorization: Bearer <YOUR_API_KEY> を使用してJSON-RPCをPOST送信:

curl -X POST https://drive-file-browser-mcp.vercel.app/api/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}'

ヘルスチェック(認証不要):GET https://drive-file-browser-mcp.vercel.app/api/health

独自インスタンスのデプロイ

  1. このリポジトリをフォーク/クローンし、以下の手順を実行:

npm install
npm i -g vercel
vercel login
vercel link --yes
# env vars:
echo "<your-api-key>" | vercel env add MCP_API_KEY production
echo "<your-drive-folder-id>" | vercel env add DRIVE_ROOT_FOLDER_ID production
echo "<service-account-json-contents>" | vercel env add GOOGLE_SERVICE_ACCOUNT_JSON production
vercel deploy --prod --yes
  1. GoogleサービスアカウントのJSONを取得し(下記参照)、そのclient_emailでDriveフォルダを共有します。

環境変数(Vercel)

変数

説明

GOOGLE_SERVICE_ACCOUNT_JSON

サービスアカウントのJSONキー全体(インライン文字列) — Driveアクセスに必須

DRIVE_ROOT_FOLDER_ID

サーバーが閲覧するデフォルトのフォルダID

MCP_API_KEY

/api/mcpで必要なBearerトークン — 未設定の場合は認証無効(非推奨)

これらはVercelダッシュボードの「Project → Settings → Environment Variables」で管理します。

ローカルセットアップ(stdioモード)

1. Googleサービスアカウントの作成

  1. Google Cloud Consoleにアクセスし、プロジェクトを作成(または選択)します。

  2. Google Drive APIを有効にします(APIs & Services → Library → 「Google Drive API」を検索 → Enable)。

  3. APIs & Services → Credentials → Create Credentials → Service accountの順に進みます。

  4. サービスアカウントを開き、Keysタブ → Add key → Create new key → JSONを選択します。.jsonキーファイルがダウンロードされます。

  5. Driveフォルダをサービスアカウントのメールアドレスと共有します(メールアドレスはJSONファイル内のclient_emailフィールドに記載。例:xxx@xxx.iam.gserviceaccount.com)— Driveでフォルダを右クリック → Share → そのメールアドレスを入力 → Viewer権限を付与。

2. インストールとビルド

git clone https://github.com/ashrafur02-sys/drive-file-browser-mcp.git
cd drive-file-browser-mcp
npm install
npm run build

3. 設定

環境変数を設定します(.env.example.envにコピー — 注:.envファイルは自動読み込まれません。MCPクライアント設定で実際の環境変数を設定するか、GOOGLE_SERVICE_ACCOUNT_JSONをファイルパスに指定してください):

変数

説明

GOOGLE_SERVICE_ACCOUNT_JSON

インラインのサービスアカウントJSON または JSONキーファイルへのパス

DRIVE_ROOT_FOLDER_ID

サーバーが閲覧するデフォルトのフォルダID(または完全なURL)

MCPクライアントでの使用方法

MCPクライアントの設定に追加します:

Claude Desktopclaude_desktop_config.json):

{
  "mcpServers": {
    "drive-browser": {
      "command": "node",
      "args": ["/absolute/path/to/drive-file-browser-mcp/dist/src/index.js"],
      "env": {
        "GOOGLE_SERVICE_ACCOUNT_JSON": "/absolute/path/to/service-account.json",
        "DRIVE_ROOT_FOLDER_ID": "1TG4ssc_z0FgG2snDapoR_SRu3y16Wxm5"
      }
    }
  }
}

Claude Code / opencode

{
  "mcpServers": {
    "drive-browser": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/drive-file-browser-mcp/dist/src/index.js"],
      "env": {
        "GOOGLE_SERVICE_ACCOUNT_JSON": "/absolute/path/to/service-account.json",
        "DRIVE_ROOT_FOLDER_ID": "1TG4ssc_z0FgG2snDapoR_SRu3y16Wxm5"
      }
    }
  }
}

接続後、アシスタントに次のようなリクエストができます:

  • 「Driveフォルダ内のファイルを一覧表示して」

  • 「記者会見のプレゼンテーションを検索して」

  • 「社内コミュニケーションファイルを読んで」

  • 「IDが...のファイルの情報を取得して」

セキュリティに関する注意事項

  • サーバーは読み取り専用のDriveスコープ(drive.readonly)を使用します。

  • サービスアカウントキーをリポジトリにコミットしないでください(.gitignoreで除外済み)。

  • キーファイルを共有した相手は、サービスアカウントがアクセスできるすべての情報を読み取れることに注意してください。リポジトリではなく、キーを共有しましょう。

ライセンス

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables AI assistants to list, read, create, and manage files in Google Drive. It features automatic conversion of Google Workspace formats into Markdown, CSV, and plain text for seamless integration with AI workflows.
    35
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    A local MCP server that enables LLMs to securely search and read files within designated Google Drive folders. Supports Google Docs, Google Sheets, PDFs, and plain text with strict folder-scoping via service account authentication.
    4
    MIT

View all related MCP servers

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.

  • Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.

View all MCP Connectors

Latest Blog Posts

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/ashrafur02-sys/drive-file-browser-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server