gdrive-mcp
gdrive-mcp
이 MCP(Model Context Protocol) 서버는 Google Drive 폴더를 Streamable HTTP로 노출하며, Vercel에서 실행되고 GitHub에 호스팅되도록 구축되었습니다.
두 가지 도구를 제공합니다:
도구 | 설명 |
| 구성된 Drive 폴더 내의 파일/폴더를 나열합니다(선택적 검색 가능) |
| 텍스트 콘텐츠를 읽고 Google Docs/Sheets/Slides를 자동으로 내보냅니다 |
아키텍처
server.ts— Node.js HTTP 서버 진입점(Streamable HTTP MCP 엔드포인트).src/mcp.ts— MCP 서버 정의 및 도구.src/drive.ts— 서비스 계정을 사용하는 Google Drive 클라이언트.
인증은 Google 서비스 계정을 통해 읽기 전용(drive.readonly)으로 수행됩니다.
Related MCP server: gdrive-mcp-server
1. Google Cloud 설정(서비스 계정)
Google Cloud Console로 이동하여 프로젝트를 생성합니다.
Google Drive API 사용 설정:
APIs & Services→Library→ "Google Drive API" 검색 → Enable.서비스 계정 생성:
IAM & Admin→Service Accounts→Create Service Account.서비스 계정의 JSON 키 생성: 서비스 계정을 엽니다 →
Keys→Add Key→Create New Key→ JSON. 파일을 다운로드합니다.서비스 계정 이메일을 기록해 둡니다(
name@project.iam.gserviceaccount.com형식).해당 이메일로 Drive 폴더를 공유합니다:
Google Drive 폴더 열기 → 마우스 오른쪽 버튼 →
Share.서비스 계정 이메일을 붙여넣고 Viewer 액세스 권한을 부여합니다.
폴더 ID를 복사합니다(URL에서
/folders/뒤의 부분).
2. 로컬 설정
git clone <your-repo-url>
cd gdrive-mcp
npm install.env 파일을 생성합니다(.env.example 복사):
DRIVE_FOLDER_ID=1XM-0CtgvW3PGDekC8qLa2ghxRyvTfjwD
GOOGLE_SERVICE_ACCOUNT_KEY=<base64 of service-account.json>서비스 계정 키를 base64로 인코딩합니다:
Linux/macOS:
base64 -w0 service-account.jsonPowerShell:
[Convert]::ToBase64String([IO.File]::ReadAllBytes("service-account.json"))
3. Vercel 배포
옵션 A — Vercel + GitHub (권장)
이 저장소를 GitHub에 푸시합니다.
Vercel → **Add New ** → Project에서 GitHub 저장소 가져옵니다.
환경 변수(
DRIVE_FOLDER_ID,GOOGLE_SERVICE_ACCOUNT_KEY)를 추가합니다.배포합니다. MCP 엔드포인트는 다음과 같습니다:
https://<your-project>.vercel.app
옵션 B — Vercel CLI
npm i -g vercel
vercel login
vercel env add DRIVE_FOLDER_ID
vercel env add GOOGLE_SERVICE_ACCOUNT_KEY
vercel --prod4. GitHub에 푸시(첫 번째)
git init
git add .
git commit -m "Add gdrive-mcp server"
git branch -M main
git remote add origin https://github.com/<you>/gdrive-mcp.git
git push -u origin main5. MCP 클라이언트 연결
클라이언트를 Streamable HTTP transport로 배포된 URL에 연결하세요.
예제 claude_desktop_config.json:
{
"mcpServers": {
"gdrive": {
"type": "http",
"url": "https://<your-project>.vercel.app"
}
}
}일반 MCP 구성 형식을 사용하는 클라이언트의 경우:
{
"mcpServers": {
"gdrive": {
"url": "https://<your-project>.vercel.app"
}
}
}이 엔드포인트는 **stateless(상태 비저장)**이므로 각 요청이 새 transport를 생성합니다. 서버리스 환경에 적합합니다. 액세스는 서비스 계정에 대한 Google Drive 공유 설정을 통해 제어됩니다.
환경 변수
변수 | 필수 | 설명 |
| 예 | Google Drive 폴더 ID |
| 예 | Base64로 인코딩된 서비스 계정 JSON 키 |
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
- FlicenseNot gradedqualityCmaintenanceA read-only Google Drive MCP server that allows searching files, reading file content (with auto-export for Google Docs, Sheets, Slides), and retrieving file metadata via OAuth authentication.262
- FlicenseNot gradedqualityCmaintenanceEnables MCP-compatible AI assistants to interact with a user's Google Drive, including listing, searching, reading, creating, updating, and deleting files, with authentication via Google OAuth.
- FlicenseNot gradedqualityCmaintenanceEnables Google Drive file operations (list, search, read, create) via MCP using OAuth2 authentication with token persistence.
- FlicenseNot gradedqualityBmaintenanceA read-only MCP server that exposes a configured Google Drive folder to MCP clients, enabling them to list, search, and extract content from various file formats like Excel, CSV, PDF, DOCX, and images.
Related MCP Connectors
Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.
Google Docs MCP Pack — read, create, and edit Google Docs via OAuth.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
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/shafinaz-ops/gdrive-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server