MCP ExplorerExplorer

Claude Email Mcp

@wesly-michelon 10 months ago
1 MIT
FreeCommunity
AI Systems
A Message Control Protocol (MCP) that allows Claude to send emails on your behalf using Amazon SES and read emails via Zoho Mail API.

Overview

What is Claude Email Mcp

claude-email-mcp is a Message Control Protocol (MCP) that enables Claude to send emails on your behalf using Amazon SES and to read emails via the Zoho Mail API.

Use cases

Use cases include automating email responses for customer inquiries, sending promotional emails to clients, and managing personal email correspondence efficiently.

How to use

To use claude-email-mcp, clone the repository, configure the necessary secrets in AWS Secrets Manager, store your API key in AWS Systems Manager Parameter Store, and deploy the MCP using the Serverless Framework.

Key features

Key features include sending emails via Amazon SES, saving email drafts, retrieving unread emails from Zoho Mail, secure API key authentication, and using DynamoDB for storing email metadata.

Where to use

claude-email-mcp can be used in various fields such as customer support, automated email notifications, and personal email management.

Content

Claude Email MCP

A Message Control Protocol (MCP) that allows Claude to send emails on your behalf using Amazon SES and read emails via Zoho Mail API.

Features

  • Send emails via Amazon SES
  • Save email drafts for later review
  • Retrieve and read unread emails from Zoho Mail
  • Secure API key authentication
  • DynamoDB for storing email metadata

Prerequisites

  • AWS Account
  • Node.js 14.x or later
  • Serverless Framework
  • Zoho Mail account with API access
  • Amazon SES verified domain

Setup Instructions

1. Clone the repository

git clone <repository-url>
cd claude-email-mcp
npm install

2. Configure Secrets

Create a secret in AWS Secrets Manager with the following structure:

{
  "apiKey": "your-api-key-for-claude",
  "emailFrom": "[email protected]",
  "zohoRefreshToken": "your-zoho-refresh-token",
  "zohoClientId": "your-zoho-client-id",
  "zohoClientSecret": "your-zoho-client-secret",
  "zohoAccountId": "your-zoho-account-id"
}

Name the secret claude-mcp-secrets-dev for dev environment or claude-mcp-secrets-prod for production.

3. Store API Key in Parameter Store

Store your API key in AWS Systems Manager Parameter Store:

aws ssm put-parameter --name /claude-mcp/api-key-dev --type SecureString --value "your-api-key"

4. Deploy the MCP

# Deploy to dev environment
npm run deploy

# Or deploy to production
npm run deploy:prod

5. Note the API Gateway endpoints

After deployment, the Serverless Framework will output the API Gateway endpoints. You’ll need these to configure Claude to use the MCP.

API Reference

Send Email

Endpoint: POST /email

Headers:

  • x-api-key: Your API Key

Request Body:

{
  "to": [
    "[email protected]"
  ],
  "subject": "Email Subject",
  "body": "Email content",
  "isHtml": false,
  "cc": [],
  "bcc": [],
  "isDraft": false
}

Response:

{
  "message": "Email sent successfully",
  "emailId": "uuid",
  "messageId": "ses-message-id"
}

Get Drafts

Endpoint: GET /drafts

Headers:

  • x-api-key: Your API Key

Query Parameters:

  • source: “local” or “zoho” (default: “local”)
  • limit: Number of drafts to retrieve (default: 10)

Response:

{
  "drafts": [
    {
      "id": "draft-id",
      "subject": "Draft Subject",
      "to": [
        "[email protected]"
      ],
      "createdAt": "2023-08-22T14:30:00Z",
      "body": "Draft content"
    }
  ],
  "count": 1,
  "source": "local"
}

Get Unread Emails

Endpoint: GET /emails/unread

Headers:

  • x-api-key: Your API Key

Query Parameters:

  • limit: Number of emails to retrieve (default: 10)
  • content: Whether to fetch full email content (default: false)

Response:

Using with Claude

To use this MCP with Claude, you’ll need to provide Claude with:

  1. The API Gateway endpoints
  2. The API key for authentication
  3. Instructions on how to format requests

Example instruction to Claude:

You can send emails on my behalf using the following MCP:

- Send Email: POST https://your-api-gateway.amazonaws.com/dev/email 
- Get Drafts: GET https://your-api-gateway.amazonaws.com/dev/drafts
- Get Unread Emails: GET https://your-api-gateway.amazonaws.com/dev/emails/unread

Please use this API key in the x-api-key header: your-api-key

When I ask you to send an email, please format it properly and send it to the specified recipients.

Development

For local development, you can use the serverless-offline plugin:

npm run offline

This will start a local server that emulates API Gateway and Lambda.

Security Considerations

  • Keep your API key and secrets secure
  • Use IAM roles with least privilege
  • Consider adding rate limiting
  • Implement logging and monitoring
  • Regularly rotate credentials

License

MIT

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers