Skip to main content
Glama
Google MCP Server

Google MCP Server

by urmi123-ui

Google MCP Server

一个基于FastAPI的MCP风格服务器,集成Google Docs和Gmail,在执行任何操作前需要终端批准。

前提条件

  1. 在Google Cloud Console中创建一个项目。

  2. 启用以下API:

    • Google Docs API

    • Gmail API

  3. 创建OAuth 2.0客户端ID凭据(桌面应用类型)。

  4. 下载JSON文件,将其重命名为credentials.json,并放置在此目录(google-mcp-server/)中。

Related MCP server: Google Docs + Gmail MCP Server

安装

pip install -r requirements.txt

运行服务器

python server.py
# or
uvicorn server:app --reload

使用

追加到Google文档

发送POST请求到/append_to_doc:

{
    "doc_id": "your_document_id",
    "content": "Text to append\n"
}

创建Gmail草稿

发送POST请求到/create_email_draft:

{
    "to": "example@example.com",
    "subject": "Test Draft",
    "body": "This is a test email body."
}

服务器将在执行任何这些操作之前,在终端提示您批准。输入y并按Enter确认。

Related MCP Connectors

Related MCP Servers