Resume Filter MCP Server
Enables AI assistants to intelligently fetch, parse, search, and rank resumes from email attachments. Supports multi-format resume parsing (PDF, DOC, DOCX), multi-dimensional searching by keywords, position, skills, and experience, with statistical analysis capabilities.
README
简历筛选 MCP 服务器
基于 Nest.js 开发的 Model Context Protocol (MCP) 服务器,用于从邮箱中智能筛选和排序简历。
功能特性
- 📧 邮件集成: 自动从邮箱中提取简历附件
- 📄 多格式支持: 支持 PDF、DOC、DOCX 格式的简历解析
- 🔍 智能搜索: 基于关键词、职位、技能、经验等多维度搜索
- 📊 智能排序: 支持按相关性、日期、经验、姓名排序
- 📈 数据分析: 提供简历统计信息(按职位、经验、教育背景分布)
- 🛠️ MCP 协议: 与 AI 助手(Claude、ChatGPT)无缝集成
- 📝 完整日志: 文件日志和控制台日志
技术栈
- 框架: Nest.js + TypeScript
- MCP 协议: @modelcontextprotocol/sdk
- 邮件处理: imap-simple
- 文件解析: pdf-parse + mammoth
- 数据验证: class-validator + class-transformer
- 配置管理: @nestjs/config
安装
# 安装依赖
npm install
# 或使用 yarn
yarn install
配置
- 复制环境变量示例文件:
cp .env.example .env
- 编辑
.env文件,配置邮件服务器信息:
# 邮件服务器配置
IMAP_HOST=imap.163.com
IMAP_PORT=993
IMAP_SECURE=true
IMAP_USER=your-email@163.com
IMAP_PASS=your-authorization-code
IMAP_MAILBOX=INBOX
# 其他配置...
163 邮箱配置说明
如果使用 163 邮箱,需要:
- 登录 163 邮箱网页版:https://mail.163.com
- 进入"设置" → "POP3/SMTP/IMAP"
- 开启"IMAP/SMTP服务"
- 生成授权码(不是登录密码)
- 使用授权码作为
IMAP_PASS,邮箱地址作为IMAP_USER
部署
详细的部署指南请参考 DEPLOYMENT.md,包含以下部署方式:
- ✅ 直接部署:适用于快速测试和开发
- ✅ PM2 部署:推荐用于生产环境,支持进程管理和自动重启
- ✅ Docker 部署:容器化部署,便于管理和扩展
- ✅ 系统服务部署:使用 systemd 实现开机自启
使用
开发模式
npm run start:dev
生产模式
# 构建
npm run build
# 运行
npm run start:prod
作为 MCP 服务器使用
在 Claude Desktop 或其他支持 MCP 的客户端中配置:
{
"mcpServers": {
"resume-filter": {
"command": "node",
"args": ["/path/to/mcp-resume/dist/src/main.js"]
}
}
}
注意: NestJS 构建后的文件在 dist/src/ 目录下,路径应该是 dist/src/main.js。
MCP 工具
服务器提供以下工具供 AI 助手调用:
1. fetch_resumes_from_email
从邮箱中获取新的简历。
参数:
since(可选): ISO 8601 格式的日期,获取此日期之后的邮件limit(可选): 最多获取的邮件数量,默认 50
示例:
{
"since": "2024-01-01T00:00:00Z",
"limit": 20
}
2. search_resumes
根据条件搜索和排序简历。
参数:
keyword(可选): 搜索关键词position(可选): 职位名称skills(可选): 技能数组minYearsOfExperience(可选): 最低工作年限maxYearsOfExperience(可选): 最高工作年限education(可选): 教育背景sortBy(可选): 排序方式 (relevance/date/experience/name)sortOrder(可选): 排序顺序 (asc/desc)limit(可选): 返回结果数量offset(可选): 分页偏移量
示例:
{
"keyword": "Java",
"position": "后端工程师",
"skills": ["Spring", "MySQL"],
"minYearsOfExperience": 3,
"sortBy": "relevance",
"limit": 20
}
3. get_resume_by_id
根据 ID 获取单个简历的详细信息。
参数:
id(必需): 简历 ID
4. get_all_resumes
获取所有简历的列表。
5. delete_resume
根据 ID 删除简历及其文件。
参数:
id(必需): 要删除的简历 ID
6. get_statistics
获取简历统计信息。
MCP 资源
服务器提供以下资源:
resume://all: 所有简历列表resume://statistics: 简历统计信息
项目结构
src/
├── common/ # 通用模块
│ ├── dto/ # 数据传输对象
│ ├── interfaces/ # 接口定义
│ └── logger/ # 日志服务
├── config/ # 配置
├── email/ # 邮件服务
├── mcp/ # MCP 服务器
├── parser/ # 文件解析
├── resume/ # 简历服务
├── search/ # 搜索服务
├── app.module.ts # 应用模块
└── main.ts # 入口文件
搜索算法
搜索使用多维度评分系统:
- 关键词匹配 (30%): 在姓名、职位、摘要、技能中搜索
- 职位匹配 (25%): 职位名称匹配
- 技能匹配 (20%): 技能列表匹配
- 经验匹配 (15%): 工作年限匹配
- 教育背景 (10%): 教育背景匹配
最终分数在 0-1 之间,分数越高表示匹配度越高。
日志
日志文件保存在 ./logs 目录下,按日期命名(例如:app-2024-01-01.log)。
可以通过环境变量配置日志级别和文件设置。
开发
# 代码格式化
npm run format
# 代码检查
npm run lint
# 运行测试
npm test
许可证
MIT
贡献
欢迎提交 Issue 和 Pull Request!
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.