AboutBlogHow-To VideosPricingDevelopers

Developers · open source

PDF MCP Server for Claude, ChatGPT and Cursor

Ask your AI. Your PDFs get edited.

PDF MCP server that gives Claude, ChatGPT and Cursor tools to merge, split, rotate, reorder and extract PDF pages. It is free and open source, works in Codex, Gemini CLI and other AI apps too, and runs on your computer: every result is a new file next to the original, and nothing is uploaded.

claude mcp add utilitly -- npx -y @utilitly/mcp ~/Documents ~/Downloads ~/Desktop
Merge ~/Downloads/march.pdf and ~/Downloads/april.pdf, then delete the blank page 3.
merge_pdfsdone
delete_pages · pages "3"done
Done. I merged them into march-merged.pdf, then removed page 3. The result is ~/Downloads/march-merged-trimmed.pdf, 11 pages. Your originals weren't touched.
march.pdfapril.pdfmarch-merged.pdfmarch-merged-trimmed.pdf
Example conversation
0 requests · 0 B

There's no network code in the server or the packages, and a test fails if any tool tries to connect. Free and MIT licensed, with no account or API key, and listed in the official MCP Registry as com.utilitly/mcp.

Install the PDF MCP server

You need Node.js 22 or newer. The first run downloads the server through npx. The folders after the package name are the only places it may read and write, so change them to wherever your PDFs live.

Claude Code

Run this in a terminal:

claude mcp add utilitly -- npx -y @utilitly/mcp ~/Documents ~/Downloads ~/Desktop

Claude Desktop

Open Settings, then Developer, then Edit Config, and add this to claude_desktop_config.json. Restart Claude Desktop afterwards.

{
  "mcpServers": {
    "utilitly": {
      "command": "npx",
      "args": ["-y", "@utilitly/mcp", "~/Documents", "~/Downloads", "~/Desktop"]
    }
  }
}

Cursor

Put the same mcpServers block in ~/.cursor/mcp.json:

{
  "mcpServers": {
    "utilitly": {
      "command": "npx",
      "args": ["-y", "@utilitly/mcp", "~/Documents", "~/Downloads", "~/Desktop"]
    }
  }
}

ChatGPT desktop app and Codex

The two share one setup, so adding the server to either one adds it to both. In the ChatGPT app, open Settings, then MCP servers, then Add server. Choose STDIO, enter the command npx with these arguments, save, and restart:

-y @utilitly/mcp ~/Documents ~/Downloads ~/Desktop

Or from the Codex CLI:

codex mcp add utilitly -- npx -y @utilitly/mcp ~/Documents ~/Downloads ~/Desktop

Gemini CLI

Everything after -- goes to npx, and -s user makes the server available in every folder you start Gemini in.

gemini mcp add -s user utilitly npx -- -y @utilitly/mcp ~/Documents ~/Downloads ~/Desktop

Other apps

Anything that can start a local (stdio) MCP server works. The command is npx with the arguments -y @utilitly/mcp, followed by the folders.

The server is also listed in the official MCP Registry as com.utilitly/mcp, so apps and directories that read the registry can find it by that name.

Claude, ChatGPT, Codex, Gemini and Cursor are trademarks of their owners and appear here only to show which apps the server works with. Utilitly isn't affiliated with or endorsed by them.

What your AI can do with it

Eight tools, each named so the AI app can tell what it does. Results land in the same folder as the input, and a name that's already taken gets -2, -3 and so on, so a file is never replaced.

pdf_info

Page count, file size, first page size, and whether the PDF is password-protected. Changes nothing.

Writes no file
merge_pdfs

Combines PDFs in the order given.

Writes <first>-merged.pdf
split_pdf

One file per range, such as "1-2, 3-end".

Writes <name>-part1.pdf, -part2.pdf, …
extract_pages

The selected pages as one PDF, in page order.

Writes <name>-pages.pdf
rotate_pdf

Turns pages by a multiple of 90 degrees.

Writes <name>-rotated.pdf
delete_pages

Removes pages. At least one has to stay.

Writes <name>-trimmed.pdf
reorder_pages

Puts every page in a new order.

Writes <name>-reordered.pdf
duplicate_pages

Adds copies after each page or at the end.

Writes <name>-duplicated.pdf

Things to ask

Once it's installed, ask in plain words and use full paths:

  • “Merge ~/Downloads/march.pdf and ~/Downloads/april.pdf.”
  • “Delete the blank page 3 from ~/Desktop/scan.pdf.”
  • “Split ~/Documents/handbook.pdf into pages 1-12, 13-30 and 31 to the end.”
  • “Pages 2 to 4 of ~/Desktop/scan.pdf are sideways; turn them the right way up.”
  • “How many pages does ~/Documents/contract.pdf have, and is it locked?”

What it can and can't touch

  • It never overwrites. Input files are only read, never changed.
  • With folders listed at install, nothing outside them can be read or written. The check runs after symlinks are resolved.
  • Paths must be absolute or start with ~/, so the AI can't wander into the wrong folder through a relative path.
  • Password-protected PDFs are refused rather than altered.
  • Merging and other rebuilds don't carry over bookmarks or working form fields. Rotating keeps the whole document.

Open-source PDF libraries for JavaScript

The same engines also ship as six npm packages for your own code. Each one takes a PDF as bytes and returns new bytes, so the same code runs in Node.js and in the browser. They ship ESM and CommonJS builds with TypeScript types, and their one dependency is pdf-lib.

@utilitly/pdf-merge

Merge PDFs into one, in the order given.

npm install @utilitly/pdf-merge
import { readFile, writeFile } from 'node:fs/promises'
import { mergePdfs } from '@utilitly/pdf-merge'

const book = await mergePdfs([
  await readFile('cover.pdf'),
  await readFile('chapter-1.pdf'),
  await readFile('chapter-2.pdf'),
])
await writeFile('book.pdf', book)

Questions

Can Claude edit PDFs?

Yes, once it has a tool for the job. With the Utilitly MCP server installed, Claude Code and Claude Desktop can merge, split, rotate, delete, reorder and duplicate pages in PDF files on your computer. Each result is saved as a new PDF next to the original, so nothing is overwritten.

Can ChatGPT edit PDFs?

Yes, once it has a tool for the job. Install the Utilitly MCP server in the ChatGPT desktop app or Codex, which share one setup, and ChatGPT can merge, split, rotate, delete, reorder and duplicate pages in PDF files on your computer without uploading them. Each result is saved as a new PDF next to the original.

Can Gemini edit PDFs?

Gemini CLI can, with the Utilitly MCP server installed: it can then merge, split, rotate, delete, reorder and duplicate pages in PDF files on your computer. The server works with apps that run local MCP servers, so it does not plug into the Gemini website.

Is the PDF MCP server free?

Yes. It is open source under the MIT license, with no account, no API key and no daily limit.

Does it upload my PDFs?

No. The server runs on your computer and edits files where they sit. It contains no network code, and a test in the repository fails if any tool tries to open a connection. Your AI app still sends your messages to its model as usual, including any file paths you type and each tool's short reply (file paths, page counts and sizes), but never the contents of a PDF.

Can it read what is inside my PDFs?

No. It reports a PDF's page count, file size, first page size and whether it is password-protected, but it never passes the text or images of a PDF to the AI. It is built for changing PDFs, not reading them.

Which AI apps does it work with?

Claude Code, Claude Desktop, the ChatGPT desktop app, Codex, Gemini CLI, Cursor, and any other app that can start a local (stdio) MCP server. It is listed in the official MCP Registry as com.utilitly/mcp. Your computer needs Node.js 22 or newer.

What about password-protected PDFs?

They are refused rather than changed, and pdf_info tells you when a file is locked. Remove the password first, for example with Unlock PDF on utilitly.com, then try again.

Rather not install anything?

Every one of these jobs also runs in your browser on utilitly.com, free and without uploading the file.

Open the free PDF tools