Google Workspace MCP Server
Enables interaction with Google Sheets, Docs, and Drive to manage spreadsheets, documents, and files. It supports operations like reading and updating cell data, extracting text from documents, and searching or sharing files within Google Drive.
README
-+693# Google Sheets MCP Server
MCP (Model Context Protocol) сервер для взаимодействия с Google Sheets, Google Docs и Google Drive.
Возможности
Google Sheets
- Чтение данных из таблиц
- Обновление ячеек
- Пакетное обновление нескольких диапазонов
- Добавление строк и столбцов
- Создание, переименование, копирование и удаление листов
- Получение формул из ячелей
- Получение списка таблиц из Google Drive
Google Docs
- Чтение содержимого документов
- Извлечение текста из документов
- Вставка текста в документы
- Удаление текста из документов
- Создание документов (опционально)
Google Drive
- Поиск файлов
- Скачивание Google Docs как TXT
- Обновление содержимого файлов
- Предоставление доступа к таблицам
Установка
# Клонирование репозитория
git clone https://github.com/yourusername/mcp-google-sheets.git
cd mcp-google-sheets
# Создание виртуального окружения
python -m venv venv
source venv/bin/activate # Linux/Mac
# или
venv\Scripts\activate # Windows
# Установка зависимостей
pip install -r requirements.txt
Настройка аутентификации
Способ 1: Service Account (рекомендуется)
- Создайте сервисный аккаунт в Google Cloud Console
- Скачайте JSON-файл с ключом
- Предоставьте сервисному аккаунту доступ к таблицам и диску
Укажите путь к файлу:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json"
Способ 2: OAuth 2.0
- Создайте OAuth credentials в Google Cloud Console
- Скачайте
credentials.json - При первом запуске будет предложено авторизоваться через браузер
- Токен будет сохранён в
token.json
Переменные окружения
| Переменная | Описание | По умолчанию |
|---|---|---|
GOOGLE_APPLICATION_CREDENTIALS |
Путь к файлу сервисного аккаунта | service-account-key.json |
CREDENTIALS_CONFIG |
Base64-encoded JSON сервисного аккаунта | - |
DRIVE_FOLDER_ID |
ID папки в Google Drive для поиска таблиц | - |
ENABLE_CREATE_TOOLS |
Включить инструменты создания (true/false) |
false |
Запуск
python server.py
Использование с MCP-клиентами
Claude Desktop
Добавьте в claude_desktop_config.json:
{
"mcpServers": {
"google-sheets": {
"command": "python",
"args": ["/path/to/mcp-google-sheets/server.py"]
}
}
}
Инструменты
| Инструмент | Описание |
|---|---|
get_sheet_data |
Получить данные из листа |
get_sheet_formulas |
Получить формулы из ячеек |
update_cells |
Обновить значения ячеек |
batch_update_cells |
Пакетное обновление нескольких диапазонов |
add_rows |
Добавить строки |
add_columns |
Добавить столбцы |
list_sheets |
Получить список листов |
copy_sheet |
Копировать лист |
rename_sheet |
Переименовать лист |
delete_sheet |
Удалить лист |
list_spreadsheets |
Получить список таблиц |
share_spreadsheet |
Предоставить доступ к таблице |
get_doc_content |
Получить содержимое документа |
get_doc_text |
Получить текст документа |
search_drive_files |
Поиск файлов в Drive |
Лицензия
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.