Skip to main content
Glama
Resume Filter MCP Server

Resume Filter MCP Server

by xinmu-wyb

简历筛选 MCP 服务器

基于 Nest.js 开发的 Model Context Protocol (MCP) 服务器,用于从邮箱中智能筛选和排序简历。

功能特性

  • 📧 邮件集成: 自动从邮箱中提取简历附件

  • 📄 多格式支持: 支持 PDF、DOC、DOCX 格式的简历解析

  • 🔍 智能搜索: 基于关键词、职位、技能、经验等多维度搜索

  • 📊 智能排序: 支持按相关性、日期、经验、姓名排序

  • 📈 数据分析: 提供简历统计信息(按职位、经验、教育背景分布)

  • 🛠️ MCP 协议: 与 AI 助手(Claude、ChatGPT)无缝集成

  • 📝 完整日志: 文件日志和控制台日志

Related MCP server: BOSS 直聘 MCP Server

技术栈

  • 框架: Nest.js + TypeScript

  • MCP 协议: @modelcontextprotocol/sdk

  • 邮件处理: imap-simple

  • 文件解析: pdf-parse + mammoth

  • 数据验证: class-validator + class-transformer

  • 配置管理: @nestjs/config

安装

# 安装依赖
npm install

# 或使用 yarn
yarn install

配置

  1. 复制环境变量示例文件:

cp .env.example .env
  1. 编辑 .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 邮箱,需要:

  1. 登录 163 邮箱网页版:https://mail.163.com

  2. 进入"设置" → "POP3/SMTP/IMAP"

  3. 开启"IMAP/SMTP服务"

  4. 生成授权码(不是登录密码)

  5. 使用授权码作为 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!

Available Tools

6 tools
delete_resumeC

根据ID删除简历及其文件。

Inputs: id (required).

fetch_resumes_from_emailC

从邮箱中获取新的简历。可以指定时间范围和数量限制。

Inputs: since, limit.

get_all_resumesC

获取所有简历的列表。

Inputs: no named parameters.

get_resume_by_idC

根据ID获取单个简历的详细信息。

Inputs: id (required).

get_statisticsB

获取简历统计信息,包括总数、按职位分布、按经验分布、按教育背景分布。

Inputs: no named parameters.

search_resumesC

根据关键词、职位、技能、经验等条件搜索和排序简历。

Inputs: keyword, position, skills, minYearsOfExperience, +6 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: delete, fetch from email, list all, get by ID, get statistics, and search. The descriptions reinforce distinct actions on the resume domain, making misselection unlikely.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case (e.g., delete_resume, fetch_resumes_from_email, get_all_resumes). This predictability aids agent understanding and tool selection.

    Tool Count5/5

    With 6 tools, this server is well-scoped for resume management. Each tool serves a clear function (CRUD-like operations, fetching, searching, statistics), and the count is appropriate for the domain without being too sparse or bloated.

    Completeness4/5

    The tool set covers core operations for resume management: create (implied via fetch from email), read (get all, get by ID, search), delete, and analytics (statistics). A minor gap is the lack of an explicit update tool for modifying resumes, but agents can work around this by re-fetching or using other methods.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to automate BOSS直聘 recruitment tasks including candidate search, resume viewing, share link extraction, filtering, scoring, and report generation.
      167
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to automate recruiter-side hiring workflows by batch-searching candidates, capturing resume screenshots, extracting share links, filtering and scoring profiles, sending greetings, and exporting Markdown reports.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to automate recruiter workflows by batch-searching candidates, capturing and OCR-ing resume screenshots, scoring and filtering applicants, extracting share links, greeting candidates, and exporting Markdown reports.
      -