DAVS Gmail MCP Server
Provides tools for listing and searching emails (list_emails) and sending emails (send_email), along with access to the user's Gmail profile and static resources (PDF manuals) via resource templates.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DAVS Gmail MCP ServerShow me my unread emails from last week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
📧 Gmail AI Assistant with Model Context Protocol (MCP)
This project implements an intelligent assistant capable of interacting directly with a Gmail account using the Model Context Protocol (MCP).
It demonstrates the secure integration of a local LLM (Ollama) with external APIs (Google Workspace), allowing the model to read, summarize, and send emails, as well as consume static resources (PDFs) through dynamic templates, all under a standardized client-server architecture.
🏗️ System Architecture
MCP Server (
gmail_mcp_server.py): Exposes tools (Tools), static and dynamic resources (Resources/Resource Templates), and predefined prompts to the client. Handles OAuth2 authentication with Google Cloud.MCP Client (
client.py): Connects to the MCP server, discovers available capabilities, and dynamically formats them so the language model (Llama 3.1) can use them as Function Calling.Graphical Interface (
app.py): Interactive application built with Streamlit that manages conversation history, renders dynamic UI components based on the server response, and facilitates the use of quick prompts.Security: Strict credential handling. Authentication is performed locally, and session tokens are kept in the runtime environment, with no external exposure.
✨ Agent Capabilities
Tools:
list_emails(Search and filtering) andsend_email(Composition and sending).Resources: Access to the user's Gmail profile.
Resource Templates: Reading and injecting context from local PDF manuals (e.g.
docs://setup-manual/{version}) directly into the LLM context.Prompts: Pre-built flows for daily summaries and professional email composition.
🚀 Installation and Configuration
Prerequisites
Python 3.10+
Ollama installed with the
llama3.1model.A Google Cloud Platform (GCP) account.
1. Google Credentials Configuration (Required)
For security reasons, this repository does not include access credentials. You must generate your own:
Go to Google Cloud Console.
Create a new project and enable the Gmail API.
Configure the OAuth consent screen (Add your email as a test user).
Create credentials of type OAuth client ID (Desktop application).
Download the JSON file, rename it to
credentials.json, and place it in the root of this project.
2. Running the Environment
# Clonar repositorio
git clone [https://github.com/tu-usuario/gmail-mcp-server.git](https://github.com/tu-usuario/gmail-mcp-server.git)
cd gmail-mcp-server
# Crear entorno virtual e instalar dependencias
python -m venv venv
source venv/bin/activate # En Windows: venv\Scripts\activate
pip install -r requirements.txt
# Iniciar la interfaz gráfica
streamlit run app.pyThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
StremAI MCP: shared memory for AI coding agents. Connected agents can recall. OAuth + local stdio.
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
AI-powered medical document management for cancer patients. Google Drive, Gmail, Calendar via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/davsdevelop/DAVS-gmail-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server