resume-onepage-autofit-mcp

resume-onepage-autofit-mcp

From markdown resume to formatted PDF, a MCP server that generates single-page PDF resumes with smart overflow detection and layered content reduction strategies

Category
Visit Server

README

resume-onepage-autofit-mcp

An MCP server that lets AI agents deliver formatted, single-page PDF resumes โ€” not just text answers.

๐ŸŒ ไธญๆ–‡ | 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.

๐ŸŽฏ How It Works

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

๐Ÿš€ Quick Start

1. Install MCP Server

# 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

2. Configure Claude Desktop

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"
  ]
}

3. Prepare Your Resume Content

Write your resume content in myexperience.md (refer to example_resume.md for format).

4. Start Using

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:

  • Copy js/config.example.js to js/config.js and modify the pdfOutput settings at the top
  • Or specify output_path parameter when calling to save to any location

โœจ Core Features

  • ๐ŸŽฏ Smart Fitting: Automatically adjusts content to fit resume perfectly on one A4 page
  • ๐Ÿ” Precise Detection: Pixel-accurate page height detection based on Playwright
  • ๐Ÿ“Š Layered Reduction: Three-tier reduction strategy (format optimization โ†’ content simplification โ†’ deep reduction)
  • ๐Ÿ”„ Feedback Loop: AI Agent intelligently iterates based on overflow metrics
  • ๐Ÿš€ MCP Integration: Supports direct calls from Claude Desktop and other AI clients

๐Ÿ“ธ Workflow

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 โ†โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŽจ Reduction Strategy Overview

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.

๐Ÿ”ง Visual Preview (Optional)

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.

๐Ÿ“š Documentation

๐Ÿ› Known Limitations

  1. Browser Dependency: Requires Chromium (~150MB first time)
  2. Content Length: Very long resumes (10+ pages) may need multiple reduction rounds
  3. Special Characters: Some emoji may affect layout

๐Ÿ”„ Development Roadmap

v0.2.0 (Planned)

  • [ ] Custom templates

๐Ÿค Contributing

Issues and Pull Requests welcome!

Development Setup

# 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

Commit Convention

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation update
  • test: Test related

๐Ÿ“„ License

MIT License - See LICENSE

๐Ÿ™ Acknowledgments

๐Ÿ“ง Contact


โญ If this project helps you, please give it a Star!

โญ ๅฆ‚ๆžœ่ฟ™ไธช้กน็›ฎๅฏนไฝ ๆœ‰ๅธฎๅŠฉ๏ผŒ่ฏท็ป™ไธ€ไธช Star๏ผ

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured