Skip to main content

MCP server that gives AI agents deep understanding of your email

Project description

Deepmail

Your agent can search your email. It can't understand it.

Gmail MCP servers let agents read individual messages. But understanding email — knowing who matters, what relationships exist, what's happening in your life and business — requires investigation, cross-referencing, and memory. Agents can't do that in a single search.

Deepmail gives your AI agent 10 tools to investigate, analyze, and remember your email. It builds persistent knowledge that survives across sessions — so your agent actually knows you.

What your agent can do with Deepmail

You: "Who are my investors?"

Agent searches your Gmail for term sheets, fund communications, board emails.
Agent reads specific emails to understand deal details.
Agent cross-references names across rounds.
Agent builds a complete investor table — firms, key contacts, amounts, dates.

Next session, your agent already knows. No re-searching.

Install

pip install deep-email

Or run directly:

uvx deep-email setup

Configure your agent

Add to your project's .mcp.json:

{
  "mcpServers": {
    "deepmail": {
      "type": "stdio",
      "command": "uvx",
      "args": ["deep-email"]
    }
  }
}

Or use the CLI:

deep-email init   # writes .mcp.json for you

Install the skill (teaches your agent how to use the tools)

npx skills add dennisonbertram/deepmail

Works with Claude Code, Cursor, Codex, GitHub Copilot, Windsurf, Gemini CLI, and 40+ other agents.

Google Cloud Setup

Deepmail needs read-only access to your Gmail. You'll need a Google Cloud project with OAuth credentials (~10 min, one-time).

Step-by-step setup

1. Create a Google Cloud Project

2. Enable the Gmail API

3. Configure OAuth Consent Screen

  • Go to OAuth consent screen
  • Choose ExternalCreate
  • App name: anything. Support email: yours. Developer contact: yours.
  • ScopesAdd or Remove Scopes → find gmail.readonly → check it → UpdateSave
  • Test usersAdd Users → add your email → Save

Note: Your app starts in "Testing" mode. Tokens expire every 7 days — re-run deep-email auth when they do. For non-expiring tokens, submit your app for verification on the consent screen (optional for personal use).

4. Create Credentials

  • Go to Credentials
  • Create CredentialsOAuth client IDDesktop appCreate
  • Copy the Client ID

5. Set the credential

export GOOGLE_CLIENT_ID="your-id.apps.googleusercontent.com"

Or add to ~/.zshrc / ~/.bashrc for persistence.

Authenticate

deep-email auth

Opens your browser for Google consent. One-time setup. Read-only access — Deepmail never sends, modifies, or deletes email.

Tools

Tool What it does
search_emails(query) Search Gmail — returns sender, date, subject, snippet
read_email(message_id) Read the full body of a specific email
build_profile(query) Deep investigation — extracts people, builds profiles
build_status() Check progress of a running investigation
get_candidates() Review extracted candidates from latest investigation
who_is(person) Look up a person from cached knowledge
about_me(topic) What the agent knows about you, by topic
profile_health() Check how fresh the cached knowledge is
reset_profile(confirm) Wipe cached knowledge and start fresh
check_auth() Verify Gmail connection

How it works

  1. Your agent reads the skill and learns how to investigate email topics
  2. It searches your Gmail using search_emails — following leads, reading full emails when needed
  3. It builds profiles using build_profile — extracting people, relationships, and context
  4. Knowledge persistswho_is and about_me return cached results instantly in future sessions
  5. It gets smarter — each investigation adds to the persistent knowledge base

All data stays on your machine. The MCP server runs locally. No cloud storage, no telemetry.

Examples

"Figure out my investors" — Agent searches for term sheets, fund emails, board communications. Builds a table of investors across rounds with key contacts and amounts.

"Who's on my team?" — Agent searches internal comms, standup emails, shared docs. Maps your org with roles and last-contact dates.

"Tell me about my relationship with [person]" — Agent searches all correspondence, synthesizes a relationship summary with timeline.

"What should I know before my meeting with [person]?" — Agent pulls recent threads, open items, relationship context.

License

AGPL-3.0 — free to use, modify, and distribute. If you run it as a hosted service, you must release your source under the same license. See LICENSE.

Security

  • Read-only: Only gmail.readonly scope. Never sends, modifies, or deletes.
  • Local-first: All data on your machine. No cloud, no telemetry.
  • OAuth scoped: Minimum required permissions.
  • Wipe anytime: reset_profile(confirm="yes") deletes all cached data.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deep_email-0.2.0.tar.gz (628.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deep_email-0.2.0-py3-none-any.whl (191.6 kB view details)

Uploaded Python 3

File details

Details for the file deep_email-0.2.0.tar.gz.

File metadata

  • Download URL: deep_email-0.2.0.tar.gz
  • Upload date:
  • Size: 628.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for deep_email-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9a51878bc7a6ef1b6084afa30293bb4f1ef2b050462eb9f17e5ae8faee8bd766
MD5 b33c43c68c8d226a4045c1c251a268bc
BLAKE2b-256 46de7be0552076c8c30c74ed2f037cb31f0026bb9c58c3f5637d430933821310

See more details on using hashes here.

File details

Details for the file deep_email-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: deep_email-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 191.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for deep_email-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d89bf4bf420d7f2f06364510b2ddc655e5f016d5b6b1e8bdc74ff2422c0f11aa
MD5 d94a352af77fd7659e7a8838855c81d2
BLAKE2b-256 4a2aeb0a914fa7317c72cfd2d79caae36d76496a1320a009cdbc62b1087e6995

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page