io.github.markswendsen-code/gmail

السجل الرسمي البحث والويب

Gmail MCP server — send, read, and search email. By Strider Labs.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package @striderlabs/mcp-gmail
Claude Code
claude mcp add gmail -e 'GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID>' -e 'GOOGLE_CLIENT_SECRET=<your google_client_secret>' -e 'GOOGLE_REFRESH_TOKEN=<your google_refresh_token>' -- npx -y @striderlabs/mcp-gmail@0.1.0
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "gmail": {
            "command": "npx",
            "args": [
                "-y",
                "@striderlabs/mcp-gmail@0.1.0"
            ],
            "env": {
                "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
                "GOOGLE_CLIENT_SECRET": "<your google_client_secret>",
                "GOOGLE_REFRESH_TOKEN": "<your google_refresh_token>"
            }
        }
    }
}

متغيرات البيئة

  • GOOGLE_CLIENT_ID إلزامي Google OAuth 2.0 Client ID from Google Cloud Console
  • GOOGLE_CLIENT_SECRET إلزامي سري Google OAuth 2.0 Client Secret
  • GOOGLE_REFRESH_TOKEN إلزامي سري Google OAuth 2.0 Refresh Token for the user's Gmail account

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. @striderlabs/mcp-gmail
  2. For Agents
  3. Installation
  4. Configuration
  5. Available Tools
  6. Getting Google OAuth Credentials
  7. Response Format
  8. Part of Strider Labs
  9. License

@striderlabs/mcp-gmail

MCP server that gives AI agents the ability to send, read, and search email via Gmail.

For Agents

Agents use this connector to handle email autonomously on behalf of their human — reading important messages, searching for information, composing thoughtful replies, and sending communications.

Example agent workflows:

  1. Triage emails: Agent reads new messages, summarizes important ones, and flags urgent items for user attention
  2. Answer routine questions: Agent searches email history to find information, composes replies with context from past conversations
  3. Send on behalf: Agent drafts and sends professional emails based on user intent ("Let the team know I'll be late"), then logs a copy to the conversation

Usage example:

User: "Has anyone replied to my email about the Q2 budget proposal?"

Agent:

  1. gmail_search → "to:me subject:budget"
  2. gmail_read → Read each message
  3. Return summary: "Sarah replied yes on Monday. Mark asked for revisions. No word from Finance yet."

Then agent might automatically draft a follow-up to Finance and ask for approval before sending.

Installation

npx @striderlabs/mcp-gmail

Configuration

Add to your MCP client configuration (e.g., Claude Desktop):

{
  "mcpServers": {
    "strider-gmail": {
      "command": "npx",
      "args": ["-y", "@striderlabs/mcp-gmail"],
      "env": {
        "GOOGLE_CLIENT_ID": "your-client-id",
        "GOOGLE_CLIENT_SECRET": "your-client-secret",
        "GOOGLE_REFRESH_TOKEN": "your-refresh-token"
      }
    }
  }
}

Available Tools

gmail_send

Send an email from the user's Gmail account.

Parameters:

  • to (required): Recipient email address
  • subject (required): Email subject line
  • body (required): Email body content
  • cc (optional): CC recipients
  • bcc (optional): BCC recipients

Search emails using Gmail search syntax.

Parameters:

  • query (required): Gmail search query (e.g., "from:example@gmail.com")
  • maxResults (optional): Maximum results (default: 10)
gmail_read

Read the full content of a specific email.

Parameters:

  • messageId (required): The Gmail message ID
gmail_list

List recent emails from the inbox.

Parameters:

  • maxResults (optional): Maximum emails to list (default: 10)
  • label (optional): Filter by label (e.g., "INBOX", "UNREAD")

Getting Google OAuth Credentials

  1. Go to Google Cloud Console
  2. Create a new project or select existing
  3. Enable the Gmail API
  4. Create OAuth 2.0 credentials
  5. Use the OAuth playground or your app to get a refresh token

Response Format

All tools return structured JSON:

{
  "success": true,
  "messageId": "...",
  "message": "Email sent successfully"
}

Part of Strider Labs

Strider Labs builds action execution infrastructure for AI agents.

License

MIT

الأسئلة الشائعة

ما هو io.github.markswendsen-code/gmail؟

Gmail MCP server — send, read, and search email. By Strider Labs.

كيف أثبّت io.github.markswendsen-code/gmail؟

يعمل على جهازك. في Claude Code: claude mcp add gmail -e 'GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID>' -e 'GOOGLE_CLIENT_SECRET=<your google_client_secret>' -e 'GOOGLE_REFRESH_TOKEN=<your google_refresh_token>' -- npx -y @striderlabs/mcp-gmail@0.1.0. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.markswendsen-code/gmail إلى مفتاح API؟

نعم. يتطلب GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GOOGLE_REFRESH_TOKEN، وتضبطها في إعداداته.

هل io.github.markswendsen-code/gmail مفتوح المصدر؟

شيفرته علنية على GitHub، لكن المستودع لا يعلن ترخيصًا قياسيًا.

من يصون io.github.markswendsen-code/gmail؟

ينشره markswendsen-code. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.