gmail-mcp

gmail-mcp

A read-only Gmail MCP server enabling users to search and read emails via Gmail search syntax without sending, deleting, or modifying anything.

Category
Visit Server

README

gmail-mcp

A read-only Gmail MCP server, built from scratch on the MCP SDK — no third-party Gmail MCP packages. Lets Claude Code (or any MCP client) search and read a Gmail inbox without ever being able to send, delete, or modify anything.

Tools

Tool What it does
list_emails Search the inbox with full Gmail search syntax (from:, newer_than:, has:attachment, …), with a maxResults cap
get_email Fetch a single message by id: headers plus the full plain-text body

Design notes

  • Read-only by construction. The OAuth scope is gmail.readonly — the token Google issues cannot send or delete mail even if the server were compromised.
  • Google OAuth 2.0 Desktop-app flow. A one-time npm run auth opens a browser for consent, then stores a refresh token locally. The server auto-refreshes access tokens and persists them back to disk, so auth survives restarts.
  • Secrets stay out of the repo. credentials.json (OAuth client) and token.json (tokens) are gitignored; the code loads them from disk at startup.

Setup

  1. In Google Cloud Console, create a project, enable the Gmail API, and create an OAuth client of type Desktop app. Download it as credentials.json into this folder. While the consent screen is in Testing mode, add your address under Audience → Test users.

  2. Install and authenticate:

    npm install
    npm run auth   # opens browser, writes token.json
    
  3. Register with Claude Code (user scope makes it available in every session):

    claude mcp add gmail -s user -- node /absolute/path/to/gmail-mcp/index.js
    

    Verify with claude mcp list — the server should show as Connected.

Files

  • index.js — the MCP server (tool definitions, Gmail API calls, token refresh persistence)
  • auth.js — one-time OAuth consent flow; writes token.json

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured