# Quick Start Guide
Follow these steps to set up and test your MCP Email Server:
## Step 1: Install Dependencies
```bash
cd d:\repos\mcp_mail
pip install fastmcp sendgrid python-dotenv pydantic
```
Or install from pyproject.toml:
```bash
pip install -e .
```
## Step 2: Configure Environment
1. Copy the example environment file:
```bash
copy .env.example .env
```
2. Edit `.env` and add your SendGrid credentials:
```
SENDGRID_API_KEY=your_actual_api_key_here
DEFAULT_FROM_EMAIL=your-verified@email.com
DEFAULT_FROM_NAME=Your Name
```
## Step 3: Run Tests
Test the server with mocked SendGrid responses:
```bash
python test_server.py
```
## Step 4: Test with Real Email (Optional)
To send a real test email:
```bash
python test_server.py --send-real-email
```
## Step 5: Run the Server
Start the MCP server in stdio mode:
```bash
python server.py
```
The server will wait for MCP protocol messages via stdin/stdout.
## Step 6: Configure Client Application
### For Claude Desktop
Edit your Claude config file and add:
```json
{
"mcpServers": {
"email": {
"command": "python",
"args": ["d:\\repos\\mcp_mail\\server.py"],
"env": {
"SENDGRID_API_KEY": "your_key_here",
"DEFAULT_FROM_EMAIL": "your@email.com",
"DEFAULT_FROM_NAME": "Your Name"
}
}
}
}
```
### For Docker Deployment
Build and run:
```bash
docker build -t mcp-email-server .
docker run --env-file .env mcp-email-server
```
Or use Docker Compose:
```bash
docker-compose up -d
```
## Need Help?
- Check the [README.md](README.md) for detailed documentation
- Review [examples/langflow_integration.md](examples/langflow_integration.md) for Langflow integration
- Verify your SendGrid API key is valid
- Ensure your sender email is verified in SendGrid