README
🚀 RevenueBase MCP 服务器
RevenueBase MCP 服务器是一个模型上下文协议(MCP)服务器,它提供对 RevenueBase 业界领先的电子邮件验证 API 的访问。该服务器使 AI 助手和应用程序能够以超过 99% 的准确率验证商业电子邮件,包括通配域名和受防火墙保护的域名。
✨ 主要特性
- 实时电子邮件验证:即时验证单个电子邮件地址。
- 批量电子邮件处理:提交并处理大量电子邮件列表。
- 流程管理:监控、取消和跟踪批量处理作业。
- 信用管理:检查剩余的 API 信用额度。
- API 密钥管理:生成新的 API 密钥。
- 高准确率:B2B 电子邮件验证准确率超过 99%。
- 通配域名支持:验证其他工具无法处理的通配电子邮件域名。
- 防火墙绕过:绕过 Mimecast 和 Barracuda 等电子邮件防火墙。
📚 关于 RevenueBase
RevenueBase 为 B2B 数据提供商提供业界领先的电子邮件验证服务。凭借验证通配域名和受防火墙保护的域名的能力,RevenueBase 确保在其他服务不足的地方实现最高的准确性。
了解更多关于 RevenueBase 的电子邮件验证服务,请访问:https://revenuebase.ai/email-list-cleaning/
📦 安装指南
- 克隆此仓库:
git clone https://github.com/avivshafir/revenuebase-mcp-server
cd revenuebase-mcp-server
- 使用 uv 安装依赖项:
uv sync
- 设置你的 RevenueBase API 密钥:
export REVENUEBASE_API_KEY="your_api_key_here"
💻 使用示例
基础用法
启动服务器
python server.py
服务器将启动并可用于 MCP 连接。
与 MCP 客户端配合使用
Claude Desktop
要在 Claude Desktop 中使用此服务器,请将以下配置添加到你的 Claude Desktop 配置文件中:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"revenuebase": {
"command": "uv",
"args": ["--directory", "/path/to/revenuebase-mcp-server", "run", "python", "server.py"],
"env": {
"REVENUEBASE_API_KEY": "your_api_key_here"
}
}
}
}
将 /path/to/revenuebase-mcp-server 替换为你克隆的仓库的实际路径,并将 your_api_key_here 替换为你实际的 RevenueBase API 密钥。
其他 MCP 客户端
对于其他 MCP 客户端,你可以使用 stdio 传输连接到服务器。该服务器作为标准的 MCP 服务器运行,并通过 stdin/stdout 接受连接。
使用 MCP Python SDK 的示例:
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
server_params = StdioServerParameters(
command="python",
args=["server.py"],
env={"REVENUEBASE_API_KEY": "your_api_key_here"}
)
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
# 初始化连接
await session.initialize()
# 列出可用工具
tools = await session.list_tools()
print("可用工具:", [tool.name for tool in tools.tools])
# 调用工具
result = await session.call_tool("real_time_email_verification", {
"email": "test@example.com"
})
print("验证结果:", result)
高级用法
可用工具
1. 实时电子邮件验证
即时验证单个电子邮件地址。 参数:
email(字符串):要验证的电子邮件地址。 示例:
real_time_email_verification("user@example.com")
2. 批量电子邮件提交
提交文件引用以进行批量电子邮件处理。 参数:
filename(字符串):用于批量处理的文件名引用。 示例:
batch_email_submission("email_list.csv")
3. 批量处理状态
检查批量电子邮件处理作业的状态。 参数:
process_id(整数):批量处理作业的 ID。 示例:
batch_process_email_status(12345)
4. 排队进程
列出所有排队的电子邮件批量处理作业。 示例:
queued_process()
5. 取消进程
取消正在进行或排队的批量电子邮件处理作业。 参数:
process_id(整数):要取消的进程的 ID。 示例:
cancel_process(12345)
6. 获取信用额度
检索你的账户剩余的信用额度。 示例:
get_credits()
7. 生成新 API 密钥
生成并返回一个新的 API 密钥。 示例:
new_api_key()
📚 详细文档
配置
环境变量
REVENUEBASE_API_KEY:你的 RevenueBase API 密钥(必需)。
API 端点
服务器连接到以下 RevenueBase API 端点:
https://api.revenuebase.ai/v1/process-email- 实时电子邮件验证https://api.revenuebase.ai/v1/batch-process-email- 批量电子邮件提交https://api.revenuebase.ai/v1/batch-process-email-status- 批量状态检查https://api.revenuebase.ai/v1/queued-process- 列出排队进程https://api.revenuebase.ai/v1/cancel-process- 取消进程https://api.revenuebase.ai/v1/credits- 获取信用额度https://api.revenuebase.ai/v1/new-api-key- 生成新 API 密钥
错误处理
所有工具都包含适当的错误处理,如果未配置 API 密钥,将引发 RuntimeError。RevenueBase API 的 HTTP 错误将使用 requests.raise_for_status() 自动引发。
要求
- Python 3.7+
- fastmcp
- requests
📄 许可证
本项目采用 MIT 许可证 - 有关详细信息,请参阅 LICENSE 文件。
🛠️ 支持
如需 RevenueBase API 支持和文档,请访问:
如果此 MCP 服务器出现问题,请在此仓库中提交问题。
Scan to join WeChat group