简历优化服务器

一个基于AI的简历优化服务,能够智能解析职位需求、分析简历匹配度并生成ATS优化的简历文档。

  • by Tzippykaplan
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 Tzippykaplan/job-search-mcp

使用说明

职位搜索MCP服务器

基于人工智能的现代求职简历定制

特性 • 快速开始 • 建筑 • 用法 • 发展


问题

你花了几个小时为每份工作申请定制简历。你永远不确定自己是否突出了正确的技能。ATS系统拒绝合格的候选人。 太累了。

解决方案

A. 模型上下文协议(MCP) 转换简历定制工作流程的服务器。只需提供一个工作URL和你的简历,人工智能代理就会提取需求,分析你的适合度,并生成一份ATS优化的简历 几秒钟内。同时保持对你经历的完全真实。

特性

智能作业解析

  • 从任何职位发布URL中提取结构化要求
  • 解析技术栈、经验水平和软技能
  • 退回到受保护站点的手动文本输入
  • 处理复杂、多部门的职位描述

智能简历匹配

  • 0-100兼容性评分
  • 确定您最强大的卖点
  • 突出体验差距和缺少的关键字
  • 提供可操作的改进建议

人工智能简历重写

  • 强调每项工作的相关经验
  • ATS优化的关键字放置
  • 保持你真实的声音和真实的内容
  • 生成详细的变更日志以提高透明度

专业DOCX导出

  • 干净、ATS友好的格式
  • 标准部分(经验、技能、教育)
  • 与所有主要ATS系统兼容
  • 一键下载

快速开始

先决条件

  • Python 3.12+ (下载)
  • Google Gemini API密钥 (获取免费密钥)
  • MCP兼容代理 (克劳德桌面、Codex CLI或自定义)

安装

# Clone the repository
git clone https://github.com/Tzippykaplan/job-search-mcp/
cd job-search-mcp

# Create and activate virtual environment
python -m venv .venv

# Windows
.venv\Scripts\activate

# Mac/Linux
source .venv/bin/activate

# Install the package
pip install -e .

# For development (includes pytest, black, ruff)
pip install -e ".[dev]"

配置

创建一个 .env 项目根目录中的文件:

GEMINI_API_KEY=your_gemini_api_key_here
LOG_LEVEL=INFO  # Optional: DEBUG, INFO, WARNING, ERROR

日志记录配置:

  • 控制台:INFO及以上(实时反馈)
  • 文件: logs/mcp-server.log (调试及以上,10MB旋转)

代理集成

克劳德桌面(推荐)

  1. 打开您的Claude Desktop MCP配置文件:

    • 视窗: %APPDATA%\Claude\claude_desktop_config.json
    • 苹果电脑: ~/Library/Application Support/Claude/claude_desktop_config.json
  2. 添加服务器配置:

{
  "mcpServers": {
    "job-search-mcp": {
      "command": "C:/Users/YourName/path/to/job-search-mcp/.venv/Scripts/python.exe",
      "args": ["-u", "C:/Users/YourName/path/to/job-search-mcp/src/job_mcp/server.py"],
      "cwd": "C:/Users/YourName/path/to/job-search-mcp",
      "env": {
        "GEMINI_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}
  1. 重要配置说明:
    • 使用 正斜杠(/) 即使在Windows上
    • 使用 绝对路径 到你的虚拟环境Python和 server.py
    • 替换 YourName 使用您的实际用户名
    • 更改后重新启动Claude Desktop

OpenAI Codex命令行界面

codex mcp add job-search-mcp -- \
  /path/to/.venv/Scripts/python.exe \
  -u /path/to/src/job_mcp/server.py

用法

简单的工作流程

自然地与您的AI代理交谈:

"I found this job: https://www.example.com/job-posting
Here's my resume: [paste or attach file]
Can you tailor my resume for this position?"

代理人将:

  1. 提取工作要求
  2. 分析你的契合度
  3. 重写你的简历
  4. 导出专业DOCX

高级用法

单一工具调用:

"What are my chances for this job?"
→ Calls match_resume_to_job, returns score and gaps

"Extract the requirements from this job posting"
→ Calls extract_job_requirements, returns structured data

"Rewrite my resume for this specific role"
→ Calls rewrite_resume_for_job, returns optimized version

工具管道

四个MCP工具按顺序工作:

extract_job_requirements
    ↓
match_resume_to_job
    ↓
rewrite_resume_for_job
    ↓
export_resume_docx

建筑

技术亮点

  • 异步架构 -快速、无阻塞I/O
  • 类型安全 -完整的Python 3.12+类型提示
  • 92单元测试 -全面的测试覆盖率
  • 速率限制 -API智能配额管理

设计理念

  • 分层架构 -工具→ 服务→ 适配器→ Utils
  • 真实的AI -从不创造虚假体验
  • ATS优化 -为申请人跟踪系统提供干净的DOCX输出

项目结构

src/job_mcp/
├── server.py                          # MCP server entry point
├── config.py                          # Configuration (model, limits, paths)
├── exceptions.py                      # Custom exception hierarchy
├── tools/                             # MCP tool wrappers
│   ├── extract_job_requirements_tool.py
│   ├── match_resume_to_job_tool.py
│   ├── rewrite_resume_for_job_tool.py
│   └── export_resume_docx_tool.py
├── services/                          # Business logic layer
│   ├── extract_job_requirements_service.py
│   ├── match_resume_to_job_service.py
│   ├── rewrite_resume_for_job_service.py
│   └── export_resume_docx_service.py
├── adapters/                          # External integrations
│   ├── gemini_client.py              # Gemini AI client
│   └── job_page_fetcher.py           # Job scraping (httpx + BeautifulSoup)
├── utils/                             # Shared utilities
│   ├── gemini_helpers.py             # JSON parsing, fence stripping
│   ├── read_resume.py                # Resume file readers (.txt, .md, .docx)
│   ├── export_resume_docx.py         # DOCX generation
│   ├── validation.py                 # Input validation
│   └── logger.py                     # Logging 
└── prompts/                           # LLM prompt templates (external files)
    ├── system_prompt.txt              # MCP agent system instructions
    ├── extract_job_requirements_prompt.txt   # Job parsing prompt
    ├── match_resume_prompt.txt               # Resume matching prompt
    └── rewrite_resume_prompt.txt             # Resume rewriting prompt

工具详细信息

提取工作要求

目的:将职位发布解析为结构化数据

输入:

  • job_url (可选):职位发布的URL
  • job_text (可选):原始职位描述文本

输出 (成功):

{
  "source": "job_url"|"job_text",
  "job_url": "https://..."|null,
  "extracted": {
    "title": "Senior Python Engineer"|null,
    "company": "TechCorp Inc."|null,
    "location": "Remote"|null,
    "years_experience": ["5+ years Python", "3+ years React"],
    "must_have_tech": ["Python", "React", "PostgreSQL"],
    "nice_to_have_tech": ["Docker", "Kubernetes"],
    "soft_skills": ["Communication", "Team leadership"],
    "notes": ["Remote with quarterly onsite meetings"]
  }
}

输出 (刮堵):

{
  "source": "job_url",
  "job_url": "https://...",
  "error": "blocked_by_site",
  "message": "Site blocked scraping (403) or empty page. Paste the job content into job_text instead."
}

将简历与工作匹配

目的:对简历匹配度进行评分,找出差距

输入:

  • job_requirements:输出 extract_job_requirements (或只是其“摘录”的格言)
  • resume_text (可选):以纯文本形式恢复内容
  • resume_file_path (可选):恢复文件的路径(.txt、.md、.docx)

输出:

{
  "score": 78,
  "matched_keywords": ["Python", "React", "AWS"],
  "missing_keywords": ["PostgreSQL", "Kubernetes"],
  "strengths": [
    "8 years Python experience (exceeds 5yr requirement)",
    "Led team of 6 engineers"
  ],
  "gaps": [
    "No PostgreSQL experience mentioned",
    "Limited Kubernetes background"
  ]
}

重写工作简历

目的:生成量身定制、真实的简历

输入:

  • job_requirements:输出 extract_job_requirements (或只是其“摘录”的格言)
  • match_result:输出 match_resume_to_job
  • resume_text (可选):以纯文本形式恢复内容
  • resume_file_path (可选):恢复文件的路径(.txt、.md、.docx)

输出:

{
  "sections": {
    "Summary": "Senior Full Stack Engineer with 8+ years...",
    "Skills": "Languages: Python, JavaScript, TypeScript\nFrameworks: React, Django...",
    "Experience": "Senior Software Engineer | TechCorp\n2020-Present\n• Developed...",
    "Projects": "E-commerce Platform\nPython, React, PostgreSQL\n• Built...",
    "Education": "B.S. Computer Science | MIT | 2015"
  },
  "rewritten_resume": "Summary\n\nSenior Full Stack Engineer with 8+ years...\n\nSkills\n...",
  "changes": [
    "Moved React and TypeScript to top of Skills section",
    "Emphasized Python projects in Experience section",
    "Rephrased team collaboration points to highlight leadership"
  ],
  "warnings": [
    "No Kubernetes experience - this is a must-have requirement",
    "Limited PostgreSQL background - consider adding database coursework"
  ]
}

将简历导出到DOCX

目的:创建ATS友好的Word文档

输入:

  • rewritten_resume:最终简历文本(通常来自 rewrite_resume_for_job_tool()["rewritten_resume"])
  • output_dir (可选):保存文件的目录(默认: "output_resumes")
  • file_name (可选):不带扩展名的基本文件名
  • add_timestamp (可选):附加时间戳以避免覆盖(默认值: true)

输出:

{
  "saved_path": "output_resumes/resume_2026-01-09_143052.docx",
  "output_dir": "output_resumes",
  "add_timestamp": true
}

特性:

  • 干净、ATS友好的格式
  • 文件名中的自动时间戳(可选)
  • 已保存到可配置目录

配置

中的关键设置 src/job_mcp/config.py:

  • GEMINI_MODEL -AI模型(默认值: gemini-2.5-flash)
  • GEMINI_MAX_REQUESTS_PER_MINUTE -速率限制(默认值: 60)
  • MAX_RESUME_LENGTH -最大简历大小(默认值: 16000 字符)
  • DEFAULT_OUTPUT_DIR -DOCX保存位置(默认值: output_resumes)

速率限制:自动API配额管理可防止节流。可配置的限制,跨实例共享。


发展

运行测试

pytest                    # Run all tests
pytest -v                 # Verbose output
pytest tests/unit/        # Specific suite
pytest --cov=src/job_mcp  # With coverage report

测试统计:

  • 92个单元测试
  • 83%的代码覆盖率
  • 所有测试均已通过

代码质量工具

该项目使用以下工具(安装时使用 pip install -e ".[dev]"):

pytest                    # Test runner
pytest-cov                # Coverage reporting

成本估算

使用 双子座2.5闪光灯 (截至2026年1月):

操作 代币(约) 成本
提取工作要求 ~2000 ~0.01美元
匹配简历 ~3000 ~0.02美元
重写简历 ~5000 ~0.04美元
每份申请总计 ~10,000 ~$0.07

备注:价格因地区而异。监控中的使用情况 谷歌人工智能工作室.


依赖项

核心依赖关系

包装 用途
beautifulsoup4 作业页面的HTML解析
google-genai 谷歌Gemini AI SDK
httpx 支持SSL的异步HTTP客户端
mcp[cli] 模型上下文协议框架
python-docx DOCX文件生成
python-dotenv 环境变量管理
truststore 系统SSL证书集成

发展依赖性

包装 用途
pytest 测试框架
black 代码格式
ruff 快速Python linter
pyright 类型检查

故障排除

缺少GEMINI_API_KEY

原因:未配置API密钥

解决方案:

  • 添加到 .env 项目根目录中的文件
  • 或添加到Claude Desktop配置 env 章节

服务器未出现在Claude桌面中

原因:配置问题或路径不正确

解决方案:

  1. 验证路径是否使用正斜杠(/)即使在Windows上
  2. 检查路径是绝对的,而不是相对的
  3. 配置更改后重新启动Claude Desktop
  4. 检查Claude Desktop日志中的错误消息
# Test server manually
python src/job_mcp/server.py

# Should show:
MCP Server starting...

由...制作❤️ 适合各地的求职者