Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Enables interaction with Gmail, Google Drive, and Google Classroom through FastMCP, providing tools for reading emails, managing files, and listing courses.

README.md

🚀 Google MCP Agent

A unified FastMCP-powered agent that connects Gmail, Google Drive, and Google Classroom with LLM-ready tools for automation, parsing, and intelligent retrieval.

---

📌 What This Repo Offers

  • ✅ Read and manage Gmail (inbox, unread, spam)
  • ✅ Read file content from Google Drive (Docs, PDFs, TXT)
  • ✅ List Google Classroom courses
  • ✅ LLM-compatible tools exposed via FastMCP
  • ✅ Easily deployable with uv in an agentic RAG pipeline

---

⚙️ Setup Guide

Before running the project, set up your Google Cloud project for OAuth.

🔑 1. Enable APIs in Google Cloud Console

  1. Go to GCP Console
  2. Navigate to "APIs & Services" > "OAuth consent screen"
  3. Choose "External" > Fill in app name and support email
  4. Under Scopes, you don't need to add anything manually now
  5. Under Test users, add the Gmail/Drive account you want to access (must match the email you're using)

🧾 2. Create OAuth 2.0 Credentials

  1. Go to "APIs & Services" > "Credentials"
  2. Click "Create Credentials" > "OAuth client ID"
  3. Choose "Desktop App" or "Web App"
  4. Download the client_creds.json file

🔐 Authentication Info (One-time Manual, Then Persistent)

  • The first time you run the server, a browser window will open asking you to log in and authorize access.
  • After successful login, a token.json file will be created automatically in your local directory.
  • This file contains your OAuth access/refresh token and is reused for future runs.
  • You won’t need to re-authenticate unless the token expires or is deleted.

⚠️ _No need to publish the app — keeping it in testing mode is fine as long as the user is whitelisted._

---

🛠️ Configuration Example

Add this block to your msp.json or equivalent MCP config to run the main server:

{
    "mcpServers": {
      "main_mcp_server": {
        "command": "uv",
        "args": [
          "--directory",
          "absolute_path\\to\\current_project",
          "run",
          "server.py",
          "--creds-file-path",
          "absolute_path\\to\\client_creds.json",
          "--token-path",
          "absolute_path\\to\\app_tokens.json"
        ]
      }
}

🧰 Available Tools (Exposed via FastMCP) These tools are registered with FastMCP and can be used directly by your copilot system or any agent pipeline.

📬 Gmail Tools 🔹 get_unread_emails(limit: int = 5) Returns a list of unread emails from the user's inbox with metadata like subject, sender, and snippet. Automatically marks them as read.

🔹 read_email(email_id: str) Reads and decodes the full plain-text body of a specific email by its ID.

🔹 get_read_emails(limit: int = 50) Fetches recently read (non-unread) emails from the inbox.

🔹 get_spam_emails(limit: int = 20) Retrieves a list of emails from the Gmail spam folder with minimal metadata.

📂 Google Drive Tools

🔹 list_my_drive_files(limit: int = 10) Returns a list of recent files in the user's Google Drive, including ID, name, MIME type, and last modified time.

🔹 read_file_content(file_id: str) Reads and extracts text from a file in Drive. Supports:

Google Docs (exported as plain text)

Plain .txt files

PDFs (parsed using PyPDF2)

🏫 Google Classroom Tool 🔹 list_courses() Fetches the list of enrolled Google Classroom courses (read-only).

Each tool can be invoked via MCP runtime or LLM-powered interfaces. This setup enables rich, context-aware workflows that interact with the user's real data.

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Communication servers.