简历定制服务

一个基于Claude的MCP服务器,用于根据职位描述定制LaTeX简历,提供结构化差异报告,不改变格式或添加新内容。

  • by nishtobehonest
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 nishtobehonest/latex-resume-tailor-mcp

使用说明

简历定制-MCP服务器

一个MCP服务器,使用Claude根据职位描述定制您的LaTeX简历。 它返回一个结构化的差异——关键字、差距摘要、项目符号更改前后, 一份护栏报告——不涉及你的格式或发明新的事实。


运作原理

You (or Claude Desktop)
        │
        │  job_description + resume_content
        ▼
  tailor_resume tool  ←── this server
        │
        │  calls Claude Sonnet with a constrained system prompt
        ▼
  structured JSON response
        │
        ├── jd_keywords        top 3–5 repeated JD terms
        ├── gap_summary        skills JD wants that aren't in your resume
        ├── bullet_changes     before/after for each modified bullet only
        ├── skills_changes     before/after for skills section (or null)
        ├── guardrails_report  model's self-audit (new claims, removed metrics)
        └── validation         5 deterministic checks run after the LLM response

它永远不会做什么:

  • 添加简历中没有的经验、指标或技能
  • 删除数字或百分比
  • 更改LaTeX命令或文档结构
  • 重写你没有要求它触摸的子弹

项目结构

server.py           MCP server — exposes hello and tailor_resume tools
client.py           Standalone MCP client (learning exercise / smoke test)
prompts.py          System prompt that constrains Claude's output
guardrails.py       Post-LLM validation (5 deterministic safety checks)
test_guardrails.py  Offline unit tests for the guardrails module
pyproject.toml      Project config and dependencies
.env                Your ANTHROPIC_API_KEY (never committed)

设置

1.克隆并安装

git clone <your-repo-url>
cd MCP_push1
uv sync

2.添加您的API密钥

创建一个 .env 文件:

ANTHROPIC_API_KEY=sk-ant-...

获取钥匙https://console.anthropic.com → API密钥。

3.在MCP检验员中进行测试

uv run mcp dev server.py

打开它打印的URL。您将看到两个工具: hello 和 tailor_resume.

4.进行离线护栏测试

uv run python test_guardrails.py

连接到克劳德桌面

将此添加到 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "resume-tailor": {
      "command": "/Users/your-username/.local/bin/uv",
      "args": [
        "--directory",
        "/path/to/MCP_push1",
        "run",
        "server.py"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-..."
      }
    }
  }
}

为什么是完整的路径? Claude Desktop在最小的环境中创建服务器 它可能没有你的shell PATH。需要完整的路径。

保存后重新启动Claude Desktop。这 resume-tailor 服务器将出现 在连接器列表中。


用法

通过克劳德桌面

连接后,问克劳德:

“使用tailor_resume工具。这是职位描述:[粘贴JD]。 这是我的简历:[粘贴LaTeX]。"

Claude将自动调用该工具并向您解释结果。

JD摄入模式

来源 如何使用
粘贴文本 复制JD文本,直接传递
URL 打开页面,复制所有文本,粘贴
PDF 打开PDF,复制文本,粘贴

该工具接受纯文本输入。Claude Desktop还可以读取URL和PDF 从上下文窗口中,将提取的文本传递给工具。


输出格式

{
  "jd_keywords": ["Python", "ETL", "SQL"],
  "gap_summary": "No evidence of distributed systems experience.",
  "bullet_changes": [
    {
      "section": "Acme Corp / Data Engineer",
      "before": "\\resumeItem{Built pipeline tooling...}",
      "after":  "\\resumeItem{Built data pipeline tooling...}",
      "rationale": "Targets 'ETL' keyword — no new facts added."
    }
  ],
  "skills_changes": { "before": null, "after": null, "rationale": null },
  "guardrails_report": {
    "new_claims": [],
    "removed_metrics": [],
    "formatting_changes": []
  },
  "validation": {
    "passed": true,
    "issues": []
  }
}

护栏

每次LLM响应后运行五次检查:

检查 它捕捉到了什么
自我报告的新声明 模特承认有幻觉
自我报告删除指标 模特承认删除数字
“之前”不在简历中 模特发明了源文
LaTeX命令已删除 格式已默认损坏
字数增长>50% 关键字填充

如果任何检查失败, validation.passed 是 false 和 issues 列出了到底出了什么问题。