loading…
Search for a command to run...
loading…
From markdown resume to formatted PDF, a MCP server that generates single-page PDF resumes with smart overflow detection and layered content reduction strategie
From markdown resume to formatted PDF, a MCP server that generates single-page PDF resumes with smart overflow detection and layered content reduction strategies
🌐 中文 | English
License: MIT Python 3.8+ Playwright
🤖 Tired of copying between AI and Word, tweaking formats, and adjusting to fit one page? What if AI could handle that feedback loop for you? This MCP lets AI render PDFs and auto-adjust content to perfectly fit one page with clean formatting.
User: Please generate a single-page resume from my experience
AI Agent:
1. 📝 Generate initial Markdown
2. 🔍 Call render_resume_pdf to validate
3. ⚠️ Detected 12% overflow
4. 🔧 Apply Level 2 reduction strategy
5. ✅ Success! PDF generated
# Enter MCP Server directory and install dependencies
cd mcp_server
pip install -r requirements.txt
# ⚡ Or using uv (recommended): uv pip install -r requirements.txt
# Install Chromium browser (first time only, ~150MB)
playwright install chromium
Edit %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"resume-onepage-autofit-mcp": {
"command": "python",
"args": ["<your-path>/myresumebuilder/mcp_server/mcp_server.py"]
}
}
}
Replace
<your-path>with your actual project path.⚡ If you prefer using uv:
"resume-onepage-autofit-mcp": { "command": "uv", "args": [ "run", "--directory", "<your-path>/myresumebuilder", "mcp_server/mcp_server.py" ] }
Write your resume content in myexperience.md (refer to example_resume.md for format).
Restart Claude Desktop, then simply tell the AI: "Please generate a single-page resume from my experience"
Generated PDFs are saved to the generated_resume/ folder in the project directory by default.
💡 Custom Output Path:
- (Optional) Create
js/config.jsto override settings fromjs/config.defaults.js(e.g.pdfOutputpath)- Or specify
output_pathparameter when calling to save to any location
User provides experience → AI generates Markdown resume
↓
MCP Server renders & validates
↓
┌─────── Detect page height ───────┐
│ │
Success Failure
(within one page) (overflow X%)
│ │
Generate PDF Return overflow metrics + hints
│ ↓
│ AI applies reduction strategy
│ (Level 1/2/3)
│ │
└──────────── Re-render ←──────────┘
| Level | Overflow Range | Strategy | Information Loss |
|---|---|---|---|
| Level 1 | < 5% | Merge orphan lines, single-line lists | Low |
| Level 2 | 5-15% | Remove soft skills, simplify descriptions | Medium |
| Level 3 | > 15% | Delete irrelevant experiences | High |
See AI_AGENT_PROMPT.md for detailed strategies.
To manually adjust default style parameters, use the control panel (pure frontend, no Python needed):
# Use VS Code Live Server extension (recommended)
# Right-click control_panel.html -> "Open with Live Server"
# Or Python simple server
python -m http.server 8080
# Visit http://localhost:8080/control_panel.html
💡 The control panel is primarily for manually debugging style limits (e.g., font size ranges, line spacing). For daily use, rely on the AI Agent, which automatically adapts layout within optimal ranges based on content. For technical details, see DEVELOPMENT.md.
Issues and Pull Requests welcome!
# Clone repository
git clone https://github.com/seriserendipia/resume-onepage-autofit-mcp.git
cd resume-onepage-autofit-mcp
# Create virtual environment
conda create -n agent_env python=3.10
conda activate agent_env
# Install dependencies
pip install -r mcp_server/requirements.txt
playwright install chromium
feat: New featurefix: Bug fixdocs: Documentation updatetest: Test relatedMIT License - See LICENSE
⭐ If this project helps you, please give it a Star!
⭐ 如果这个项目对你有帮助,请给一个 Star!
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"resume-onepage-autofit-mcp": {
"command": "npx",
"args": []
}
}
}