Email Verification MCP Server
An 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.
README
Email Verification MCP Server
A TypeScript MCP server that exposes a clean, well-typed verify_email tool for email verification.
The tool returns a structured result that an agent can consume:
validinvalidriskyreason- individual check results
- metadata such as domain, provider, cache status, and lookup latency
It also includes a simple human-friendly CLI mode for demos, testing, and Loom recordings.
What This Project Does
This project implements Option A: MCP server.
It provides an MCP server over STDIO with the following tools:
| Tool | Purpose |
|---|---|
verify_email |
Verifies an email address and returns valid, invalid, or risky with a reason |
mcping |
Confirms that the server is alive |
mchelp |
Shows help for available tools and topics |
The main required tool is:
verify_email({
email: "test@gmail.com"
})
Highlights
- MCP-ready: Uses the official
@modelcontextprotocol/serverpackage. - Well-typed interface: Input and output schemas are defined with Zod.
- Structured output: Returns machine-readable
structuredContentfor agents. - Readable output: Returns clear text output for humans.
- Simple CLI demo mode: Run
npm run verify -- test@gmail.cominstead of writing raw JSON-RPC. - Validation pipeline: Syntax, domain, MX, and disposable-provider checks.
- Mock backend support: Includes a deterministic backend layer suitable for local testing.
- STDIO-safe logging: MCP mode keeps stdout clean for JSON-RPC transport.
Quick Start
cd /Users/satvikkesarwani/Desktop/tvaram
npm install
npm run build
Loom Demo Commands
Use these commands to quickly prove the system is ready.
1. Build the project
npm run build
2. Verify a valid email
npm run verify -- test@gmail.com
Expected style of output:
Email Verification Result
=========================
Email: test@gmail.com
Verdict: VALID - Safe to send
Reason: Email appears valid
Checks
------
Syntax: PASS
Domain exists: PASS
MX records: PASS
Disposable address: PASS - not disposable
Details
-------
Domain: gmail.com
Provider: not detected
Cached result: no
Lookup time: 1 ms
Recommendation
--------------
This address passed the available checks. It looks suitable for normal outreach.
3. Verify a risky disposable email
npm run verify -- test@guerrillamail.com
This should return a RISKY verdict because the domain is a known disposable email provider.
4. Verify an invalid email
npm run verify -- invalid-email
This should return an INVALID verdict because the email syntax is wrong.
5. Ping the server
npm run ping
This confirms the server package is responding.
CLI Usage
The project supports short CLI commands for human testing:
npm run verify -- test@gmail.com
npm run verify -- test@guerrillamail.com
npm run verify -- invalid-email
npm run ping
npm run help
You can also run the compiled file directly:
node build/index.js verify_email test@gmail.com
node build/index.js verify test@gmail.com
node build/index.js mcping
node build/index.js mchelp verify_email
Run without arguments to start the actual MCP server:
npm start
MCP Tool Interface
Tool Name
verify_email
Input Schema
{
email: string;
options?: {
checkMx?: boolean;
checkDisposable?: boolean;
timeoutMs?: number;
};
}
Output Schema
{
email: string;
status: "valid" | "invalid" | "risky";
reason: string;
checks: {
syntax: boolean;
domain: boolean;
mx?: boolean;
disposable?: boolean;
};
metadata: {
domain: string;
provider?: string;
cached: boolean;
latencyMs: number;
};
}
Example Structured Result
{
"email": "test@gmail.com",
"status": "valid",
"reason": "Email appears valid",
"checks": {
"syntax": true,
"domain": true,
"mx": true,
"disposable": true
},
"metadata": {
"domain": "gmail.com",
"cached": false,
"latencyMs": 1
}
}
How MCP Clients Use It
The server uses STDIO transport. MCP clients should start it with:
node build/index.js
Example client configuration:
{
"mcpServers": {
"email-verifier": {
"command": "node",
"args": ["/Users/satvikkesarwani/Desktop/tvaram/build/index.js"]
}
}
}
The simple CLI commands are only for humans and demos. The MCP server mode remains available when the file is started without CLI arguments.
Available Scripts
| Command | Description |
|---|---|
npm run build |
Compiles TypeScript into build/ |
npm start |
Starts the MCP server over STDIO |
npm run verify -- <email> |
Runs human-friendly email verification |
npm run ping |
Runs a quick server status check |
npm run help |
Shows CLI help |
npm test |
Runs the test command |
npm run lint |
Runs the lint command |
Verification Flow
1. Normalize the email address
2. Check the in-memory cache
3. Validate email syntax
4. Extract and validate the domain
5. Check MX records when enabled
6. Check disposable email providers when enabled
7. Fall back to the mock backend when needed
8. Return both readable text and structured content
Project Structure
tvaram/
├── src/
│ ├── config/
│ │ └── index.ts
│ ├── services/
│ │ ├── cache.ts
│ │ ├── mock-backend.ts
│ │ ├── retry.ts
│ │ └── verification.ts
│ ├── types/
│ │ ├── errors.ts
│ │ └── verification.ts
│ ├── utils/
│ │ ├── dns.ts
│ │ └── logger.ts
│ ├── validation/
│ │ ├── disposable.ts
│ │ ├── domain.ts
│ │ ├── pipeline.ts
│ │ └── syntax.ts
│ └── index.ts
├── build/
├── package.json
├── tsconfig.json
└── README.md
Configuration
Configuration lives in:
src/config/index.ts
Current defaults:
| Area | Setting | Default |
|---|---|---|
| Server | name | email-verifier |
| Server | version | 1.0.0 |
| DNS | timeout | 2000 ms |
| DNS | retries | 1 |
| Cache | max size | 10000 |
| Cache | TTL | 1 hour |
| Retry | max attempts | 3 |
| Circuit breaker | threshold | 5 failures |
| Circuit breaker | reset timeout | 30 seconds |
| Mock backend | error rate | 0.01 |
Design Notes
- The MCP server writes protocol responses to stdout.
- Logs are written to stderr so JSON-RPC messages are not corrupted.
- CLI mode silences logs for clean human-readable output.
- Zod schemas keep the tool input and output explicit and agent-friendly.
- The verification backend is mockable so the MCP interface can be tested without depending on a paid or external verification API.
Limitations
- This is not full SMTP mailbox verification.
- DNS behavior can vary by network and resolver.
- Disposable detection depends on the embedded blocklist.
- The mock backend is deterministic and useful for testing, but it is not a production deliverability provider.
Submission Summary
This project satisfies the assignment requirement:
An MCP server exposing at least one tool, for example
verify_email(address), returning a structured result:valid,invalid, orriskyplus a reason.
The implementation includes:
- MCP server over STDIO
verify_emailtool- Zod input/output schemas
- structured agent-readable result
- readable human output
- CLI demo commands
- TypeScript build setup
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。