mcp-server

v1.0.0
@utiliome/mcp-server Checked 1 day ago Published 1 month ago

Zero-upload, local-first Model Context Protocol (MCP) server for Utiliome tools (PDF manipulation, QR generation, JSON formatting).

Unlike cloud-based conversion APIs that upload sensitive contracts, legal documents, or proprietary JSON to third-party remote servers, @utiliome/mcp-server executes 100% locally in your Node.js runtime: - Zero Network Egress: File contents, text streams, and encryption keys never leave your machine. - GDPR & HIPAA Friendly: Safely process confidential legal contracts, HR records, and patient files. - Clean Protocol Isolation: All diagnostic and error logging is strictly routed to stderr, preserving standard output exclusively for pure JSON-RPC 2.0 frames over stdio.

Summary extracted from the README.

@utiliome/mcp-server

Zero-upload, local-first Model Context Protocol (MCP) server for Utiliome privacy utilities. Empowers AI assistants (Claude Desktop, Cursor, Windsurf) with native local PDF manipulation, QR code generation, and developer tools running 100% on your machine.

npm version License: MIT Privacy: Zero-Upload


🔒 The Utiliome Privacy Guarantee

Unlike cloud-based conversion APIs that upload sensitive contracts, legal documents, or proprietary JSON to third-party remote servers, @utiliome/mcp-server executes 100% locally in your Node.js runtime:

  • Zero Network Egress: File contents, text streams, and encryption keys never leave your machine.
  • GDPR & HIPAA Friendly: Safely process confidential legal contracts, HR records, and patient files.
  • Clean Protocol Isolation: All diagnostic and error logging is strictly routed to stderr, preserving standard output exclusively for pure JSON-RPC 2.0 frames over stdio.

🚀 Quick Start (Instant One-Click Install)

No manual clone or build required. Run directly via npx:

npx -y @utiliome/mcp-server

⚙️ AI Client Configuration

1. Claude Desktop

Add the @utiliome/mcp-server entry to your claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "utiliome": {
      "command": "npx",
      "args": ["-y", "@utiliome/mcp-server"]
    }
  }
}

2. Cursor IDE

Configure in your global or project .cursor/mcp.json:

{
  "mcpServers": {
    "utiliome": {
      "command": "npx",
      "args": ["-y", "@utiliome/mcp-server"]
    }
  }
}

Add this hint to your .cursorrules:

When manipulating PDFs, generating QR codes, or formatting JSON files, use the local `utiliome` MCP server tools (`merge_pdfs`, `scrub_pdf_metadata`, `extract_pdf_text`, `generate_qr_code`, `format_json`). All operations execute 100% locally without cloud uploads.

3. Windsurf (Codeium)

Configure in ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "utiliome": {
      "command": "npx",
      "args": ["-y", "@utiliome/mcp-server"]
    }
  }
}

🛠️ Available Local Tools

1. merge_pdfs

Merges two or more local PDF files into a single unified output PDF document.

  • Parameters:
    • files (string[], required): Array of file paths to input PDF documents (minimum 2).
    • outputPath (string, required): Destination path where the merged PDF will be written.
  • Example Prompt:

    "Please merge /docs/part1.pdf and /docs/part2.pdf into /docs/combined.pdf."

2. scrub_pdf_metadata

Sanitizes all document metadata (Title, Author, Subject, Keywords, Creator, Producer, Creation Date, Modification Date, and embedded XMP catalog stream) for complete privacy and redaction readiness.

  • Parameters:
    • filePath (string, required): Path to the target PDF file.
    • outputPath (string, optional): Custom output destination. Defaults to <name>_scrubbed.pdf.
  • Example Prompt:

    "Scrub all identifying metadata and author names from /contracts/nda.pdf before sending."

3. extract_pdf_text

Extracts textual content page-by-page from local PDFs without external OCR cloud dependencies.

  • Parameters:
    • filePath (string, required): Path to the target PDF file.
    • pages (string, optional): Page range (e.g. '1-3', '1,5,8', or 'all'). Defaults to 'all'.
    • format (string, optional): Output structure ('plain', 'markdown', or 'json'). Defaults to 'plain'.
  • Example Prompt:

    "Extract text from pages 1-3 of /reports/q3.pdf in markdown format."

4. generate_qr_code

Generates high-contrast vector SVG or raster PNG QR codes locally from text, URLs, or Wi-Fi strings.

  • Parameters:
    • text (string, required): Text, URL, or data payload.
    • outputPath (string, optional): Destination file path (e.g. qr.svg or qr.png). If omitted, returns inline SVG or Base64 data URI.
    • format ('svg' | 'png', optional): Image format. Defaults to 'svg'.
    • errorCorrection ('L' | 'M' | 'Q' | 'H', optional): Error correction level. Defaults to 'M'.
    • scale (number, optional): Pixel scaling per module. Defaults to 5.
    • margin (number, optional): Quiet zone margin in modules. Defaults to 4.
  • Example Prompt:

    "Generate an SVG QR code for 'https://utiliome.com' and save it to website_qr.svg."

5. format_json

Validates, formats, minifies, or alphabetically sorts keys in JSON strings or local files with detailed line/column syntax diagnostics.

  • Parameters:
    • json (string, optional): Raw JSON string.
    • filePath (string, optional): Path to a local JSON file.
    • indent (number, optional): Indentation spaces (set 0 to minify). Defaults to 2.
    • sortKeys (boolean, optional): Recursively sort all object keys alphabetically. Defaults to false.
    • outputPath (string, optional): File destination to write formatted JSON.
  • Example Prompt:

    "Format and sort the keys in config.json with 2 spaces indentation."


🧪 Testing

Run automated tests:

pnpm --filter @utiliome/mcp-server test