Labsco
AndreaCadonna logo

Cover Letter

โ˜… 1

from AndreaCadonna

Generates professional PDF cover letters using LaTeX. Requires Docker for local execution.

๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

Cover Letter MCP Server

A Model Context Protocol (MCP) server that generates professional PDF cover letters using LaTeX. This server integrates seamlessly with Claude Desktop to create beautifully formatted cover letters with a clean, professional design and advanced folder management capabilities.

Features

  • ๐ŸŽฏ Professional Design: Clean, modern layout matching professional resume standards
  • ๐Ÿ“„ PDF Generation: High-quality PDF output using LaTeX
  • ๐Ÿ”ง Claude Desktop Integration: Works directly within Claude Desktop interface
  • ๐Ÿ“ Advanced Folder Management: Create custom folders and organize cover letters by job, company, or category
  • ๐Ÿ—‚๏ธ Directory Navigation: List and browse your cover letter collection with built-in file explorer
  • โšก Fast Generation: Dockerized environment for consistent, quick processing
  • ๐Ÿ›ก๏ธ Input Sanitization: Automatic escaping of special characters for LaTeX safety
  • ๐Ÿ”’ Secure Paths: Built-in path sanitization prevents security issues

API Reference

Tools Available

generate_cover_letter

Generates a PDF cover letter from structured data with optional folder organization.

Parameters:

  • name (string): Full name of the applicant
  • company (string): Company name
  • position (string): Position being applied for
  • body (string): Main body text of the cover letter
  • filename (string, optional): Custom filename (without .pdf extension)
  • folderPath (string, optional): Custom folder path within downloads directory

Example:

{
  "name": "John Smith",
  "company": "Tech Corp",
  "position": "Software Engineer",
  "body": "I am writing to express my strong interest...",
  "filename": "john-smith-tech-corp-application",
  "folderPath": "job-applications/tech-companies/tech-corp"
}

create_folder

Creates a new folder within the downloads directory.

Parameters:

  • folderPath (string): Folder path to create (supports nested folders)

Example:

{
  "folderPath": "applications/2024/q1"
}

list_folders

Lists all folders and files in the downloads directory.

Parameters:

  • path (string, optional): Specific subdirectory to list

Example:

{
  "path": "applications/tech-companies"
}

File Structure

cover-letter-mcp/
โ”œโ”€โ”€ server.py              # Main MCP server with folder management
โ”œโ”€โ”€ Dockerfile             # Docker container configuration
โ”œโ”€โ”€ requirements.txt       # Python dependencies
โ”œโ”€โ”€ downloads/             # Generated PDFs organized in folders
โ”‚   โ”œโ”€โ”€ applications/
โ”‚   โ”‚   โ”œโ”€โ”€ google/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ john-smith-swe-2024.pdf
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ jane-doe-pm-2024.pdf
โ”‚   โ”‚   โ”œโ”€โ”€ microsoft/
โ”‚   โ”‚   โ””โ”€โ”€ startups/
โ”‚   โ”œโ”€โ”€ drafts/
โ”‚   โ””โ”€โ”€ templates/
โ””โ”€โ”€ README.md             # This file

Technical Details

LaTeX Template

The server uses a custom LaTeX template that creates:

  • Clean, centered header with applicant name
  • Professional spacing and typography
  • Automatic date insertion
  • Proper business letter formatting
  • High-quality PDF output

Security Features

  • Input Sanitization: All user input is properly escaped for LaTeX
  • Filename Safety: Generated filenames are sanitized to prevent path traversal
  • Path Security: Folder paths are sanitized to prevent directory traversal attacks
  • Isolated Environment: Docker container provides secure, isolated execution
  • Character Filtering: Removes or replaces invalid filesystem characters

MCP Protocol

This server implements the Model Context Protocol specification:

  • Tools: generate_cover_letter, create_folder, list_folders
  • Resources: Lists and provides access to generated PDFs (including nested folders)
  • Capabilities: Full read/write access to cover letter generation and folder management

Development

Local Development

For development without Docker:

  1. Install Python dependencies:

    pip install -r requirements.txt
  2. Install LaTeX (varies by system):

    # Ubuntu/Debian
    sudo apt-get install texlive-latex-base texlive-latex-recommended
    
    # macOS with Homebrew
    brew install --cask mactex
    
    # Windows
    # Download and install MiKTeX or TeX Live
  3. Run the server:

    python server.py

Security Considerations

  • Path Validation: All folder paths are validated and sanitized
  • Input Escaping: LaTeX special characters are properly escaped
  • Container Isolation: Docker provides process and filesystem isolation
  • Volume Mounting: Only the downloads directory is accessible to the container

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes
  4. Test thoroughly with various folder structures
  5. Submit a pull request

Support

If you encounter issues:

  1. Check the troubleshooting section
  2. Review the Claude Desktop MCP documentation
  3. Open an issue on GitHub with:
    • Your operating system
    • Claude Desktop version
    • Docker version
    • Complete error messages
    • Steps to reproduce

Changelog

v2.0.0 - Folder Management Update

  • โœจ NEW: Custom folder organization within downloads directory
  • โœจ NEW: create_folder tool for creating organized directory structures
  • โœจ NEW: list_folders tool for browsing and managing cover letter collections
  • โœจ NEW: Enhanced generate_cover_letter with folderPath parameter
  • ๐Ÿ›ก๏ธ NEW: Path sanitization and security features
  • ๐Ÿ“Š NEW: File metadata display (size, date) in directory listings
  • ๐Ÿ—‚๏ธ NEW: Auto-creation of folder paths when generating cover letters
  • ๐Ÿ“ NEW: Support for nested folder structures
  • ๐Ÿ” NEW: Directory navigation and file organization tools
  • ๐Ÿ”’ NEW: Enhanced security with Docker volume isolation

v1.0.0

  • Initial release
  • Professional LaTeX cover letter generation
  • Docker containerization
  • Claude Desktop integration
  • Basic PDF output to downloads folder

Made with โค๏ธ for the Claude Desktop and MCP community