
ResumeTailor
β 1from adi2355
Automatically tailors resumes for specific job applications using LibreOffice.
Overview
MCP-Resume-Tailor is a Model Context Protocol server system that automates document editing through LibreOffice's UNO API. Two MCP servers β a document editor and a job-description keyword extractor β connect to Claude Desktop, enabling AI-driven resume customization from natural conversation.
The editor preserves full document fidelity by operating directly on .odt files through LibreOffice's internal document-object model rather than converting to intermediate formats. Bookmark-delimited sections define the editable regions, and content is replaced while retaining the template's formatting, styles, and layout. The keyword extractor analyzes job descriptions through the Claude API and returns structured, 5-tier ranked output that guides the tailoring process.
Technology Stack
| Language | |
| Protocol | |
| Document Engine | |
| AI | |
| Infrastructure | |
| Validation |
Design Principles
1. Document Fidelity Through Native API
Goal: Preserve the template's full formatting, styles, and layout across every edit.
Rather than converting documents to Markdown or HTML β a lossy transformation β the editor connects to LibreOffice's UNO bridge over a local socket and operates on the live document model. Bookmark pairs delimit editable regions. Content replacement happens at the document-object level, so fonts, paragraph styles, spacing, and page structure are preserved exactly as the template author designed them.
2. MCP-Native Tool Design
Goal: Expose document editing and keyword extraction as first-class MCP tools, not REST wrappers.
Both servers are built directly on FastMCP with typed tool schemas. Claude Desktop invokes them through the Model Context Protocol β no glue code, no prompt injection, no API choreography. The AI decides when and how to call each tool based on the conversation context, combining keyword extraction output with document editing in a single interactive session.
3. Transport-Agnostic Deployment
Goal: Run locally for development, containerized for reliability β same MCP tool surface either way.
Local mode uses stdio transport: Claude Desktop launches the Python process directly. Docker mode runs both servers behind Nginx, with proxy scripts bridging Claude Desktop's stdio protocol to HTTP/SSE endpoints inside the container. The MCP tool surface is identical in both modes β no code changes, no feature differences.
Architecture
Local / stdio
Claude Desktop ββstdioβββΆ resume_editor_server.py ββUNOβββΆ LibreOffice (port 2002) βββΆ .odt
Claude Desktop ββstdioβββΆ jd_keyword_extractor_mcp.py ββAPIβββΆ Claude APIClaude Desktop launches each MCP server as a child process. The document editor connects to a headless LibreOffice instance via UNO bridge on port 2002. The keyword extractor calls the Anthropic API directly.
Containerized / HTTP
Claude Desktop ββstdioβββΆ macOS proxy ββHTTPβββΆ Docker (Nginx)
ββ :5001 β Resume Editor MCP (port 8000, streamable-http)
ββ :5002 β JD Extractor MCP (port 9000, streamable-http)
ββ LibreOffice headless (port 2002, internal)The macOS proxy scripts translate between Claude Desktop's stdio MCP protocol and the containerized HTTP/SSE endpoints, handling MCP session ID management and server-sent event stream parsing. Nginx routes traffic to the correct internal service.
MCP Tool Surface
| Tool | Server | Description |
|---|---|---|
update_resume_section | Document Editor | Replace content in a single bookmark-delimited section |
update_multiple_resume_sections | Document Editor | Update multiple sections atomically in one pass |
get_available_sections | Document Editor | List all editable bookmark regions in the current template |
extract_jd_keywords | Keyword Extractor | Analyze a job description and return structured keyword rankings |
Editable Sections
The document editor operates on bookmark-pair-delimited regions. The current template exposes:
| Section | Bookmark Range |
|---|---|
| Skills | Skills_Start β Skills_End |
| Summary | Summary_Start β Summary_End |
| WorkExperience1 | WorkExperience1_Start β WorkExperience1_End |
| WorkExperience2 | WorkExperience2_Start β WorkExperience2_End |
| WorkExperience3 | WorkExperience3_Start β WorkExperience3_End |
Keyword Extraction Output
The extract_jd_keywords tool returns structured JSON with:
- 5-tier ranked keywords β critical, high, medium, low, and nice-to-have
- Requirements summary and role context
- Tools, technologies, and methodologies extracted from the posting
- Core responsibilities and desired outcomes
- Role level, scope, and company context
Hardest Problems Solved
1. LibreOffice UNO Bridge Reliability
Problem: LibreOffice's UNO API requires a running headless instance with an open socket on port 2002. Connection drops, document locks, and process state leaks are common failure modes in long-running sessions.
Solution: The editor manages the full connection lifecycle β establishing the UNO bridge, loading documents via URL protocol, handling open/close state, and writing to timestamped output files to avoid clobbering the template. The Docker deployment uses a dedicated startup sequence to guarantee LibreOffice is accepting connections before the MCP server begins handling requests.
2. MCP Transport Bridging (stdio to HTTP)
Problem: Claude Desktop only supports stdio-based MCP transport. Containerized services expose HTTP endpoints. These are fundamentally different protocol models with incompatible stream semantics.
Solution: Custom proxy scripts (mac_proxy_resume_editor.py, mac_proxy_jd_extractor.py) bridge the gap: they read JSON-RPC messages from stdin, forward them as HTTP requests to the container, parse the SSE response stream back into MCP messages, and manage session IDs across the connection lifecycle. Claude Desktop sees a local stdio server; the container sees standard HTTP clients.
3. Bookmark-Preserving Content Replacement
Problem: Replacing text between bookmarks in an .odt document must preserve the surrounding document structure β paragraph styles, character formatting, page layout β without corrupting the underlying XML.
Solution: The UNO API operates on LibreOffice's live document-object model, not raw XML. replace_bookmark_range_text() enumerates the text range between paired bookmarks (Section_Start / Section_End), removes existing content paragraph by paragraph, and inserts new content while inheriting the template's default paragraph and character styles.
Quick Start
Prerequisites
- Python 3.10+
- LibreOffice with UNO support (
libreoffice-script-provider-python) - An
.odtresume template with bookmark pairs (see Bookmark Setup Guide) - For containerized deployment: Docker and Docker Compose
- For keyword extraction: Anthropic API key
Local Setup
git clone https://github.com/adi2355/MCP-Resume-Tailor.git
cd MCP-Resume-Tailor
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
# Link system UNO modules into venv
ln -s /usr/lib/python3/dist-packages/uno.py .venv/lib/python3.*/site-packages/uno.py
ln -s /usr/lib/python3/dist-packages/unohelper.py .venv/lib/python3.*/site-packages/unohelper.pyStart LibreOffice
soffice --accept="socket,host=localhost,port=2002;urp;" --headless --norestore --nologo --nodefault &Claude Desktop Configuration (stdio)
Add to your Claude Desktop config:
{
"mcpServers": {
"LibreOfficeResumeEditor": {
"command": "/path/to/MCP-Resume-Tailor/.venv/bin/python",
"args": ["resume_editor_server.py"],
"cwd": "/path/to/MCP-Resume-Tailor"
},
"JDKeywordExtractor": {
"command": "/path/to/MCP-Resume-Tailor/.venv/bin/python",
"args": ["jd_keyword_extractor_mcp.py"],
"cwd": "/path/to/MCP-Resume-Tailor"
}
}
}Docker Deployment
docker compose up --buildConfigure Claude Desktop for containerized use:
{
"mcpServers": {
"LibreOfficeResumeEditor": {
"url": "http://localhost:5001"
},
"JDKeywordExtractor": {
"url": "http://localhost:5002"
}
}
}See Docker Deployment Guide and macOS Setup Guide for platform-specific details.
Documentation
| Document | Description |
|---|---|
| Claude MCP Usage Guide | Step-by-step Claude Desktop integration with example prompts |
| Docker Deployment | Containerized setup, port mapping, and service management |
| macOS Setup | Platform-specific installation and UNO configuration |
| Optimized Workflow | Two-stage pipeline: JD keyword extraction followed by targeted tailoring |
| Bookmark Setup | How to add bookmark-pair regions to an .odt template in LibreOffice |
Folder Structure
MCP-Resume-Tailor/
βββ resume_editor_server.py # MCP server: document section editing via UNO
βββ jd_keyword_extractor_mcp.py # MCP server: JD keyword extraction via Claude API
βββ edit_resume_uno.py # Core LibreOffice UNO API operations
βββ container_api.py # Flask REST wrapper for container mode
βββ mac_proxy_resume_editor.py # stdio β HTTP proxy (document editor)
βββ mac_proxy_jd_extractor.py # stdio β HTTP proxy (keyword extractor)
βββ docker-compose.yml # Multi-service container orchestration
βββ Dockerfile # Ubuntu 22.04 + LibreOffice + Python
βββ start_container_service.sh # Docker entrypoint script
βββ start_resume_tailor_services.sh # Start both MCP services locally
βββ requirements.txt # Python dependencies
βββ claude_desktop_config.json # Claude Desktop config (stdio mode)
βββ claude_desktop_config_docker.json # Claude Desktop config (HTTP/Docker mode)
βββ CLAUDE_MCP_USAGE.md # Integration guide
βββ DOCKER_README.md # Docker documentation
βββ MACOS_SETUP.md # macOS setup guide
βββ OPTIMIZED_SYSTEM_USAGE.md # Workflow documentation
βββ setup_resume_bookmarks.md # Template bookmark guidegit clone https://github.com/adi2355/MCP-Resume-Tailor.git
cd MCP-Resume-Tailor
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
# Link system UNO modules into venv
ln -s /usr/lib/python3/dist-packages/uno.py .venv/lib/python3.*/site-packages/uno.py
ln -s /usr/lib/python3/dist-packages/unohelper.py .venv/lib/python3.*/site-packages/unohelper.pyNo common issues documented yet. If you hit a problem, the repository's GitHub Issues page is the best place to look.