Google-Drive-MCP-Server: Instructions file for Claude Code

CLAUDE.md

Google-Drive-MCP-Server CLAUDE.md is an instructions file for Claude Code from pghoya2956/Google-Drive-MCP-Server. It costs 2,247 tokens per session, scanned A, original, MIT.

Project instructions for a Google Drive MCP server that also accesses Google Sheets. They describe its architecture, OAuth sign-in, token renewal, and restricting access to a chosen folder and its subfolders.

In plain words
What is it for?
Use them when installing, configuring, authenticating, renewing access tokens, or controlling the Drive and Sheets access scope of this MCP server.
Why use it?
They give developers the project-specific rules needed to configure authentication and limit which Drive files the server can reach.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is pghoya2956/Google-Drive-MCP-Server's own configuration. It tells Claude Code how to work on Google-Drive-MCP-Server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Google-Drive-MCP-Server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to pghoya2956/Google-Drive-MCP-Server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/pghoya2956/Google-Drive-MCP-Server/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/pghoya2956/Google-Drive-MCP-Server

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Google-Drive-MCP-Server CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/pghoya2956/google-drive-mcp-server/claude-md/github.svg)](https://agentmods.dev/instructions/pghoya2956/google-drive-mcp-server/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/pghoya2956/google-drive-mcp-server/claude-md"><img src="https://agentmods.dev/badge/instructions/pghoya2956/google-drive-mcp-server/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Google-Drive-MCP-Server CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/pghoya2956/google-drive-mcp-server/claude-md"><img src="https://agentmods.dev/badge/instructions/pghoya2956/google-drive-mcp-server/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,247 This file is loaded in full into every session.
When invoked 2,247 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02247 $0.02247
Opus 5 $0.01123 $0.01123
Sonnet 5 $0.00449 $0.00449
Haiku 4.5 $0.00225 $0.00225

Measured 9d ago against content hash c90ed83174e5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

Google-Drive-MCP-Server CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 217 lines

How it starts

The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Google Drive MCP Server 프로젝트 정보

프로젝트 개요

주요 아키텍처

graph TD
    A[MCP Client<br/>예: Claude Desktop] -->|MCP Protocol| B[gdrive-mcp-server]
    B -->|OAuth2| C[Google API]
    C --> D[Google Drive]
    C --> E[Google Sheets]
    
    F[환경변수] -->|설정| B
    G[인증 파일들] -->|토큰| B
    
    subgraph "인증 파일"
        G1[gcp-oauth.keys.json<br/>최초 인증용]
        G2[.gdrive-server-credentials.json<br/>토큰 저장]
    end
    
    G1 --> G
    G2 --> G

인증 메커니즘

  1. 최초 인증: gcp-oauth.keys.json 파일로 브라우저 인증 시작
  2. 토큰 저장: .gdrive-server-credentials.json에 access/refresh 토큰 저장
  3. 토큰 갱신: 환경변수 CLIENT_ID/CLIENT_SECRET으로 자동 갱신
  4. 백그라운드 갱신: 45분마다 토큰 유효성 확인 및 갱신

접근 범위 제어

  • GDRIVE_ROOT_FOLDER_ID로 지정된 폴더와 하위 폴더만 접근
  • 내 드라이브와 공유 드라이브 모두 지원
  • supportsAllDrives: true API 옵션으로 모든 드라이브 유형 지원

설치 방법

# npm으로 설치
npm install git+https://github.com/pghoya2956/Google-Drive-MCP-Server.git

# 또는 npm 레지스트리에서 (퍼블리싱 후)
npm install @pghoya2956/google-drive-mcp-server

주요 도구

  • gdrive_search: 파일 검색
  • gdrive_read_file: 파일 읽기 (PDF 메타데이터 추출 및 Excel 파일 지원)
  • gdrive_read_large_file: 대용량 파일 읽기
  • gdrive_folder_structure: 폴더 구조 탐색
  • gdrive_analyze_image: 이미지 분석
  • gsheets_read: Google Sheets 읽기 (Excel 파일은 미지원)
  • gsheets_update_cell: 셀 업데이트

PDF 파일 지원 (v0.3.0)

기능

  • 텍스트 추출: pdf-parse 라이브러리를 사용한 텍스트 추출
  • 메타데이터: 페이지 수, 파일 크기, 제목, 작성자, 생성일 등
  • 구조화된 응답: JSON 형식으로 텍스트와 메타데이터 분리 제공

제한사항

  • 파일 크기 제한: 기본 20MB (환경 변수 PDF_SIZE_LIMIT_MB로 최대 100MB까지 조정 가능)
  • 암호화된 PDF 미지원
  • 스캔된 이미지 PDF 텍스트 추출 불가
  • OCR 기능 없음

개선된 에러 처리

  • 파일 크기 초과 시 명확한 안내 메시지
  • 암호화/스캔 PDF에 대한 사용자 친화적 오류 메시지
  • 각 오류 유형에 대한 해결 방법 제안

PDF 캐싱 기능 (v0.3.0)

LRU 캐시 구현

  • 메모리 제한: 100MB 최대 크기
  • TTL: 30분 자동 만료
  • 캐시 키: fileId + modifiedTime 조합
  • 정리: 10분마다 만료된 항목 자동 제거

Read the full file on GitHub · 217 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 217 lines · 2,247 tokens per session scan A c90ed83174e5

Subscribe to this mod's changes

Google-Drive-MCP-Server CLAUDE.md is an instructions file published in the GitHub repository pghoya2956/Google-Drive-MCP-Server (1 stars, last pushed 1y ago), licensed MIT. It adds 2,247 tokens to every session, about $0.0112 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,735 tokens