Skip to main content

Overview

Penquify ships with a built-in MCP (Model Context Protocol) server that exposes 5 tools for document and photo generation. Use it with Claude Desktop, Cursor, Windsurf, or any MCP-compatible client.

Setup

Claude Desktop

Add to your claude_desktop_config.json:
{
  "mcpServers": {
    "penquify": {
      "command": "python3",
      "args": ["-m", "penquify.mcp"],
      "env": {
        "GEMINI_API_KEY": "your-gemini-api-key",
        "PENQUIFY_OUTPUT": "~/penquify-output"
      }
    }
  }
}

Cursor / Windsurf

Add to your .cursor/mcp.json or equivalent:
{
  "mcpServers": {
    "penquify": {
      "command": "python3",
      "args": ["-m", "penquify.mcp"],
      "env": {
        "GEMINI_API_KEY": "your-gemini-api-key"
      }
    }
  }
}

Available Tools

penquify_generate_document

Generate a logistics document (PDF + PNG) from structured data. Parameters:
NameTypeRequiredDescription
doc_typestringNoTemplate: guia_despacho, factura_sii, purchase_order, bill_of_lading
doc_numberstringYesDocument number
datestringYesDate (DD/MM/YYYY)
emitter_namestringYesEmitter company name
receiver_namestringNoReceiver company name
oc_numberstringNoPurchase order reference
itemsarrayYesItems: [{description, qty, unit, unit_price?}]
observationsstringNoHandwritten notes
Returns: File paths (html, png, pdf).

penquify_generate_photos

Generate realistic smartphone photos of a document image. Parameters:
NameTypeRequiredDescription
image_pathstringYesPath to document PNG/PDF
presetsstring[]NoPreset names (default: full_picture, folded_skewed)
doc_descriptionstringNoKey fields to preserve
Returns: List of {name, path, ok} results.

penquify_generate_dataset

Full pipeline: document data to PDF to realistic photos. Parameters:
NameTypeRequiredDescription
doc_numberstringYesDocument number
datestringYesDate
emitter_namestringYesEmitter company name
receiver_namestringNoReceiver company name
oc_numberstringNoPurchase order reference
itemsarrayYesItems: [{description, qty, unit, unit_price?}]
presetsstring[]NoPresets (default: full_picture, folded_skewed, blurry)
Returns: Document files + photo results.

penquify_text_to_config

Convert natural language to a photo variation JSON config. Parameters:
NameTypeRequiredDescription
descriptionstringYesNatural language description
Returns: PhotoVariation JSON config.

penquify_list_presets

List all available photo variation presets and camera models. Parameters: None. Returns: Lists of preset names, camera names, and preset details.

Environment Variables

VariableDefaultDescription
GEMINI_API_KEYRequired for photo generation
PENQUIFY_OUTPUT~/penquify-outputOutput directory for generated files