
isaacphi/mcp-gdrive
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Google Drive에서 읽고 Google 시트를 편집하는 모델 컨텍스트 프로토콜(MCP) 서버
개요
이 MCP 서버는 Google Drive와 연동되어 파일 목록, 읽기, 검색뿐만 아니라 Google 시트에 대한 읽기와 쓰기 기능도 지원합니다. 이 프로젝트에는 원래 Anthropic, PBC에서 개발한 코드가 포함되어 있으며, 이 저장소의 MIT 라이선스 하에 라이선스를 받았습니다. - : 구글 드라이브에서 파일 검색. - : - 쿼리(문자열): 검색 쿼리. - pageToken (문자열, 선택 사항): 다음 페이지 결과용 토큰. - pageSize (숫자, 선택 사항): 페이지당 결과 수(최대 100개). - : 일치하는 파일 이름과 MIME 유형을 반환합니다. - : 구글 드라이브에서 파일의 내용을 읽습니다. - : - fileId(문자열): 읽을 파일의 ID. - : 지정된 파일의 내용을 반환합니다. - : 구글 스프레드시트에서 데이터를 읽을 수 있으며, 범위와 서식에 대한 유연한 옵션을 제공합니다. - : - 스프레드시트 ID (문자열): 읽을 스프레드시트의 ID. - ranges (문자열 배열, 선택 사항): A1 표기법 범위의 선택적 배열(예: ['Sheet1!] A1:B10']). 제공되지 않으면 전체 시트를 읽습니다.
개요(AI 번역)
이 MCP 서버는 Google Drive와 연동되어 파일 목록, 읽기, 검색뿐만 아니라 Google 시트에 대한 읽기와 쓰기 기능도 지원합니다.
이 프로젝트에는 원래 Anthropic, PBC에서 개발한 코드가 포함되어 있으며, 이 저장소의 MIT 라이선스 하에 라이선스를 받았습니다.
구성 요소
도구
-
gdrive_search
-
설명: 구글 드라이브에서 파일을 검색하세요.
-
입력:
-
query(문자열): 검색 쿼리. -
pageToken(문자열, 선택 사항): 다음 결과 페이지에 사용할 토큰. -
pageSize(번호, 선택 사항): 페이지당 결과 수 (최대 100개). -
출력: 일치하는 파일 이름과 MIME 유형을 반환합니다.
-
gdrive_read_file
-
설명: 구글 드라이브에서 파일 내용을 읽습니다.
-
입력:
-
fileId(문자열): 읽을 파일의 ID. -
Output: 지정된 파일의 내용을 반환합니다.
-
gsheets_read
-
설명: 구글 스프레드시트에서 데이터를 읽을 수 있으며, 범위와 서식에 대한 유연한 옵션을 제공합니다.
-
입력:
-
spreadsheetId(문자열): 읽을 스프레드시트의 ID. -
ranges(문자열 배열, 선택): A1 표기법 범위의 선택적 배열(예:['Sheet1!A1:B10']). 제공되지 않을 경우, 전체 시트를 읽습니다.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Google Drive server
This 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.
This project includes code originally developed by Anthropic, PBC, licensed under the MIT License from this repo.
Components
Tools
-
gdrive_search
- Description: Search for files in Google Drive.
- Input:
query(string): Search query.pageToken(string, optional): Token for the next page of results.pageSize(number, optional): Number of results per page (max 100).
- Output: Returns file names and MIME types of matching files.
-
gdrive_read_file
- Description: Read contents of a file from Google Drive.
- Input:
fileId(string): ID of the file to read.
- Output: Returns the contents of the specified file.
-
gsheets_read
- Description: Read data from a Google Spreadsheet with flexible options for ranges and formatting.
- Input:
spreadsheetId(string): The ID of the spreadsheet to read.ranges(array of strings, optional): Optional array of A1 notation ranges (e.g.,['Sheet1!A1:B10']). If not provided, reads the entire sheet.sheetId(number, optional): Specific sheet ID to read. If not provided with ranges, reads the first sheet.
- Output: Returns the specified data from the spreadsheet.
-
gsheets_update_cell
- Description: Update a cell value in a Google Spreadsheet.
- Input:
fileId(string): ID of the spreadsheet.range(string): Cell range in A1 notation (e.g.,'Sheet1!A1').value(string): New cell value.
- Output: Confirms the updated value in the specified cell.
Resources
The server provides access to Google Drive files:
- Files (
gdrive:///)- Supports all file types
- Google Workspace files are automatically exported:
- Docs → Markdown
- Sheets → CSV
- Presentations → Plain text
- Drawings → PNG
- Other files are provided in their native format
Getting started
- Create a new Google Cloud project
- Enable the Google Drive API
- Configure an OAuth consent screen (“internal” is fine for testing)
- Add OAuth scopes
https://www.googleapis.com/auth/drive.readonly,https://www.googleapis.com/auth/spreadsheets - In order to allow interaction with sheets and docs you will also need to enable the Google Sheets API and Google Docs API in your workspaces Enabled API and Services section.
설치
npx -y @isaacphi/mcp-gdrive설정
{
"mcpServers": {
"gdrive": {
"command": "npx",
"args": ["-y", "@isaacphi/mcp-gdrive"],
"env": {
"CLIENT_ID": "<CLIENT_ID>",
"CLIENT_SECRET": "<CLIENT_SECRET>",
"GDRIVE_CREDS_DIR": "/path/to/config/directory"
}
}
}
}