OM

ophydami/mcp-google-doc

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

48 stars 43 forks 品質 64 トレンド 17

ophydami/mcp-google-docは[https://github.com/ophydami/mcp-google-doc.からインポートされたMCPサーバー候補です

概要

ophydami/mcp-google-docは[https://github.com/ophydami/mcp-google-doc.からインポートされたMCPサーバー候補です

概要(AI 翻訳)

これは、Claudeを介してGoogle Docsに接続することを可能にするモデルコンテキストプロトコル(MCP)サーバーです。 このサーバーでは、次のことができます。

  • ドライブのすべてのGoogleドキュメントをリスト
  • 特定の文書の内容を読む
  • 新しい文書を作成する
  • 既存の文書の更新
  • 書類の検索
  • 文書の削除

前提条件

  • Node.js v16.0.0以降
  • Google Docs API と Google Drive API が有効になっている Google Cloud プロジェクト
  • Google Cloudプロジェクト用のOAuth 2.0認証

セットアップ

1。 このリポジトリをクローンし、プロジェクトディレクトリに移動します。

  1. 依存関係を取付けて下さい:

  2. Google Cloud Console で OAuth 2.0 クライアント ID を作成します。

  • Googleクラウドコンソールに移動
  • 新しいプロジェクトを作成するか、既存のプロジェクトを選択して下さい
  • Google Docs API と Google Drive API を有効にする
  • 「APIとサービス」>「認証」に移動
  • 「認証」>「OAuthクライアントID」をクリックします。
  • アプリケーションタイプの「デスクトップアプリ」を選択します。
  • JSON ファイルをダウンロードして、プロジェクトディレクトリの [credentials.json] として保存します。

Important:[credentials.json]と[token.json]ファイルには、機密情報が含まれていて、[[.gitignoreを介してバージョン管理から除外されます.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

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

  1. Clone this repository and navigate to the project directory:
git clone https://github.com/yourusername/MCP-Google-Doc.git
cd MCP-Google-Doc
  1. Install dependencies:
npm install
  1. 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.json in your project directory

    Important: The credentials.json and token.json files contain sensitive information and are excluded from version control via .gitignore. Never commit these files to your repository.

  2. Build the project:

npm run build
  1. 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.json and token.json contain sensitive information and should never be shared or committed to version control. They are already added to the .gitignore file.
  • Token Refresh: The application automatically refreshes the access token when it expires.
  • Revoking Access: If you need to revoke access, delete the token.json file 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:

  1. Edit your Claude Desktop configuration file:

    • On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • On Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. 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
  1. Restart Claude for Desktop.
GitHub で README 全文を見る

インストール

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"] } } }