drive-file-browser-mcp
Drive File Browser MCP
AIアシスタント(Claude Desktop、Claude Code、Cursor、opencode、または任意のMCPクライアント)がGoogle Driveフォルダ内のファイルを閲覧、検索、読み取りできるようにするModel Context Protocol(MCP)サーバーです。
2つのモードで実行できます:
ローカル(stdio) — デスクトップMCPクライアント向け
リモート(HTTP、Streamable) — Vercelにデプロイ:https://drive-file-browser-mcp.vercel.app/api/mcp
提供ツール
ツール | 説明 |
| Driveフォルダ内のファイルとサブフォルダを一覧表示 |
| ファイル名で検索(大文字小文字を区別しない部分一致) |
| 特定のファイルのメタデータを取得(名前、種類、タイムスタンプなど) |
| ファイルの内容を読み取り — 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 Code(claude_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/json、Accept: application/json, text/event-stream、Authorization: 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
独自インスタンスのデプロイ
このリポジトリをフォーク/クローンし、以下の手順を実行:
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 --yesGoogleサービスアカウントのJSONを取得し(下記参照)、その
client_emailでDriveフォルダを共有します。
環境変数(Vercel)
変数 | 説明 |
| サービスアカウントのJSONキー全体(インライン文字列) — Driveアクセスに必須 |
| サーバーが閲覧するデフォルトのフォルダID |
|
|
これらはVercelダッシュボードの「Project → Settings → Environment Variables」で管理します。
ローカルセットアップ(stdioモード)
1. Googleサービスアカウントの作成
Google Cloud Consoleにアクセスし、プロジェクトを作成(または選択)します。
Google Drive APIを有効にします(APIs & Services → Library → 「Google Drive API」を検索 → Enable)。
APIs & Services → Credentials → Create Credentials → Service accountの順に進みます。
サービスアカウントを開き、Keysタブ → Add key → Create new key → JSONを選択します。
.jsonキーファイルがダウンロードされます。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 build3. 設定
環境変数を設定します(.env.exampleを.envにコピー — 注:.envファイルは自動読み込まれません。MCPクライアント設定で実際の環境変数を設定するか、GOOGLE_SERVICE_ACCOUNT_JSONをファイルパスに指定してください):
変数 | 説明 |
| インラインのサービスアカウントJSON または JSONキーファイルへのパス |
| サーバーが閲覧するデフォルトのフォルダID(または完全なURL) |
MCPクライアントでの使用方法
MCPクライアントの設定に追加します:
Claude Desktop(claude_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
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.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA server that provides a Machine Control Protocol (MCP) interface to search, access, and interact with Google Drive files and folders, enabling AI assistants to work with Google Drive content.8MIT
- AlicenseNot gradedqualityDmaintenanceAn 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.35MIT
- FlicenseNot gradedqualityBmaintenanceMCP server for semantic search over Google Drive documents, enabling AI tools to search, list, and retrieve document content.
- AlicenseAqualityBmaintenanceA 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.4MIT
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/ashrafur02-sys/drive-file-browser-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server