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
Prerequisites
Docker: Make sure Docker Desktop is installed and running
Claude Desktop: Latest version with MCP support
Git: For cloning the repository
Quick Start
1. Clone the Repository
2. Create Downloads Directory
3. Build the Docker Image
4. Configure Claude Desktop
Add the following configuration to your Claude Desktop config file:
Location of config file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Configuration:
Replace
Windows:
"C:/Users/YourUsername/path/to/cover-letter-mcp/downloads:/downloads"macOS/Linux:
"/Users/YourUsername/path/to/cover-letter-mcp/downloads:/downloads"
5. Restart Claude Desktop
Restart Claude Desktop to load the new MCP server configuration.
Usage
Once configured, you can generate cover letters directly in Claude Desktop with advanced organization features:
Example Usage
Basic Cover Letter Generation
Organized Cover Letter with Custom Folder
Advanced Organization
Folder Management
Smart Organization Features
šļø Auto-Folder Creation - Folders are created automatically when generating cover letters
š Custom Directory Structure - Organize by company, role type, industry, or any system that works for you
š Directory Browser - List contents of any folder to see your cover letter collection
š File Information - View file sizes, creation dates, and organize by metadata
š”ļø Path Security - Built-in sanitization prevents directory traversal and invalid characters
Organization Examples
By Company:
applications/google/applications/microsoft/applications/amazon/
By Role Type:
roles/software-engineer/roles/product-manager/roles/data-scientist/
By Industry:
industries/fintech/industries/healthcare/industries/gaming/
By Status:
drafts/submitted/2024/archived/old-versions/
Advanced Options
Custom filename with organization:
Multiple applications organization:
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 applicantcompany(string): Company nameposition(string): Position being applied forbody(string): Main body text of the cover letterfilename(string, optional): Custom filename (without .pdf extension)folderPath(string, optional): Custom folder path within downloads directory
Example:
create_folder
Creates a new folder within the downloads directory.
Parameters:
folderPath(string): Folder path to create (supports nested folders)
Example:
list_folders
Lists all folders and files in the downloads directory.
Parameters:
path(string, optional): Specific subdirectory to list
Example:
File Structure
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_foldersResources: Lists and provides access to generated PDFs (including nested folders)
Capabilities: Full read/write access to cover letter generation and folder management
Troubleshooting
Common Issues
"Docker command not found"
Ensure Docker Desktop is installed and running
Verify Docker is in your system PATH
"Permission denied" on Windows
Make sure Docker Desktop has access to your drive
Try running PowerShell as Administrator
Ensure the downloads folder has write permissions
"Container not found"
Rebuild the Docker image:
docker build -t cover-letter-mcp .Check that the image name matches your configuration
"LaTeX compilation failed"
This usually indicates special characters in the input
The server automatically escapes most characters, but some complex formatting may need adjustment
"Folder creation errors"
Verify write permissions in the downloads directory
Check that folder paths don't contain invalid characters
Ensure Docker has access to the mounted volume
"Path-related issues"
Folder paths are automatically sanitized for security
Invalid characters are replaced with underscores
Directory traversal attempts (../) are automatically blocked
Debug Mode
To see detailed logs from the MCP server, check the Claude Desktop developer console or run the Docker container manually:
For verbose debugging:
Development
Local Development
For development without Docker:
Install Python dependencies:
pip install -r requirements.txtInstall 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 LiveRun 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
Fork the repository
Create a feature branch:
git checkout -b feature-nameMake your changes
Test thoroughly with various folder structures
Submit a pull request
License
MIT License - see LICENSE file for details.
Support
If you encounter issues:
Check the troubleshooting section
Review the Claude Desktop MCP documentation
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_foldertool for creating organized directory structures⨠NEW:
list_folderstool for browsing and managing cover letter collections⨠NEW: Enhanced
generate_cover_letterwithfolderPathparameterš”ļø 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