resume-repo-sync
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@resume-repo-sync Generate resume bullet points from my GitHub repos"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
resume-repo-sync
基于 官方 Python MCP SDK(FastMCP) 的本地 MCP Server:
根据 GitHub 仓库的客观信号自动生成简历「项目经历」bullet,合并进已有 PDF 简历的结构化数据,并用 HTML 模板 + WeasyPrint 导出新 PDF。
设计原则
工具逻辑与 MCP 协议层分离(核心函数可脱离 MCP 单测)
依赖自包含:直接
requests调 GitHub REST,不套第三方 GitHub MCP只写可验证事实,禁止虚构「性能提升 50%」类指标
不持久化用户简历 / token;临时文件可过期清理
功能一览
# | Tool | 说明 |
1 |
| PDF → 结构化 |
2 |
| GitHub REST → |
3 |
| 客观技术要点 + |
4 |
| 按贡献级别 / 绝对提交量收敛措辞;negligible 可跳过整段项目 |
5 |
| 插入/覆盖项目(冲突 → |
6 |
| 项目粒度人类可读 diff |
7 |
| Jinja2 模板 + WeasyPrint → PDF( |
推荐调用顺序:
parse_resume
→ fetch_repo_info(github_username?)
→ analyze_repo_for_resume(github_username?, target_role?)
→ generate_bullet_points # 若 skip_project_entry 则不要 merge
→ merge_into_resume
→ diff_resume_versions
→ render_pdf(template=modern|compact)Related MCP server: cvmaker-mcp
架构
┌─────────────────────────────────────┐
│ MCP Client (Claude Desktop / │
│ Inspector / 其他 LLM Host) │
└─────────────────┬───────────────────┘
│ stdio
┌─────────────────▼───────────────────┐
│ server.py (FastMCP Tool 注册) │
│ 仅做参数校验 + envelope 序列化 │
└─────────────────┬───────────────────┘
│ 调用纯 Python 函数
┌──────────────┬──────────────┼──────────────┬──────────────┐
▼ ▼ ▼ ▼ ▼
resume/ github/ generation/ cleanup.py config.py
parser fetcher bullet_writer TTL / rmtree GITHUB_TOKEN
merge analyzer
diff
renderer ──► templates/{modern,compact}.html ──► WeasyPrint PDF分层收益:业务模块无 mcp import → pytest 直接测;换 transport(未来 HTTP)不必动分析/渲染逻辑。
项目结构
resume-repo-sync/
├── src/resume_repo_sync/
│ ├── server.py # FastMCP + Tool 注册(stdio)
│ ├── config.py # 环境变量 / TTL
│ ├── cleanup.py # 临时文件清理
│ ├── resume/
│ │ ├── schema.py # Pydantic 模型 + ToolErrorCode
│ │ ├── parser.py # pdfplumber 解析
│ │ ├── merge.py / diff.py
│ │ └── renderer.py # Jinja2 + WeasyPrint
│ ├── github/
│ │ ├── fetcher.py # REST:meta / languages / README /
│ │ │ # commits / contributors / deps
│ │ └── analyzer.py # 客观分析 + 贡献分级
│ └── generation/
│ └── bullet_writer.py # bullet 措辞(含 negligible 跳过)
├── templates/
│ ├── modern.html # 单栏宽松
│ └── compact.html # 双栏紧凑
├── scripts/e2e_demo.py
├── tests/
├── pyproject.toml
├── .env.example
└── README.md快速开始
1. 安装
需要 Python ≥ 3.11,推荐 uv:
cd resume-repo-sync
uv sync --extra devWeasyPrint(Windows)
winget install --id tschoonj.GTKForWindows --accept-package-agreements
# bin 通常在: C:\Program Files\GTK3-Runtime Win64\bin
# renderer 会自动探测;也可设 WEASYPRINT_GTK_BIN中文字体栈(两套模板共用):Microsoft YaHei / Noto Sans SC / SimSun。
本机验证:PDF 嵌入 Microsoft YaHei,pdfplumber 可提取「张三」「清华大学」等中文。
2. 配置
cp .env.example .env变量 | 说明 |
| 私有仓 / 提高 API 限额(可选) |
| managed 临时 PDF 根目录 |
| managed PDF 过期小时数(默认 24; |
| Windows GTK |
| 默认 |
3. 测试 / 演示 / 启动
uv run pytest -q
# 端到端(内置样例简历 + 真实公开仓)
uv run python scripts/e2e_demo.py
# MCP stdio
uv run resume-repo-sync
# Inspector
uv run mcp dev src/resume_repo_sync/server.py4. Claude Desktop(可选)
%APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"resume-repo-sync": {
"command": "uv",
"args": [
"--directory",
"C:\\Users\\admin\\Desktop\\resume-repo-sync",
"run",
"resume-repo-sync"
],
"env": { "GITHUB_TOKEN": "ghp_xxxxxxxx" }
}
}
}PDF 模板对比
两套模板都是 Jinja2 + 中文字体栈,通过 render_pdf(..., template="...") 切换;
未知名称返回 template_not_found(列出可用模板),不会静默回退默认模板。
维度 |
|
|
布局 | 单栏纵向流式 | 双栏:左轨(联系/技能/教育)+ 右主栏(工作/项目) |
页边距 | 约 1.6–1.8cm,留白较多 | 约 1.0–1.1cm,信息密度更高 |
字号层级 | 姓名 ~20pt,章节 ~12pt,正文 ~10.5pt | 姓名 ~16pt,章节小写标题 ~8.5pt,正文 ~8.5–9pt |
章节样式 | 粗下划线 | 大写细线 |
项目展示 | 每条 bullet 间距宽松,技术栈单独一行 |
|
适合场景 | 一页内项目不多、希望阅读舒适 | 内容多、希望压到一页 / ATS 友好密集版 |
调用示例:
render_pdf(resume_data, template="modern")
render_pdf(resume_data, template="compact")
render_pdf(resume_data, template="nope") → error_code=template_not_found在 templates/ 下新增 *.html 即可扩展;list_templates() / 错误详情会自动发现。
端到端示例
1) parse_resume(pdf_path)
2) fetch_repo_info(repo_url, github_username?)
3) analyze_repo_for_resume(repo_info, github_username?, target_role?)
→ contribution_level + absolute_contribution_signal
4) generate_bullet_points(analysis)
→ 若 skip_project_entry=true:不要 merge,按 recommendation 处理
5) merge_into_resume(...)
6) diff_resume_versions(old, new) # 人工确认
7) render_pdf(..., template="compact") # 或 modern实测(样例简历 + modelcontextprotocol/python-sdk)会在 diff 中看到类似:
+ 新增项目 [0] python-sdk
• 参与… / 使用 Python… / 项目获得 N GitHub Stars贡献分级(简历诚信)
占比 → contribution_level:
level | 条件 |
| ≥ 50% listed contributions |
| 20% – <50% |
| < 20% |
| 无数据 |
绝对次数 → absolute_contribution_signal(用于细分 minor 措辞):
signal | 绝对 listed contributions | minor 时 bullet |
| < 3 | 不生成完整项目条; |
| 3–19 | 「参与贡献 / 协助」 |
| ≥ 20 | 写明具体提交次数;仍禁止「主导/独立完成」 |
| 无数据 | 中性措辞 |
大仓里「占比低但提交多」与「几乎没贡献」不再混为一谈。
隐私与数据保留
数据 | 落盘? | 保留 |
用户简历 PDF | 只读,不复制 | 用户自管 |
解析 workdir | 系统 temp 私有目录 | 返回前必删(含异常 |
| 仅内存 / MCP 响应 | 进程结束即消失 |
|
| TTL(默认 24h)自动删 |
显式 | 调用方路径 | 永不自动删 |
| 环境变量 / | 不写日志 |
日志只记 ok/fail、basename、计数——不记简历正文、bullet、token。.gitignore 已屏蔽 .env、*.pdf、uploads/、output/、tmp/ 等。
设计决策(展示 / 面试)
自包含 GitHub REST,而不是嵌一层 GitHub MCP
错误语义可控(私有仓 / 限流 / 404 → 稳定ToolErrorCode),部署少一个进程。业务不写在
@mcp.tool里
普通函数可pytest;MCP 层只做 IO envelope。解析用启发式,不调 LLM
行为可预测、零额外 API 成本;极端版式用parse_warnings/raw_text交给上层模型兜底。WeasyPrint + Jinja2
排版与逻辑分离;加模板 = 加 HTML 文件,无需改 Python 分支。贡献分级驱动措辞
避免把「大仓里提过几个 PR」写成「独立主导」,保证可验证与诚信。
MCP Inspector 速查
uv run mcp dev src/resume_repo_sync/server.py模板切换:
render_pdf的template分别试modern、compact;再试does-not-exist→template_not_found。negligible:公开大仓 + 不存在的
github_username→skip_project_entry=true。冲突:
merge_into_resume同名且overwrite=false→project_already_exists。
License
MIT
Available Tools
7 toolsanalyze_repo_for_resumeA
从仓库客观数据提炼可用于简历的技术要点(不编造量化指标)。
什么时候该调用
fetch_repo_info 成功之后、generate_bullet_points 之前。
传入 github_username 以判定 contribution_level
(primary ≥50% / contributor 20–50% / minor <20% / unknown)。
Inputs: repo_info (required), target_role, github_username. Returns: object
diff_resume_versionsA
对比新旧 ResumeData,生成人类可读的变更摘要(项目粒度,类 git diff 风格)。
什么时候该调用
merge_into_resume 之后、render_pdf 之前,让用户确认改动。
覆盖
基本信息、项目经历(新增/删除/修改/重排)、工作/教育条目数、技能组变化。
Inputs: new (required), old (required). Returns: object
fetch_repo_infoA
通过 GitHub REST API 抓取仓库元数据、README、语言占比、近期 commit、依赖文件与贡献者统计。
什么时候该调用
用户给出 GitHub 仓库 URL(或 owner/repo)后调用。输出的 RepoInfo 供
analyze_repo_for_resume 使用。若已知用户的 GitHub login,一并传入
github_username,以便 contributor_stats 直接带上该用户的占比。
Inputs: repo_url (required), github_username. Returns: object
generate_bullet_pointsA
基于分析结果生成 2–3 条简历风格 bullet point。
什么时候该调用
analyze_repo_for_resume 成功之后、merge_into_resume 之前。
严格根据 analysis.contribution_level 选择动词强度;
minor 再按 absolute_contribution_signal 细分:
negligible → bullets 为空,
skip_project_entry=true,见 recommendationmoderate → 「参与贡献 / 协助」
substantial → 可写具体 commit 数,仍禁止「主导 / 独立完成」
Inputs: analysis (required), resume_style, style_reference. Returns: object
merge_into_resumeA
把新生成的项目经历插入到简历的 projects 列表(支持指定位置与覆盖)。
什么时候该调用
已有 ResumeData 和 bullet 列表之后,diff_resume_versions / render_pdf 之前。
行为
默认
position=0插到项目列表最前。若
project_name已存在且overwrite=false,返回error_code=project_already_exists,不会静默重复插入。overwrite=true时替换同名项目内容,并按position重新落位。
Inputs: new_bullets (required), resume_data (required), project_name (required), role, +4 more. Returns: object
parse_resumeA
解析本地 PDF 简历为结构化 JSON(姓名/联系方式/教育/工作/项目/技能)。
什么时候该调用
工作流的第一步:用户给出简历 PDF 路径后立刻调用。后续的 merge / render 都依赖这里产出的 ResumeData。
参数
pdf_path: 本地 PDF 的绝对或相对路径。
返回
成功: {"ok": true, "data": ResumeData, "error": null}
失败: {"ok": false, "data": null, "error": {error_code, message, details}}
Inputs: pdf_path (required). Returns: object
render_pdfA
用 Jinja2 HTML 模板 + WeasyPrint 把结构化简历渲染为 PDF,返回文件绝对路径。
什么时候该调用
用户确认 merge 结果(可用 diff_resume_versions)之后,作为工作流最后一步。
模板
modern:单栏宽松(默认)compact:双栏紧凑(左轨联系/技能/教育,右栏工作/项目)未知名称 →
error_code=template_not_found(列出可用模板,不静默回退)
注意
中文字体栈含微软雅黑 / Noto Sans SC。
默认写到 managed 临时目录(TTL 清理);显式
output_path不自动删除。Windows 上 WeasyPrint 依赖 GTK/Pango/Cairo;导入失败 →
render_failed。
Inputs: resume_data (required), template, output_path. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose and phase in the pipeline: parse extracts from PDF, fetch/analyze/generate handle repo→bullet transformation, merge inserts into resume, render outputs PDF, diff compares versions. The workflow is linear and each step is unambiguous.
All tools follow a clear verb_noun snake_case pattern (parse_resume, fetch_repo_info, analyze_repo_for_resume, generate_bullet_points, merge_into_resume, render_pdf, diff_resume_versions). The only minor deviation is that some verbs are single words (parse, fetch, render) while others are multi-word or conceptual (analyze_repo_for_resume, generate_bullet_points), but the pattern is otherwise highly consistent.
Seven tools is well-scoped for a resume-to-repo-sync pipeline. Each tool represents a distinct and necessary stage of the workflow, and none feel redundant or padding. The count is comfortably within the ideal range.
The pipeline covers the full lifecycle: parse input (parse_resume), external data ingestion (fetch_repo_info), analysis (analyze_repo_for_resume), content generation (generate_bullet_points), merging (merge_into_resume), verification (diff_resume_versions), and output (render_pdf). Minor gaps include no way to edit other resume sections (education/work) or remove projects, but the core sync workflow is complete.
Maintenance
Related MCP Connectors
Build, version and render resumes as PDFs from Claude or any MCP client.
A MCP server built for developers enabling Git based project management with project and personal…
Free open-source resume builder with remote MCP tools for resumes and job applications.
An MCP server that gives your AI access to the source code and docs of all public github repos
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceFrom markdown resume to formatted PDF, a MCP server that generates single-page PDF resumes with smart overflow detection and layered content reduction strategies-
- AlicenseAqualityDmaintenanceA local MCP server that bridges AI assistants with the CV Maker app to generate pixel-perfect CV PDFs.57 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server for processing Markdown resumes into multiple formats (PDF, LinkedIn templates) with AI analysis and Claude integration.MIT
- AlicenseAqualityDmaintenanceLocal MCP server that shapes tailored resume PDFs with live browser preview.5MIT