gworkspace-mcp
gworkspace-mcp
Google Workspace 자동화(Google Sheets, Apps Script, Drive, Docs, Gmail 및 트리거)를 위한 Model Context Protocol 서버입니다. FastMCP로 구축되었습니다.
Claude Code(또는 모든 MCP 호환 클라이언트)에서 사용하도록 설계되어, 대화 중에 직접 Apps Script 프로젝트를 편집하고, 스프레드시트를 조작하며, 이메일을 보내고, Drive 파일을 관리할 수 있습니다.
기능
Apps Script (9개 도구) — Apps Script 프로젝트 나열, 읽기, 업데이트, 생성, 배포 및 실행. 전체 스크립트를 다시 작성할 필요 없이 세밀한 파일 편집이 가능합니다.
Sheets (10개 도구) — 범위 읽기/쓰기, 일괄 업데이트, 서식 지정, 보호, 수식, 대시보드.
Drive (4개 도구) — 파일 나열, 검색, 이동 및 관리.
Docs (1개 도구) — Google Docs 읽기/편집.
Gmail (3개 도구) — 이메일 작성 및 전송.
Triggers (3개 도구) — Apps Script 시간 기반 및 이벤트 트리거 관리.
Connect (1개 도구) — 로컬 Apps Script 프로젝트를 스프레드시트에 바인딩.
Related MCP server: Google Workspace MCP Server
요구 사항
Python 3.10+
다음 API가 활성화된 Google Cloud 프로젝트:
Google Sheets API
Google Drive API
Apps Script API
Google Docs API
Gmail API
Google Calendar API
OAuth 2.0 데스크톱 자격 증명 (
client_secret.json)
설치
git clone https://github.com/LeooNic/gworkspace-mcp.git
cd gworkspace-mcp
pip install -e .또는 uv 사용 시:
uv pip install -e .Google Cloud 설정
console.cloud.google.com으로 이동하여 프로젝트를 생성합니다.
API 및 서비스 → 라이브러리에서 위에 나열된 API를 활성화합니다.
API 및 서비스 → OAuth 동의 화면으로 이동하여 **외부(External)**로 구성하고, Google 계정을 테스트 사용자로 추가합니다.
API 및 서비스 → 사용자 인증 정보 → 사용자 인증 정보 만들기 → OAuth 클라이언트 ID로 이동하여 **데스크톱 앱(Desktop app)**을 선택하고 JSON을 다운로드합니다.
다음 방법 중 하나로 서버에서 자격 증명을 사용할 수 있도록 설정합니다:
JSON을
~/.secrets/gworkspace-mcp/client_secret.json에 배치하거나,GOOGLE_CLIENT_SECRET_PATH=/full/path/to/client_secret.json을 설정하거나,GOOGLE_OAUTH_CLIENT_ID및GOOGLE_OAUTH_CLIENT_SECRET을 환경 변수로 설정합니다.
도구가 처음 실행될 때 OAuth 동의를 위한 브라우저 창이 열립니다. 결과 토큰은 ~/.secrets/gworkspace-mcp/token.json에 저장되며 자동으로 갱신됩니다.
Claude Code에 등록
Claude Code의 settings.json(또는 ~/.claude.json)에 다음을 추가합니다:
{
"mcpServers": {
"gworkspace": {
"command": "gworkspace-mcp"
}
}
}gworkspace-mcp가 PATH에 없는 경우, pip install -e .로 생성된 실행 파일의 절대 경로를 사용하세요(Windows의 경우 일반적으로 C:\Users\<사용자>\AppData\Local\Programs\Python\Python3XX\Scripts\gworkspace-mcp.exe).
진입점을 설치하지 않고 호출하는 대안:
{
"mcpServers": {
"gworkspace": {
"command": "python",
"args": ["-m", "gworkspace_mcp.server"]
}
}
}OAuth 범위
서버는 다음 범위를 요청합니다:
spreadsheets,drive,documents,calendarscript.projects,script.deployments,script.processes,script.metricsgmail.send,gmail.composeuserinfo.email,userinfo.profile
보안 참고 사항
client_secret.json및token.json은 개인 정보이므로 절대 커밋하지 마십시오. 저장소의.gitignore에는 이미 제외되어 있습니다.토큰은
~/.secrets/gworkspace-mcp/아래에 저장됩니다.서버는 로컬에서 실행되며 네트워크 엔드포인트를 노출하지 않습니다.
라이선스
MIT — LICENSE를 참조하십시오.
Available Tools
31 toolsdrive_copyB
Copy a Drive file (spreadsheet, doc, etc). Returns the new file ID and URL.
Inputs: source (required), new_name (required), folder_id. Returns: Generic wrapper for non-object return types.
drive_create_spreadsheetB
Create a new Google Spreadsheet. Returns ID and URL.
Inputs: name (required), folder_id. Returns: Generic wrapper for non-object return types.
drive_moveC
Move a file to a different folder.
Inputs: file_url (required), dest_folder_id (required). Returns: Generic wrapper for non-object return types.
drive_searchB
Search Drive files. Uses Drive query syntax. Examples: "name contains 'report'", "mimeType='application/vnd.google-apps.spreadsheet'".
Inputs: query (required), page_size. Returns: Generic wrapper for non-object return types.
generate_docsB
Generate functional documentation for a spreadsheet project. Analyzes the spreadsheet structure, script functions, triggers, and manifest to produce a complete technical document.
Args: spreadsheet_url: Spreadsheet URL or ID script_url: Optional Apps Script URL or ID output: "sheet" writes a Documentacion tab in the spreadsheet, "text" returns the doc as text
Inputs: spreadsheet_url (required), script_url, output. Returns: Generic wrapper for non-object return types.
script_add_functionC
Add a new function to an existing file. Appends at the end.
Inputs: script_id (required), file_name (required), source (required). Returns: Generic wrapper for non-object return types.
script_create_fileC
Create a new .gs file in the script project.
Inputs: script_id (required), file_name (required), source. Returns: Generic wrapper for non-object return types.
script_delete_functionB
Delete a function from the script project.
Inputs: script_id (required), function_name (required). Returns: Generic wrapper for non-object return types.
script_edit_functionB
Replace a specific function's source code. Only that function is modified.
Inputs: script_id (required), function_name (required), new_source (required). Returns: Generic wrapper for non-object return types.
script_get_fileC
Get the full source code of a file in the script project.
Inputs: script_id (required), file_name (required). Returns: Generic wrapper for non-object return types.
script_get_functionB
Get the source code of a specific function by name.
Inputs: script_id (required), function_name (required). Returns: Generic wrapper for non-object return types.
script_list_functionsB
List all functions in a script project with their file, signature, and line numbers.
Inputs: script_id (required). Returns: Generic wrapper for non-object return types.
script_runB
Execute a function in a deployed script. Requires API Executable deployment.
Inputs: script_id (required), function_name (required), parameters. Returns: Generic wrapper for non-object return types.
script_update_fileB
Replace the entire content of a file in the script project.
Inputs: script_id (required), file_name (required), source (required). Returns: Generic wrapper for non-object return types.
send_emailB
Send an email via Gmail. Set html=True for HTML body. cc/bcc are comma-separated email addresses.
Inputs: to (required), subject (required), body (required), html, +2 more. Returns: Generic wrapper for non-object return types.
send_email_previewA
Preview an email without sending it. Returns the formatted message.
Inputs: to (required), subject (required), body (required), html. Returns: Generic wrapper for non-object return types.
send_html_emailC
Send an HTML email with optional plain-text fallback.
Inputs: to (required), subject (required), html_body (required), plain_fallback, +1 more. Returns: Generic wrapper for non-object return types.
sheets_add_tableB
Create a Google Sheets Table (the structured table feature, Ctrl+Alt+T). Converts a data range into a formal table with headers, banding, and filtering.
Inputs: spreadsheet (required), sheet_name (required), range_a1 (required), name. Returns: Generic wrapper for non-object return types.
sheets_add_validationC
Add data validation. validation_type: DROPDOWN, CHECKBOX, NUMBER, DATE. For DROPDOWN, pass values as list of options.
Inputs: spreadsheet (required), sheet_name (required), range_a1 (required), validation_type (required), +1 more. Returns: Generic wrapper for non-object return types.
sheets_appendC
Append rows to the end of a sheet.
Inputs: spreadsheet (required), range (required), values (required). Returns: Generic wrapper for non-object return types.
sheets_conditional_formatC
Add conditional formatting. rule_type: NUMBER_GREATER, NUMBER_LESS, NUMBER_EQ, TEXT_CONTAINS, TEXT_NOT_CONTAINS, CUSTOM_FORMULA. For CUSTOM_FORMULA, condition_value is the formula (e.g., '=A1>8').
Inputs: spreadsheet (required), sheet_name (required), range_a1 (required), rule_type (required), +2 more. Returns: Generic wrapper for non-object return types.
sheets_copy_sheetC
Copy a sheet from one spreadsheet to another.
Inputs: source_spreadsheet (required), sheet_name (required), dest_spreadsheet (required). Returns: Generic wrapper for non-object return types.
sheets_describeB
Get full structure of a spreadsheet: sheets, named ranges, protected ranges.
Inputs: spreadsheet (required). Returns: Generic wrapper for non-object return types.
sheets_formatC
Format a range. Colors as hex (#RRGGBB). h_align: LEFT/CENTER/RIGHT.
Inputs: spreadsheet (required), sheet_name (required), range_a1 (required), bold, +6 more. Returns: Generic wrapper for non-object return types.
sheets_protectC
Protect a sheet or range. If range_a1 is None, protects the entire sheet.
Inputs: spreadsheet (required), sheet_name (required), range_a1, description, +1 more. Returns: Generic wrapper for non-object return types.
sheets_readC
Read values from a sheet. Pass spreadsheet URL or ID.
Inputs: spreadsheet (required), range (required), render. Returns: Generic wrapper for non-object return types.
sheets_writeC
Write values to a sheet range. values is a 2D array.
Inputs: spreadsheet (required), range (required), values (required). Returns: Generic wrapper for non-object return types.
trigger_create_time_drivenB
Create a time-driven trigger via Apps Script execution. Generates and runs trigger setup code in the script.
Options:
every_minutes: 1, 5, 10, 15, 30
every_hours: 1, 2, 4, 6, 8, 12
day_of_week + hour: weekly trigger (MONDAY-SUNDAY, hour 0-23)
hour only: daily trigger at that hour
Inputs: script_id (required), function_name (required), every_minutes, every_hours, +2 more. Returns: Generic wrapper for non-object return types.
trigger_deleteA
Delete a trigger by ID. Use trigger_list to find IDs.
Inputs: script_id (required), trigger_id (required). Returns: Generic wrapper for non-object return types.
trigger_listB
List all triggers for a script project.
Inputs: script_id (required). Returns: Generic wrapper for non-object return types.
workspace_connectA
Connect to a Google Spreadsheet and discover everything about it.
Args: spreadsheet_url: Spreadsheet URL or ID script_url: Optional. The Apps Script URL or ID (from Extensions > Apps Script). Container-bound scripts don't appear in Drive API (Google limitation), so pass the script URL for full discovery. If omitted, only sheet structure is returned.
Returns: sheet structure, and if script_url is provided: all files with functions, triggers, and deployments.
Inputs: spreadsheet_url (required), script_url. Returns: Generic wrapper for non-object return types.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 31 tools
Most tools have distinct purposes, but some overlap exists. For example, send_email and send_html_email could be confused, and drive_copy/drive_move have similar file manipulation functions. However, clear descriptions help differentiate them.
Tool names follow a consistent snake_case pattern with clear verb_noun conventions. Drive tools use drive_ prefix, script tools use script_ prefix, sheets tools use sheets_ prefix, and email/trigger/workspace tools follow similar patterns. No mixing of conventions.
31 tools is excessive for a single MCP server. While the domain (Google Workspace automation) is broad, this feels like multiple servers combined. A more focused scope with 15-20 tools would be more manageable for agents.
The tool surface provides comprehensive coverage for Google Workspace automation. It includes full CRUD operations for Drive files, Sheets manipulation, Apps Script development, email sending, and trigger management. The workspace_connect tool provides excellent discovery capabilities.
Maintenance
Related MCP Connectors
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
Hosted Google Sheets MCP server, with each action switched on or off per account.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with Google Sheets through natural language, allowing users to create, read, update, and manage spreadsheet data via the Google Sheets API v4.-
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server integrating Google Docs, Sheets, Drive, Gmail, Calendar, and Apps Script APIs, featuring unique Apps Script support for AI-driven automation.9MIT
- AlicenseAqualityBmaintenanceMCP server integrating multiple Google Workspace services including Gmail, Calendar, Drive, Sheets, Docs, Tasks, People, Forms, and Slides, enabling users to manage emails, events, files, documents, and more through natural language.15MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for Google Sheets operations, enabling spreadsheet management including reading, writing, appending, creating, and searching sheets via natural language.MIT