Skip to main content
Glama
pdfdotco

PDF.co MCP Server

Official
by pdfdotco

pdf_remove_password

Remove password protection from a PDF file using a secure URL or uploaded file. Access the unlocked PDF for editing or sharing without restrictions.

Instructions

Remove password protection from a PDF file. Ref: https://developer.pdf.co/api-reference/pdf-password/remove.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNoPDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)
httppasswordNoHTTP auth password if required to access source url. (Optional)
httpusernameNoHTTP auth user name if required to access source url. (Optional)
nameNoFile name for the generated output. (Optional)
passwordNoPassword of the PDF file to be removed. (Optional)
urlYesURL to the source PDF file. Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files.

Implementation Reference

  • MCP tool handler function for 'pdf_remove_password', decorated with @mcp.tool() which registers it. Defines input schema using Pydantic Field descriptions. Prepares ConversionParams and delegates to remove_pdf_password service function.
    @mcp.tool() async def pdf_remove_password( url: str = Field( description="URL to the source PDF file. Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files." ), httpusername: str = Field( description="HTTP auth user name if required to access source url. (Optional)", default="", ), httppassword: str = Field( description="HTTP auth password if required to access source url. (Optional)", default="", ), password: str = Field( description="Password of the PDF file to be removed. (Optional)", default="" ), name: str = Field( description="File name for the generated output. (Optional)", default="" ), api_key: str = Field( description="PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)", default="", ), ) -> BaseResponse: """ Remove password protection from a PDF file. Ref: https://developer.pdf.co/api-reference/pdf-password/remove.md """ params = ConversionParams( url=url, httpusername=httpusername, httppassword=httppassword, password=password, name=name, ) return await remove_pdf_password(params, api_key=api_key)
  • Service helper function that invokes the PDF.co API endpoint '/v1/pdf/security/remove' via the generic 'request' function to remove password from PDF.
    async def remove_pdf_password( params: ConversionParams, api_key: str | None = None ) -> BaseResponse: return await request("pdf/security/remove", params, api_key=api_key)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pdfdotco/pdfco-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server