Skip to main content
Glama
JovemDaniel
by JovemDaniel

Google Drive MCP Server

Claude Code 세션에서 Google Sheets, Slides 및 Drive를 읽고/쓰기 위한 로컬 Python MCP 서버입니다.


작동 방식

서버는 GCP의 OAuth 2.0 Desktop App을 사용합니다. 첫 사용 시 동의 절차를 위해 브라우저가 열립니다. 승인하면 로컬에 token.json이 저장됩니다. 이후 실행에서는 토큰을 재사용하며, 만료되면 브라우저를 다시 열지 않고 자동으로 갱신합니다.

인증 파일:

파일

설명

credentials.json

GCP Console에서 다운로드한 OAuth 앱 자격 증명

token.json

첫 로그인 후 생성된 액세스 토큰 (자동으로 갱신됨)


Related MCP server: google-workspace-mcp-with-script

초기 설정 (첫 번째)

1. GCP 자격 증명

  1. GCP Console → APIs & Services → Credentials에 접속합니다.

  2. OAuth 2.0 Client ID를 생성합니다 (유형: Desktop App).

  3. JSON을 다운로드하여 이 폴더에 credentials.json으로 저장합니다.

  4. GCP 프로젝트에서 API를 활성화합니다:

    • Google Sheets API

    • Google Slides API

    • Google Drive API

2. 의존성 설치

Windows (PowerShell):

cd "C:\Users\<usuario>\Documents\MCP_Servers\googleDrive"
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt

macOS / Linux:

cd ~/Documents/MCP_Servers/googleDrive
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

3. 첫 번째 로그인 (OAuth)

브라우저를 열고 승인하려면 수동으로 실행하세요:

Windows:

.venv\Scripts\activate
python main.py

macOS / Linux:

source .venv/bin/activate
python main.py

브라우저에서 승인하면 token.json이 생성되고 서버가 시작됩니다. Ctrl+C로 종료할 수 있습니다 — 토큰은 다음 사용을 위해 저장됩니다.


Claude Code에 등록

MCP 서버를 등록하는 방법은 두 가지입니다:

옵션 A — 프로젝트별 (.mcp.json)

프로젝트 루트에 .mcp.json 파일을 생성합니다. MCP는 해당 프로젝트에서만 활성화됩니다.

Windows:

{
  "mcpServers": {
    "google-drive": {
      "type": "stdio",
      "command": "C:\\Users\\<usuario>\\Documents\\MCP_Servers\\googleDrive\\.venv\\Scripts\\python.exe",
      "args": [
        "C:\\Users\\<usuario>\\Documents\\MCP_Servers\\googleDrive\\main.py"
      ]
    }
  }
}

macOS / Linux:

{
  "mcpServers": {
    "google-drive": {
      "type": "stdio",
      "command": "/Users/<usuario>/Documents/MCP_Servers/googleDrive/.venv/bin/python",
      "args": [
        "/Users/<usuario>/Documents/MCP_Servers/googleDrive/main.py"
      ]
    }
  }
}

옵션 B — 사용자 전역 (~/.claude/settings.json)

MCP를 Claude Code 전역 설정에 추가합니다 — 모든 프로젝트에서 사용할 수 있습니다.

~/.claude/settings.json을 편집하고 (Windows: C:\Users\<usuario>\.claude\settings.json) mcpServers 키를 추가하세요:

Windows:

{
  "mcpServers": {
    "google-drive": {
      "type": "stdio",
      "command": "C:\\Users\\<usuario>\\Documents\\MCP_Servers\\googleDrive\\.venv\\Scripts\\python.exe",
      "args": [
        "C:\\Users\\<usuario>\\Documents\\MCP_Servers\\googleDrive\\main.py"
      ]
    }
  }
}

macOS / Linux:

{
  "mcpServers": {
    "google-drive": {
      "type": "stdio",
      "command": "/Users/<usuario>/Documents/MCP_Servers/googleDrive/.venv/bin/python",
      "args": [
        "/Users/<usuario>/Documents/MCP_Servers/googleDrive/main.py"
      ]
    }
  }
}

MCP가 특정 프로젝트 전용일 때는 옵션 A를 사용하세요. 어떤 프로젝트에서든 접근하려면 옵션 B를 사용하세요.


환경 변수 (선택 사항)

기본적으로 서버는 자신의 폴더에서 credentials.jsontoken.json을 찾습니다. 경로를 변경하려면 .env.example을 기반으로 .env를 생성하세요:

GOOGLE_CREDENTIALS_PATH=credentials.json
GOOGLE_TOKEN_PATH=token.json

사용 가능한 도구 (17개 도구)

Google Sheets (7)

도구

설명

sheets_read_range

셀 범위의 값을 읽습니다

sheets_write_range

범위에 값을 씁니다

sheets_append_rows

데이터 끝에 행을 추가합니다

sheets_batch_update_values

여러 범위에 한 번에 값을 씁니다

sheets_get_spreadsheet

메타데이터(제목, 시트)를 반환합니다

sheets_create_spreadsheet

새 스프레드시트를 생성합니다

sheets_add_sheet

스프레드시트에 시트를 추가합니다

Google Slides (7)

도구

설명

slides_get_presentation

슬라이드의 구조와 제목을 반환합니다

slides_get_slide_content

슬라이드의 텍스트와 도형을 반환합니다

slides_create_slide

새 슬라이드를 추가합니다

slides_insert_text

도형에 텍스트를 삽입합니다

slides_replace_text

텍스트를 찾아 바꿉니다

slides_delete_slide

슬라이드를 삭제합니다

slides_batch_update

API의 raw batch를 실행합니다

Google Drive (3)

도구

설명

drive_list_files

파일 목록을 표시/필터링합니다 (유형, query)

drive_search_files

파일 이름으로 검색합니다

drive_get_file_metadata

파일의 상세 메타데이터를 반환합니다

모든 도구는 직접 ID 또는 전체 Google URL을 허용합니다:

  • 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms

  • https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms/edit


문제 해결

invalid_grant / 자동으로 갱신되지 않고 만료된 토큰

token.json을 삭제하고 python main.py를 다시 실행하여 OAuth 흐름을 다시 수행하세요.

Windows:

Remove-Item ".\token.json"
python main.py

macOS / Linux:

rm token.json
python main.py

API가 활성화되지 않음

GCP Console에서 세 가지 API가 활성화되어 있는지 확인하세요: Google Sheets API, Google Slides API, Google Drive API.

Claude Code에 MCP가 표시되지 않음

Python 실행 파일 경로가 올바른지 확인하세요:

  • Windows: .venv\Scripts\python.exe

  • macOS/Linux: .venv/bin/python

.mcp.json 또는 settings.json에는 절대 경로를 사용하세요 — 상대 경로는 작동하지 않습니다.

F
license - not found
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

View all related MCP servers

Related MCP Connectors

  • Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.

  • Augments MCP Server - A comprehensive framework documentation provider for Claude Code

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

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/JovemDaniel/google-drive-mcp'

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