Google Drive server
Googleドライブサーバー
この MCP サーバーは Google ドライブと統合されており、ファイルの一覧表示、読み取り、検索が可能になります。
コンポーネント
ツール
検索
Googleドライブ内のファイルを検索する
入力:
query(文字列): 検索クエリ一致するファイルのファイル名とMIMEタイプを返します
リソース
サーバーは Google ドライブ ファイルへのアクセスを提供します。
ファイル(
gdrive:///<file_id>)すべてのファイルタイプをサポート
Google Workspace ファイルは自動的にエクスポートされます。
ドキュメント → Markdown
スプレッドシート → CSV
プレゼンテーション → プレーンテキスト
図面 → PNG
その他のファイルはネイティブ形式で提供されます
Related MCP server: Google Drive MCP Server
はじめる
OAuth 同意画面を構成する(テストの場合は「内部」で問題ありません)
OAuth スコープを追加します
https://www.googleapis.com/auth/drive.readonlyアプリケーションタイプ「デスクトップアプリ」のOAuth クライアント ID を作成します
クライアントのOAuthキーのJSONファイルをダウンロードします
キーファイルの名前を
gcp-oauth.keys.jsonに変更し、このリポジトリのルート(例:servers/gcp-oauth.keys.json)に配置します。
必ずnpm run buildまたはnpm run watchのいずれかを使用してサーバーをビルドしてください。
認証
認証して資格情報を保存するには:
auth引数を付けてサーバーを実行します:node ./dist authこれにより、システムブラウザで認証フローが開きます。
認証プロセスを完了する
資格情報は、このリポジトリのルートに保存されます (つまり、
servers/.gdrive-server-credentials.json)
デスクトップアプリでの使用
このサーバーをデスクトップ アプリと統合するには、アプリのサーバー構成に以下を追加します。
ドッカー
認証:
Google Cloud で OAuth アプリケーションの設定が完了している場合は、次のコマンドでサーバーを認証できます/path/to/gcp-oauth.keys.json OAuth キー ファイルへのパスに置き換えます。
docker run -i --rm --mount type=bind,source=/path/to/gcp-oauth.keys.json,target=/gcp-oauth.keys.json -v mcp-gdrive:/gdrive-server -e GDRIVE_OAUTH_PATH=/gcp-oauth.keys.json -e "GDRIVE_CREDENTIALS_PATH=/gdrive-server/credentials.json" -p 3000:3000 mcp/gdrive authこのコマンドはブラウザで開くURLを出力します。ブラウザでこのURLを開き、認証プロセスを完了してください。認証情報はmcp-gdriveボリュームに保存されます。
認証されると、アプリのサーバー構成でサーバーを使用できるようになります。
{
"mcpServers": {
"gdrive": {
"command": "docker",
"args": ["run", "-i", "--rm", "-v", "mcp-gdrive:/gdrive-server", "-e", "GDRIVE_CREDENTIALS_PATH=/gdrive-server/credentials.json", "mcp/gdrive"]
}
}
}NPX
{
"mcpServers": {
"gdrive": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gdrive"
]
}
}
}VS Codeでの使用
素早くインストールするには、以下のワンクリック インストール ボタンのいずれかを使用します。
手動でインストールする場合は、VS Code のユーザー設定 (JSON) ファイルに次の JSON ブロックを追加します。Ctrl Ctrl + Shift + Pを押してPreferences: Open User Settings (JSON)と入力すると、このブロックを追加できます。
オプションとして、ワークスペース内の.vscode/mcp.jsonというファイルに追加することもできます。これにより、他のユーザーと設定を共有できるようになります。
.vscode/mcp.jsonファイルではmcpキーは必要ないことに注意してください。
NPX
{
"mcp": {
"servers": {
"gdrive": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gdrive"
],
"env": {
"GDRIVE_CREDENTIALS_PATH": "/path/to/.gdrive-server-credentials.json"
}
}
}
}
}ドッカー
{
"mcp": {
"servers": {
"gdrive": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"mcp-gdrive:/gdrive-server",
"-e",
"GDRIVE_CREDENTIALS_PATH=/gdrive-server/credentials.json",
"mcp/gdrive"
]
}
}
}
}ライセンス
このMCPサーバーはMITライセンスに基づいてライセンスされています。つまり、MITライセンスの条件に従って、ソフトウェアを自由に使用、改変、配布することができます。詳細については、プロジェクトリポジトリのLICENSEファイルをご覧ください。
This server cannot be deployed
Maintenance
Related MCP Connectors
A MCP server that works with Google Calendar to manage event listing, reading, and updates.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Notes, files, GitHub, and Drive through one MCP connection.
Notes, files, GitHub, and Drive through one MCP connection.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceThis MCP server integrates with Google Drive to allow listing, reading, and searching files, as well as the ability to read and write to Google Sheets.564 npm2MIT
- 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
- FlicenseBqualityDmaintenanceAn MCP server that provides simple query capabilities for Google Cloud Datastore, allowing users to list kinds, retrieve entities, run basic queries with pagination, filter entities by equality, and count entities.51-
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with Google Cloud Filestore API, allowing management of Filestore instances, backups, and shares through natural language commands.-