About AtData SafeToSend MCP Server
AtData SafeToSend MCP Server connects MCP clients to AtData's SafeToSend API for checking individual or batches of email addresses. It returns verification details and includes handling for API errors and rate limits.
Key features
- 01Verify individual email addresses
- 02Verify email lists in batches
- 03Return verification details and summaries
- 04Handle API errors and rate limits
- 05Read API keys from environment variables
Use cases
- 01Check an address before adding it to a mailing list
- 02Review verification results for a batch of addresses
MCP support
It exposes `verify_email` and `batch_verify_emails` tools to MCP clients, using AtData's SafeToSend API to return verification results.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEAtData SafeToSend MCP Server
A Model Context Protocol (MCP) server that provides email verification services using AtData's SafeToSend API. This server allows you to verify email addresses to filter out invalid and high-risk ones, resulting in higher open rates, clicks, and conversions.
https://docs.atdata.com/reference/safe-to-send
Features
- Email Verification: Verify individual email addresses using AtData's SafeToSend API
- Batch Verification: Verify multiple email addresses at once with summary statistics
- Comprehensive Error Handling: Detailed error messages for different failure scenarios
- Environment Variable Support: Secure API key management through environment variables
- Rate Limiting Awareness: Proper handling of API rate limits
Installation
- Clone this repository:
git clone <repository-url>
cd atdata-mcp-server
- Install dependencies using uv (recommended) or pip:
# Using uv
uv sync
# Using pip
uv pip install .
Setup
Get AtData API Key
- Sign up for an AtData account at https://atdata.com
- Obtain your API key from the AtData dashboard
- Set up your API key as an environment variable:
export ATDATA_API_KEY="your-api-key-here"
Or create a .env file in the project root:
ATDATA_API_KEY=your-api-key-here
Usage
Running the Server
Method 1: Direct Python execution
python server.py
Method 2: Using FastMCP CLI
fastmcp run server.py
Method 3: Install for Claude Desktop
fastmcp install server.py
Using with uv
If you're using uv, you can also run the server with:
{
"mcpServers": {
"atdata-email-verification-mcp-server": {
"command": "uv",
"args": ["run", "python", "server.py"],
"cwd": "/path/to/your/atdata-email-verification-mcp-server",
"env": {
"ATDATA_API_KEY": "your_api_key_here"
}
}
}
}
Available Tools
1. verify_email
Verify a single email address.
Parameters:
email(string, required): The email address to verifyapi_key(string, optional): AtData API key (uses environment variable if not provided)
Example:
{
"email": "[email protected]",
"api_key": "your-api-key" # Optional if ATDATA_API_KEY is set
}
Response:
{
"success": True,
"email": "[email protected]",
"verification_result": {
"email": "[email protected]",
"status": "valid",
"deliverable": True,
"risk_level": "low",
# Additional verification details from AtData API
}
}
2. batch_verify_emails
Verify multiple email addresses in batch.
Parameters:
emails(array of strings, required): List of email addresses to verifyapi_key(string, optional): AtData API key (uses environment variable if not provided)
Example:
{
"emails": ["[email protected]", "[email protected]", "invalid@email"],
"api_key": "your-api-key" # Optional if ATDATA_API_KEY is set
}
Response:
{
"results": [
{
"success": True,
"email": "[email protected]",
"verification_result": { /* verification details */ }
},
{
"success": True,
"email": "[email protected]",
"verification_result": { /* verification details */ }
},
{
"error": "Bad request. Please check the email format.",
"email": "invalid@email",
"status_code": 400
}
],
"summary": {
"total": 3,
"successful": 2,
"failed": 1,
"success_rate": 66.67
}
}
Error Handling
The server provides comprehensive error handling for various scenarios:
- Missing API Key: Returns error when no API key is provided
- Authentication Errors: Handles invalid API keys (401 status)
- Bad Requests: Handles invalid email formats (400 status)
- Rate Limiting: Handles API rate limit exceeded (429 status)
- Network Issues: Handles connection errors and timeouts
- Unexpected Errors: Catches and reports any unexpected exceptions
API Documentation
This server is based on the AtData SafeToSend API. For more details about the underlying API, see:
Development
Project Structure
atdata-mcp-server/
├── src/
│ └── server.py # Main MCP server implementation
├── pyproject.toml # Project configuration and dependencies
├── uv.lock # Locked dependencies
└── README.md # This file
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
This project is licensed under the MIT License. See the LICENSE file for details.
Support
For issues related to:
- This MCP Server: Open an issue in this repository
- AtData API: Contact AtData support or check their documentation
- FastMCP Framework: Check the FastMCP documentation
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.