home / mcp / unlock pdf mcp server

Unlock PDF MCP Server

Provides a Python-based MCP server to read protected or unprotected PDFs via a controlled, local runtime.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "algonacci-mcp-unlock-pdf": {
      "command": "uv",
      "args": [
        "--directory",
        "%USERPROFILE%/Documents/GitHub/mcp-unlock-pdf",
        "run",
        "python",
        "main.py"
      ]
    }
  }
}

This MCP Server enables clients to read protected or unprotected PDFs by delegating the task to a Python script. It exposes a dedicated server endpoint that runs a local Python process to handle PDF access requests, making it easy to integrate controlled PDF reading into your MCP workflow.

How to use

You will run a local MCP server that uses Python to process PDF access requests. The server is configured to execute a Python script named main.py from a designated directory whenever it is started by your MCP client. To enable this, you add a server entry labeled unlock_pdf to your MCP configuration. This entry tells the MCP runtime to run the Python-based server logic in the specified directory.

How to install

Prerequisites you need before starting: a Python 3.x environment. Ensure Python is installed and available in your system path.

Create the server directory structure and place your Python logic there. The key script in this setup is main.py, which should reside in the following directory on your system:

%USERPROFILE%/Documents/GitHub/mcp-unlock-pdf

Create the MCP configuration that points to this server. Save the following JSON in your MCP config file exactly as shown:

{
  "mcpServers": {
    "unlock_pdf": {
      "command": "uv",
      "args": [
        "--directory",
        "%USERPROFILE%/Documents/GitHub/mcp-unlock-pdf",
        "run",
        "python",
        "main.py"
      ]
    }
  }
}

Additional notes

The server is designed to execute Python code located in the specified directory. Ensure that main.py and any required dependencies are present in that directory before starting the MCP runtime. If your environment uses a different MCP runtime or additional startup steps, adjust the command and arguments in the configuration accordingly while keeping the same directory and entry script.

Security and usage notes

Limit access to the MCP server to trusted clients, as PDF reading capabilities can expose sensitive content. If you adapt the script to handle protected PDFs, ensure proper authentication and authorization checks are in place within main.py. Regularly review dependencies for known security fixes and keep Python environments isolated where possible.