eSign MCP Server

by adamanz

409 downloads
Not rated
GitHub

About

MCP server for signing PDF documents with signature images. Built upon signpdf by Charlie DeTar.

Details

Author
adamanz
Downloads
409
Categories
Other

- Sign PDF with precise coordinate positioning
- Get PDF metadata including page count and dimensions
- Support for PNG and JPG signature images
- Optional date stamping next to the signature
- Base64 encoding for all file transfers
- Input validation and descriptive error handling

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name eSign MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install dependencies via uv pip install -r requirements.txt and run uv run python mcp_server.py. Configure your MCP client (e.g., Claude Desktop) with the command uv run python /ABSOLUTE/PATH/TO/esign-mcp/mcp_server.py. Use the tools sign_pdf and get_pdf_info with Base64-encoded file content.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "esign mcp server": {
            "esign-mcp": {
                "command": "uv",
                "args": [
                    "pip",
                    "install",
                    "-r",
                    "requirements.txt"
                ]
            }
        }
    }
}

McpServers

{
    "esign-mcp": {
        "command": "uv",
        "args": [
            "pip",
            "install",
            "-r",
            "requirements.txt"
        ]
    }
}

eSign MCP Server

An MCP (Model Context Protocol) server that provides tools for signing PDF documents by adding signature images at specified coordinates.

Credits

This MCP server is built upon the excellent signpdf project by Charlie DeTar (cfd@media.mit.edu). The original signpdf utility provides the core PDF signing functionality that this MCP server wraps with a modern MCP interface.

Features

- sign_pdf: Add signature images to PDF documents with precise positioning
- get_pdf_info: Get PDF metadata including page count and dimensions
- Input validation and error handling
- Support for PNG and JPG signature images
- Optional date stamping
- Base64 encoding for file transfer

Tools

sign_pdf

Signs a PDF document by adding a signature image at the specified coordinates.

Parameters:
- pdf_data (string): Base64 encoded PDF file content
- signature_data (string): Base64 encoded signature image (PNG, JPG)
- page_number (int, optional): Page number to sign (1-based indexing, default: 1)
- x (float, optional): X coordinate from bottom-left corner in PDF units (default: 100)
- y (float, optional): Y coordinate from bottom-left corner in PDF units (default: 100)
- width (float, optional): Width of the signature in PDF units (default: 125)
- height (float, optional): Height of the signature in PDF units (default: 40)
- add_date (bool, optional): Whether to add current date next to signature (default: false)

Returns: Base64 encoded signed PDF content

get_pdf_info

Get information about a PDF document including page count and dimensions.

Parameters:
- pdf_data (string): Base64 encoded PDF file content

Returns:

{
"num_pages": 1,
"pages": [
{
"page_number": 1,
"width": 612.0,
"height": 792.0
}
]
}

Installation

Prerequisites

- Python 3.11+
- uv package manager (recommended) or pip

Local Installation

1. Clone or download this repository
2. Install dependencies:

   uv pip install -r requirements.txt

Running the Server

To run the MCP server:

uv run python mcp_server.py

The server will start with stdio transport by default.

Testing

A test script is provided to verify the server functionality:

uv run python test_server.py

This will:
1. Create a test PDF document
2. Generate a test signature image
3. Test the get_pdf_info tool
4. Test the sign_pdf tool
5. Save the signed PDF as test_signed.pdf

Docker Deployment

The server includes Docker support for containerized deployment:

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.