Agent skill

add-gmail-agent

Wire Gmail MCP server into the agent so it can read, search, and send emails. Optional — not core functionality.

Stars 24
Forks 5

Install this agent skill to your Project

npx add-skill https://github.com/b1rdmania/ghostclaw/tree/main/.claude/skills/add-gmail-agent

SKILL.md

Add Email to Agent (Gmail)

Gives the agent access to email via MCP tools. Read, search, send, and manage emails from the bot.

This is optional. Email is not core to GhostClaw. But it's useful — your bot can read verification codes, check for urgent emails, send summaries, or flag things that need attention. One practical use: the bot reads its own auth codes automatically during setup.

Email providers

Gmail is the easiest path because there's a well-maintained MCP server for it. But this isn't Gmail-specific — any email provider with an MCP server or IMAP access works. Options:

Provider Approach Difficulty
Gmail MCP server with OAuth (documented below) Medium — Google Cloud setup required
Outlook/365 Microsoft Graph MCP server Medium — Azure app registration
Any IMAP Generic IMAP MCP server Easy — just server/user/password
Proton Mail Proton Bridge + IMAP MCP Medium — needs Bridge running

The Gmail route is documented here. For other providers, the wiring is identical — just swap the MCP server command in the agent runner config.

Gmail setup

1. Google Cloud OAuth (one-time)

This is the fiddly part. You need a Google Cloud project with Gmail API enabled:

  1. Go to Google Cloud Console
  2. Create a project (or use existing)
  3. Enable the Gmail API
  4. Create OAuth 2.0 credentials (Desktop app type)
  5. Download the credentials JSON

Then authenticate the MCP server:

bash
npx @gongrzhe/server-gmail-autoauth-mcp

Follow the browser OAuth flow. This creates credentials in ~/.gmail-mcp/.

2. Enable in GhostClaw

Add to .env:

bash
GMAIL_MCP_ENABLED=1

3. Rebuild and restart

bash
cd container/agent-runner && npx tsc
launchctl kickstart -k gui/$(id -u)/com.ghostclaw  # macOS
# systemctl --user restart ghostclaw               # Linux

4. Test

Send a message to the bot: "Check my recent emails"

What the agent can do

With email enabled, the agent has these MCP tools:

Tool What it does
search_emails Search with Gmail query syntax
read_email Read a specific email by ID
send_email Send an email
draft_email Create a draft
modify_email Move/label emails
list_email_labels List all labels
create_filter Create inbox filters
download_attachment Download attachments

How it works

The agent runner at container/agent-runner/src/index.ts conditionally adds the Gmail MCP server when GMAIL_MCP_ENABLED=1 is set. The server runs as a child process of the agent, inheriting HOME for OAuth credential discovery.

Disabling

Remove GMAIL_MCP_ENABLED=1 from .env and restart. The agent won't have email tools on next invocation.

Using other email providers

To swap Gmail for another provider, edit container/agent-runner/src/index.ts and change the MCP server command in the gmail config block. The rest of the wiring (conditional enable via env var, tool permissions) stays the same.

Expand your agent's capabilities with these related and highly-rated skills.

b1rdmania/ghostclaw

agent-browser

Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data, and test web pages. Use whenever a browser would be useful, not just when the user explicitly asks.

24 5
Explore
b1rdmania/ghostclaw

add-voice-transcription

Add voice message transcription to GhostClaw using ElevenLabs Scribe API. Automatically transcribes voice notes so the agent can read and respond to them.

24 5
Explore
b1rdmania/ghostclaw

sales-enablement

When the user wants to create sales collateral, pitch decks, one-pagers, objection handling docs, or demo scripts. Also use when the user mentions 'sales deck,' 'pitch deck,' 'one-pager,' 'leave-behind,' 'objection handling,' 'deal-specific ROI analysis,' 'demo script,' 'talk track,' 'sales playbook,' 'proposal template,' 'buyer persona card,' 'help my sales team,' 'sales materials,' or 'what should I give my sales reps.' Use this for any document or asset that helps a sales team close deals. For competitor comparison pages and battle cards, see competitor-alternatives. For marketing website copy, see copywriting. For cold outreach emails, see cold-email.

24 5
Explore
b1rdmania/ghostclaw

seo-audit

When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," or "indexing issues." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema-markup. For AI search optimization, see ai-seo.

24 5
Explore
b1rdmania/ghostclaw

churn-prevention

When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions 'churn,' 'cancel flow,' 'offboarding,' 'save offer,' 'dunning,' 'failed payment recovery,' 'win-back,' 'retention,' 'exit survey,' 'pause subscription,' 'involuntary churn,' 'people keep canceling,' 'churn rate is too high,' 'how do I keep users,' or 'customers are leaving.' Use this whenever someone is losing subscribers or wants to build systems to prevent it. For post-cancel win-back email sequences, see email-sequence. For in-app upgrade paywalls, see paywall-upgrade-cro.

24 5
Explore
b1rdmania/ghostclaw

qodo-pr-resolver

Review and resolve PR issues with Qodo - get AI-powered code review issues and fix them interactively (GitHub, GitLab, Bitbucket, Azure DevOps)

24 5
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results