Provides email and phone validation tools through Abstract API services, including email format validation, deliverability checking, phone number validation for 190+ countries, and email reputation analysis with security insights.
Abstract API MCP Server
A Model Context Protocol (MCP) server that provides email and phone validation tools using Abstract API services. This server is built with FastMCP, making it easy to integrate validation capabilities into AI applications and workflows.
Overview
This MCP server exposes three main validation tools:
- Email Validation: Comprehensive email address validation and verification
- Phone Validation: Phone number validation for 190+ countries
- Email Reputation: Advanced email reputation analysis with security insights
Features
Email Validation
- Format validation
- Deliverability checking
- Domain verification
- SMTP validation
- Detection of disposable/role/catchall emails
- Quality scoring
Phone Validation
- International phone number validation
- Format standardization (international/local)
- Country and carrier identification
- Phone type detection (mobile, landline, etc.)
- Location information
Email Reputation
- Comprehensive deliverability analysis
- Quality scoring and risk assessment
- Sender and organization identification
- Domain security analysis (DMARC, SPF)
- Data breach history tracking
- Fraud and abuse detection
Prerequisites
- Python 3.11+
- uv (fast Python package installer)
- Abstract API key (get one at abstractapi.com)
Installation
Option 1: Using uv (Recommended)
- Clone the repository:
- Create virtual environment and install dependencies:
- Set up environment variables:
Option 2: Using traditional pip
- Clone the repository:
- Create a virtual environment:
- Install dependencies:
- Set up environment variables:
Your .env
file should contain:
Usage
Running the MCP Server
The server can be run in stdio mode for integration with MCP clients:
FastMCP Framework
This server is built using FastMCP, a Python framework that simplifies MCP server development. FastMCP provides:
- Automatic tool registration: Functions decorated with
@mcp.tool()
are automatically exposed as MCP tools - Type safety: Full type hints and validation
- Easy async support: Native async/await support
- Simplified server setup: Minimal boilerplate code
Key FastMCP Concepts
Available Tools
1. Email Validation (verify_email
)
Validates email addresses and returns comprehensive information.
Parameters:
email
(str): Email address to validate
Example Response:
2. Phone Validation (validate_phone
)
Validates phone numbers from 190+ countries.
Parameters:
phone
(str): Phone number to validatecountry
(str, optional): ISO country code for context
Example Response:
3. Email Reputation (check_email_reputation
)
Provides comprehensive email reputation analysis including security insights and breach history.
Parameters:
email
(str): Email address to analyze
Example Response:
Integration with MCP Clients
Add this server to your mcp configuration:
Alternatively, if you prefer to use the traditional approach:
Other MCP Clients
This server follows the standard MCP protocol and can be integrated with any MCP-compatible client. The server communicates via stdio transport.
Error Handling
The server includes comprehensive error handling:
- API Key Validation: Checks for missing API keys
- HTTP Error Handling: Proper handling of API response errors
- Input Validation: Type checking and parameter validation
- Graceful Degradation: Meaningful error messages for debugging
API Rate Limits
Abstract API has different rate limits based on your plan:
- Free plans: 1 request per second
- Paid plans: Higher rate limits available
Each API call counts as one credit, regardless of whether the validation succeeds or fails.
Development
Project Structure
Adding New Tools
To add new Abstract API tools:
- Add the API endpoint URL as a constant
- Create a new function decorated with
@mcp.tool()
- Add comprehensive docstring with parameter and return descriptions
- Implement error handling following the existing pattern
Example:
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
- Abstract API: Contact Abstract API support
- FastMCP framework: Check the FastMCP documentation
Acknowledgments
- Abstract API for providing the validation services
- FastMCP for the MCP server framework
- Model Context Protocol for the protocol specification
Related MCP Servers
- AsecurityFlicenseAqualityAn MCP server implementation that enables interaction with the Unstructured API, providing tools to list, create, update, and manage sources, destinations, and workflows.Last updated -3928
- -securityAlicense-qualityGenerate an MCP server for any OpenAPI documented endpoint.Last updated -201GoApache 2.0
- Python
- PythonMIT License