Skip to main content
Glama
ravinahp

Email Checker MCP Server

by ravinahp

verify_email

Check email address validity using the 2ip.me API to confirm existence and deliverability before sending messages.

Instructions

Verify an email address using the 2ip.me API.

Args:
    email (str): The email address to verify

Returns:
    str: "true" or "false" indicating if the email is valid

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYes

Implementation Reference

  • MCP tool handler for 'verify_email', decorated with @mcp.tool(). Delegates to EmailValidatorAPI.verify_email. Includes input/output schema via type hints and docstring.
    @mcp.tool()
    async def verify_email(email: str) -> str:
        """
        Verify an email address using the 2ip.me API.
    
        Args:
            email (str): The email address to verify
    
        Returns:
            str: "true" or "false" indicating if the email is valid
        """
        return await api.verify_email(email)
  • Core helper method implementing the email verification logic by calling make_request and handling the result.
    async def verify_email(self, email: str) -> str:
        """Verify an email address."""
        result = await self.make_request(email)
        if result is None:
            return "Error: Unable to verify email"
        return result 
  • Supporting utility that makes the HTTP request to the 2ip.me API endpoint for email verification.
    async def make_request(self, email: str) -> str | None:
        """Make a request to the 2ip.me API with proper error handling."""
        url = f"{self.api_base}?email={email}"
        
        async with httpx.AsyncClient() as client:
            try:
                response = await client.get(url, timeout=30.0)
                response.raise_for_status()
                return response.text.strip()
            except Exception as e:
                logger.error(f"API request failed: {str(e)}")
                return None
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ravinahp/email-checker-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server