Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Google Docs + Gmail Server

БесплатноНе проверен

A lightweight MCP-style server integrating Google Docs and Gmail, enabling AI to append structured content to documents and create email drafts with human-in-th

GitHubEmbed

Описание

A lightweight MCP-style server integrating Google Docs and Gmail, enabling AI to append structured content to documents and create email drafts with human-in-the-loop approval.

README

A lightweight MCP-style server that integrates with Google Docs and Gmail.

This project demonstrates how to build structured AI tool interfaces with approval gating, inspired by the Model Context Protocol (MCP).


✨ Features

  • 📄 Append structured content to Google Docs
  • 📧 Create Gmail drafts
  • 🔐 OAuth-based Google authentication
  • 🧠 MCP-style tool interface
  • ✅ Human-in-the-loop approval before execution
  • 🧩 Modular and extensible design

How to Use in Your Project

  1. Run the MCP server: uvicorn server:app --reload

  2. Call tools via API: POST /append_to_doc POST /create_email_draft

  3. Integrate with your AI workflow:

    • Generate content using LLM
    • Send output to these endpoints

📁 Project Structure

google-mcp-server/
│── server.py
│── auth.py
│── docs_tool.py
│── gmail_tool.py
│── requirements.txt
│── credentials.json   (not committed)
│── token.json         (not committed)
│── README.md

⚙️ Setup

1. Clone the repository

git clone <your-repo-url>
cd google-mcp-server

2. Create virtual environment

python3 -m venv venv
source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. 🔑 Google API Setup

  1. Go to Google Cloud Console

  2. Create a new project

  3. Enable:

    • Google Docs API
    • Gmail API
  4. Configure OAuth Consent Screen

  5. Create OAuth Credentials (Desktop App)

  6. Download credentials.json

  7. Place it in project root


5. 🔐 Run OAuth

python3 auth.py
  • Opens browser for login
  • Generates token.json

6. ▶️ Run Server

uvicorn server:app --reload

Open:

http://127.0.0.1:8000/docs

🧪 How to Test

Append to Google Doc

Endpoint: POST /append_to_doc

Example:

{
  "doc_id": "YOUR_DOC_ID",
  "content": "Hello from MCP 🚀"
}

Create Email Draft

Endpoint: POST /create_email_draft

Example:

{
  "to": "[email protected]",
  "subject": "Test Draft",
  "body": "This is a test email"
}

🔄 Workflow

Request → Approval → Tool Execution → Response
  • Every action requires manual approval
  • Ensures safe and controlled execution

⚠️ Important Notes

Do NOT commit:

  • credentials.json
  • token.json

Approval is CLI-based (terminal input) Designed for local development


⚠️ Approval Flow

Every action requires manual approval in terminal:

ACTION: append_to_doc
PAYLOAD: {...}
Approve? (y/n):

Type:

y

🧠 MCP Design

This project demonstrates:

  • Structured tool calls
  • Separation of generation and execution
  • Human approval before tool execution

❗ Notes

  • No emails are sent automatically (draft only)
  • Google Doc must have edit access
  • Token is stored locally

📄 License

Apache License

from github.com/kajolchawla98/MCP

Установка Google Docs + Gmail Server

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/kajolchawla98/MCP

FAQ

Google Docs + Gmail Server MCP бесплатный?

Да, Google Docs + Gmail Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Google Docs + Gmail Server?

Нет, Google Docs + Gmail Server работает без API-ключей и переменных окружения.

Google Docs + Gmail Server — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Google Docs + Gmail Server в Claude Desktop, Claude Code или Cursor?

Открой Google Docs + Gmail Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare Google Docs + Gmail Server with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории communication