Skip to main content
Glama
NikhilBelwate

pdf-merger-mcp-server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PORTNoHTTP server port (only when TRANSPORT=http)4000
TRANSPORTNoTransport mode: stdio or httpstdio
PDF_MERGER_API_URLNoBase URL of the PDF Merger App APIhttp://localhost:3000

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
pdf_merger_upload_pdfsA

Upload one or more PDF files to the PDF Merger service for later merging.

Each file must be a valid PDF (≤100 MB). Up to 30 files can be uploaded per session. If session_id is provided, files are appended to that existing session; otherwise a new session is created.

Args:

  • file_paths (string[]): Absolute paths to PDF files on disk.

  • session_id (string, optional): UUID of existing session to append to.

Returns (JSON): { "session_id": "uuid", "files": [ { "id": "uuid", "name": "doc.pdf", "size": 102400, "sizeFormatted": "100.0 KB" } ] }

Examples:

  • Upload two files to a new session: file_paths=["/tmp/report.pdf", "/tmp/appendix.pdf"]

  • Append to existing session: file_paths=["/tmp/extra.pdf"], session_id="550e8400-..."

Error Handling:

  • File not found on disk → clear message with the missing path

  • Non-PDF file → 415 error from API

  • File >100 MB → 413 error from API

  • 30 files in session → 400 error from API

pdf_merger_remove_fileA

Remove a single PDF file from an upload session on the PDF Merger service.

The file is permanently deleted from cloud storage. This operation cannot be undone.

Args:

  • session_id (string): UUID of the session containing the file.

  • file_id (string): UUID of the file to remove.

Returns (JSON): { "success": true }

Error Handling:

  • Session not found → 404 error

  • File not found in session → 404 error

pdf_merger_mergeA

Merge previously uploaded PDFs in a specified order into a single PDF.

Returns a one-time download token. Use pdf_merger_get_download_url to build the download link. The session is consumed after merging — re-upload files to merge again.

Args:

  • session_id (string): UUID of the upload session.

  • file_order (string[]): Ordered array of file UUIDs. The first entry becomes the first pages of the merged output. Must contain at least 2 file IDs and at most 30.

Returns (JSON): { "token": "uuid", "page_count": 45, "size_formatted": "2.3 MB", "download_url": "https://..." }

Workflow:

  1. Upload PDFs using pdf_merger_upload_pdfs

  2. (Optional) Remove unwanted files using pdf_merger_remove_file

  3. Merge using this tool with desired file order

  4. Use the returned download_url to download the merged PDF

Error Handling:

  • Session not found → 404

  • File order contains unknown IDs → 400

  • Encrypted/corrupt PDF → 422

  • Less than 2 files → 400

pdf_merger_get_download_urlA

Build a one-time download URL for a merged PDF.

The token is returned by pdf_merger_merge. Each token can only be used once; after the first download the link expires and all associated cloud files are cleaned up.

Args:

  • token (string): One-time download token UUID from the merge response.

Returns (JSON): { "download_url": "https://your-api.example.com/download/" }

Notes:

  • Opening the URL in a browser triggers a file download of "merged.pdf".

  • After download, source blobs are automatically deleted from cloud storage.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/NikhilBelwate/pdf-merger-mcp-server'

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