Email Verification MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Email Verification MCP Serververify the email address john.doe@example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Email Verification MCP Server
An MCP (Model Context Protocol) server that exposes a verify_email tool for AI agents and MCP clients to verify email addresses through a stxructured, type-safe interface.
1. Project Overview
This project implements an MCP server that wraps an email verification service (InboxValid) behind a clean tool interface. An AI agent or MCP client calls verify_email(address) and receives a structured response indicating whether the address is valid, invalid, risky, or encountered an error.
A mock InboxValid API is included so the entire system is self-contained and runnable without external dependencies.
Related MCP server: email-verify
2. Architecture
MCP Client / AI Agent
│
▼
┌─────────────────────┐
│ MCP Server │ ← Exposes verify_email tool via stdio
│ (src/server.ts) │
└────────┬────────────┘
│
▼
┌─────────────────────────┐
│ InboxValid Client │ ← HTTP client with retry/backoff
│ (services/ │
│ inboxValidClient.ts) │
└────────┬────────────────┘
│ HTTP POST /verify
▼
┌─────────────────────────┐
│ Mock InboxValid API │ ← Express.js server with deterministic rules
│ (mock-api/server.ts) │
└─────────────────────────┘Separation of concerns:
Layer | Responsibility |
| MCP protocol, tool registration |
| Input validation, orchestration |
| HTTP communication, retry logic |
| Zod schemas, TypeScript types |
| Simulated external API |
3. Tech Stack
Technology | Purpose |
Node.js | Runtime environment |
TypeScript | Type safety with strict mode |
MCP SDK | Model Context Protocol server implementation |
Zod | Runtime input/output validation |
Express.js | Mock InboxValid API server |
Vitest | Fast, modern test framework |
Docker | Containerized deployment |
4. Installation
git clone <repository-url>
cd email-verification-mcp
npm install
npm run build5. Running Locally
Start the Mock API
# Development (with hot reload)
npm run dev:mock-api
# Production (after build)
npm run start:mock-apiThe mock API starts on http://localhost:3001.
Start the MCP Server
In a separate terminal:
# Development
INBOXVALID_API_URL=http://localhost:3001 npm run dev:mcp
# Production (after build)
INBOXVALID_API_URL=http://localhost:3001 npm run start:mcpThe MCP server communicates over stdio (standard input/output), as required by the MCP protocol.
Environment Variables
Variable | Default | Description |
|
| Base URL of the InboxValid API |
|
| (Reserved for future HTTP transport) |
|
| Port for the mock API server |
Copy .env.example to .env and adjust as needed.
6. MCP Tool
verify_email
Description: Verify whether an email address is valid, invalid, or risky using the InboxValid verification service.
Input:
{
"address": "user@example.com"
}Output (success):
{
"address": "user@gmail.com",
"status": "valid",
"reason": "Mailbox appears deliverable"
}Output (error):
{
"address": "user@example.com",
"status": "error",
"reason": "Email verification service temporarily unavailable"
}Statuses:
Status | Meaning |
| Mailbox exists and is deliverable |
| Domain or mailbox does not exist |
| Temporary or disposable email detected |
| Verification service failure |
7. Error Handling
Scenario | Behavior |
Malformed email | Zod validation rejects it immediately; returns |
Mock API returns 4xx | Non-retryable; returns |
Mock API returns 5xx | Retries up to 3 times with exponential backoff |
Network error / timeout | Retries up to 3 times with exponential backoff |
Unexpected API response | Treated as an integration error; returns |
All retries exhausted | Returns |
Raw stack traces are never exposed through the MCP tool.
8. Retry Strategy
Transient failures (network errors, timeouts, HTTP 5xx) trigger automatic retries:
Attempt 1 → immediate
Attempt 2 → 500ms delay
Attempt 3 → 1000ms delayMaximum attempts: 3
Backoff: Linear (500ms × attempt number)
Non-retryable: 4xx client errors are returned immediately
Request timeout: 5 seconds per attempt
9. Testing
Run the full test suite:
npm testRun tests in watch mode during development:
npm run test:watchTest Coverage
Test | Description |
Valid email |
|
Invalid email |
|
Risky email (temp) |
|
Risky email (disposable) |
|
Malformed email |
|
Missing address |
|
Retry success | 1 failure then success → |
Retry exhaustion | 5 failures → |
Unreachable service | Bad port → |
Timeout handling | 1ms timeout → structured error |
10. Docker
Build and Run
docker compose up --buildThis starts two services:
Service | Role | Port |
| Mock InboxValid API | 3001 |
| MCP Server (stdio) | — |
The MCP server waits for the mock API health check before starting.
Stop
docker compose down11. Demo
GUI — MCP Inspector
The easiest way to interact with the server is the MCP Inspector web UI.
INBOXVALID_API_URL=http://localhost:3001 npx -y @modelcontextprotocol/inspector npx tsx src/server.tsServer Connected

Valid Email Result

Invalid Email Result

CLI — Pipe JSON-RPC via stdio
You can also test entirely from the command line by piping JSON-RPC messages into the MCP server:
Valid Email
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"verify_email","arguments":{"address":"user@gmail.com"}}}' | \
INBOXVALID_API_URL=http://localhost:3001 npx tsx src/server.tsInvalid Email
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"verify_email","arguments":{"address":"test@invalid-domain.test"}}}' | \
INBOXVALID_API_URL=http://localhost:3001 npx tsx src/server.tsRisky Email
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"verify_email","arguments":{"address":"temp@example.com"}}}' | \
INBOXVALID_API_URL=http://localhost:3001 npx tsx src/server.tsCLI — Direct curl (Mock API)
# Valid
curl -X POST http://localhost:3001/verify -H 'Content-Type: application/json' -d '{"email":"user@gmail.com"}'
# Invalid
curl -X POST http://localhost:3001/verify -H 'Content-Type: application/json' -d '{"email":"test@invalid-domain.test"}'
# Risky
curl -X POST http://localhost:3001/verify -H 'Content-Type: application/json' -d '{"email":"temp@example.com"}'
# Health check
curl http://localhost:3001/healthSimulate Failure & Retry
# Trigger 2 failures on the mock API
curl -X POST http://localhost:3001/admin/fail -H 'Content-Type: application/json' -d '{"count":2}'
# Then verify — the client retries and eventually succeeds
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"verify_email","arguments":{"address":"user@gmail.com"}}}' | \
INBOXVALID_API_URL=http://localhost:3001 npx tsx src/server.ts12. Design Decisions
Why separate the MCP server from the InboxValid client?
The MCP server handles protocol concerns (tool registration, input/output formatting). The InboxValid client handles HTTP communication, retry logic, and response validation. This separation:
Makes each layer independently testable
Allows swapping the mock API for a real InboxValid service with zero changes to the MCP layer
Keeps the retry/backoff logic encapsulated and reusable
Why structured responses instead of throwing errors?
The VerificationResult type always has address, status, and reason fields, even for errors. This means:
MCP clients always receive predictable JSON, never raw exceptions
Error handling is explicit and type-safe
The AI agent can reason about failures without parsing error messages
Why Zod for validation?
Zod provides runtime type checking that complements TypeScript's compile-time checking. The MCP SDK also integrates natively with Zod schemas for tool input validation.
Why a mock API instead of mocking fetch?
A real Express server running on a random port during tests exercises the full HTTP path, including serialization, headers, status codes, and network errors. This provides higher confidence than mocking fetch.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceEmail validation MCP server using MailboxValidator API to determine validity of an email address.3431MIT
- AlicenseAqualityBmaintenanceEnables real-time email verification via MCP tools, checking syntax, MX, disposable domains, and optional SMTP probe to determine deliverability with a VALID/RISKY/INVALID verdict.211MIT
- FlicenseAqualityBmaintenanceAn MCP server that exposes a verify_email tool for checking email syntax, disposable domains, and MX records, returning a structured validity result.1
- Flicense-qualityCmaintenanceAn MCP server that provides email verification, returning valid, invalid, or risky status with detailed checks and metadata. It enables verifying email addresses via a simple tool interface.
Related MCP Connectors
Emailable MCP — wraps the Emailable email verification API (emailable.com)
Verify emails — deliverability, disposable/role/free detection, MX validity, domain age.
Hunter.io MCP — wraps the Hunter.io email finder & verification API (hunter.io)
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/05tanish/email-verification-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server