
ophydami/mcp-google-doc
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
ophydami/mcp-google-doc - кандидат на сервер MCP, импортированный из https://github.com/ophydami/mcp-google-doc.
Обзор
ophydami/mcp-google-doc - кандидат на сервер MCP, импортированный из https://github.com/ophydami/mcp-google-doc.
Обзор (машинный перевод)
Это сервер Model Context Protocol (MCP), который позволяет подключаться к Google Docs через Claude. С помощью этого сервера вы можете:
Перечислите все документы Google на вашем диске Читайте содержание конкретных документов Создание новых документов Обновление существующих документов
- Поиск документов
- Удалить документы
Предпосылки
Node.js v16.0.0 или более поздняя версия Google Cloud Project с поддержкой Google Docs API и Google Drive API Учетные данные OAuth 2.0 для вашего проекта Google Cloud
Настройка
-
Клонируйте это хранилище и перейдите в каталог проекта:
-
Установить зависимости:
-
Создайте идентификатор клиента OAuth 2.0 в Google Cloud Console:
Перейдите в Google Cloud Console Создать новый проект или выбрать существующий Включите Google Docs API и Google Drive API Перейдите в раздел «APIs & Services» > «Удостоверения»
- Нажмите «Создать учетные данные» > «Идентификатор клиента OAuth»
- Выберите «Настольное приложение» для типа приложения
Загрузите файл JSON и сохраните его как
credentials.jsonв каталоге проекта.
Важно: файлы credentials.json и token.json содержат конфиденциальную информацию и исключаются из контроля версий через .gitignore.
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
Google Docs MCP Server
This is a Model Context Protocol (MCP) server that allows you to connect to Google Docs through Claude. With this server, you can:
- List all Google Docs in your Drive
- Read the content of specific documents
- Create new documents
- Update existing documents
- Search for documents
- Delete documents
Prerequisites
- Node.js v16.0.0 or later
- Google Cloud project with the Google Docs API and Google Drive API enabled
- OAuth 2.0 credentials for your Google Cloud project
Setup
- Clone this repository and navigate to the project directory:
git clone https://github.com/yourusername/MCP-Google-Doc.git
cd MCP-Google-Doc
- Install dependencies:
npm install
-
Create an OAuth 2.0 client ID in the Google Cloud Console:
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Docs API and Google Drive API
- Go to “APIs & Services” > “Credentials”
- Click “Create Credentials” > “OAuth client ID”
- Select “Desktop app” for the application type
- Download the JSON file and save it as
credentials.jsonin your project directory
Important: The
credentials.jsonandtoken.jsonfiles contain sensitive information and are excluded from version control via.gitignore. Never commit these files to your repository. -
Build the project:
npm run build
- Run the server:
npm start
The first time you run the server, it will prompt you to authenticate with Google. Follow the on-screen instructions to authorize the application. This will generate a token.json file that stores your access tokens.
Security Considerations
- Credential Security: Both
credentials.jsonandtoken.jsoncontain sensitive information and should never be shared or committed to version control. They are already added to the.gitignorefile. - Token Refresh: The application automatically refreshes the access token when it expires.
- Revoking Access: If you need to revoke access, delete the
token.jsonfile and go to your Google Account Security settings to remove the app from your authorized applications.
Connecting to Claude for Desktop
To use this server with Claude for Desktop:
-
Edit your Claude Desktop configuration file:
- On macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - On Windows:
%APPDATA%\Claude\claude_desktop_config.json
- On macOS:
-
Add the following to your configuration:
{
"mcpServers": {
"googledocs": {
"command": "node",
"args": ["/absolute/path/to/build/server.js"]
}
}
}
Replace /absolute/path/to/build/server.js with the actual path to your built server.js file.
Connecting to Claude Code
claude mcp add --transport stdio google-docs node /absolute/path/to/build/server.js
- Restart Claude for Desktop.
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"googledocs": {
"command": "node",
"args": ["/absolute/path/to/build/server.js"]
}
}
}