π Claude Desktop tool for generating BEM-style field names from PDF forms
Analyze PDF forms and generate consistent BEM-style field names using financial services conventions. This tool integrates with Claude Desktop to provide AI-powered field analysis and BEM name generation.
- π§ AI-Powered Analysis - Claude Desktop analyzes PDF forms and generates BEM names
- π JSON Export - Clean JSON output with all field mappings
- π·οΈ BEM Convention - Flexible
block_element__modifier
style names with full hierarchy support - ποΈ Signature Field Support - Proper handling of signature fields and date fields
- π Field Type Detection - Support for text, checkbox, radio, dropdown, signature, and date fields
- π Radio Group Enhancement - Improved radio button group detection and mapping
- ποΈ Archived Modification Engine - Advanced PDF modification tools preserved in archive folder
# Clone the repository
git clone https://github.com/yourorg/pdf-enrichment-platform.git
cd pdf-enrichment-platform
# Install with uv (recommended)
uv install
Add to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"pdf-enrichment": {
"command": "uv",
"args": [
"run",
"python",
"-m",
"src.pdf_enrichment.mcp_server_simple"
],
"cwd": "/path/to/vpars3"
}
}
}
- Upload your PDF to Claude Desktop
- Use the tool:
generate_BEM_names
(optional context parameter) - Copy the JSON output from the response
The tool will analyze the PDF and generate a complete BEM mapping with downloadable JSON artifact.
For PDF modification capabilities, see the Archived Modification Engine folder which contains advanced tools for applying BEM names to PDF files.
- Analyzes uploaded PDF form fields
- Generates BEM-style names using financial services conventions
- Outputs comprehensive JSON with all field mappings
- Includes validation and field count verification
- Provides downloadable JSON artifact for external use
- generate_unified_fields: Generates enriched Unified Field definitions from BEM mappings for application integration
Advanced PDF modification tools are preserved in the Archived Modification Engine
folder for future development.
- Block: Form sections (
owner-information
,beneficiary
,payment
) - Element: Individual fields (
first-name
,amount
,signature
) - Modifier: Field variations (
__monthly
,__gross
,__primary
) - Special: Radio groups (
--group
)
block
(e.g.,dividend-option
)block_element
(e.g.,dividend-option_cash
)block__modifier
(e.g.,dividend-option__cash
)block_element__modifier
(e.g.,name-change_reason__marriage
)block--group
(e.g.,dividend-option--group
)block_element--group
(e.g.,payment-method_options--group
)
owner-information_first-name
owner-information_last-name
beneficiary_withdrawal-frequency__monthly
payment-method--group
payment-method__ach
signatures_owner-signature
name-change_reason__marriage
dividend-option__accumulate-interest
- Text Fields:
owner-information_first-name
(field_type: "text") - Checkboxes:
insured-information_same-as-owner__checkbox
(field_type: "checkbox") - Radio Buttons:
dividend-option__cash
(field_type: "radio") - Radio Groups:
dividend-option--group
(field_type: "radio_group") - Signature Fields:
signatures_owner-signature
(field_type: "signature") - Date Fields:
signatures_owner-date
(field_type: "date") - Dropdown Fields:
billing-frequency__annual
(field_type: "dropdown")
{
"source_filename": "Life-1528-Q.pdf",
"analysis_timestamp": "2024-01-15T10:30:00Z",
"total_fields": 67,
"bem_mappings": {
"first_name": "owner-information_first-name",
"last_name": "owner-information_last-name",
"policy_number": "owner-information_policy-number",
"dividend_accumulate": "dividend-option__accumulate-interest",
"dividend_reduce_premium": "dividend-option__reduce-premium",
"payment_method_ach": "payment-method__ach",
"owner_signature": "signatures_owner-signature",
"owner_signature_date": "signatures_owner-date"
}
}
The generate_unified_fields
tool transforms BEM mappings into enriched Unified Field (UF) definitions for application integration across insurance and annuity forms.
{
"bem_mappings": {
"owner_first_name": "owner-information_first-name",
"dividend_option__cash": "dividend-option__cash",
"payment_method--group": "payment-method--group"
}
}
[
{
"api_name": "owner_first_name",
"name": "Owner: First Name",
"description": "First name of the policy owner",
"type": "text field",
"label": "First Name"
},
{
"api_name": "dividend_option__cash",
"name": "Dividend Option: Cash",
"description": "Option to receive dividends as cash payment",
"type": "radio button",
"label": "Cash"
}
]
- text field: Standard input fields
- radio button: Individual radio button options
- radio group: Radio button group containers
- checkbox: Boolean/toggle options
- group: Section containers
- slider: Range or percentage inputs
This tool is designed to work through Claude Desktop. For command line usage and PDF modification capabilities, see the Archived Modification Engine folder which contains standalone scripts and advanced features.
- Upload PDF to Claude Desktop
- Use
generate_BEM_names
tool to create BEM mappings - Use
generate_unified_fields
tool to create enriched field definitions - Download the generated JSON artifacts
For PDF modification capabilities, see the Archived Modification Engine folder.
vpars3/
βββ src/pdf_enrichment/
β βββ mcp_server_simple.py # Main Claude Desktop tool
β βββ field_types.py # Type definitions
β βββ utils.py # Utility functions
βββ Archived Modification Engine/
β βββ mcp_servers/ # Enhanced MCP servers
β βββ scripts/ # Standalone PDF modification tools
β βββ components/ # Advanced field detection and modification
β βββ documentation/ # Technical documentation
β βββ tests/ # Test suite
βββ docs/ # Core documentation
βββ examples/ # Sample files
# Test the MCP server
python -m src.pdf_enrichment.mcp_server_simple
# For advanced testing, see the Archived Modification Engine folder
Claude Desktop not finding tool:
# Verify MCP server
python -m src.pdf_enrichment.mcp_server_simple
# Check config path
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json
Tool not generating BEM names:
- Ensure PDF has fillable form fields (not just scanned image)
- Check for proper field names in the PDF
- Verify field types are correctly identified
- Upload PDF directly to Claude Desktop
JSON output issues:
- Copy the entire JSON output from the tool response
- Check for proper JSON formatting
- Verify all required fields are present
For advanced PDF modification and field detection issues, see the Archived Modification Engine folder which contains comprehensive troubleshooting guides and advanced diagnostic tools.
- Large PDFs: Processing time increases with form complexity
- Memory usage: Complex forms with many fields may use more memory
- Tool responsiveness: BEM name generation is optimized for Claude Desktop integration
This project is licensed under the MIT License - see the LICENSE file for details.
Simple Claude Desktop tool for BEM field name generation! π