Skip to content

MCP Server

@barrierbreak/a11ydocs-pdf ships an MCP (Model Context Protocol) server that exposes PDF generation and manipulation as tools for AI assistants like Claude.

Install

The MCP package is published on a private npm registry. Add the scope to your .npmrc:

ini
@barrierbreak:registry=https://npm.barrierbreak.net

Then register with Claude:

bash
claude mcp add a11ydocs -- npx --registry=https://npm.barrierbreak.net @barrierbreak/a11ydocs-pdf-mcp

Set a workspace directory to scope all file operations:

bash
claude mcp add a11ydocs -- npx --registry=https://npm.barrierbreak.net @barrierbreak/a11ydocs-pdf-mcp --env WORKSPACE_DIR=~/Documents/pdf-workspace

Tools

ToolPurpose
generate_pdfRender a PDF from a declarative PdfDocumentJson document
extract_textPull text out of a PDF, per page
get_pdf_infoDocument metadata + page count
inspect_pdfForms, bookmarks, attachments, tagged/conformance flags
merge_pdfsConcatenate several PDFs in order
split_pdfOne single-page PDF per source page
extract_pagesKeep a subset of pages (by index)
append_pagesAppend pages from one PDF onto another
validate_pdf2Report PDF 2.0 conformance issues

generate_pdf Quick Example

The document argument is a PdfDocumentJson value. Minimal:

json
{
  "document": {
    "page": { "size": "A4" },
    "blocks": [
      { "type": "heading", "text": "Hello World", "options": { "level": 1 } },
      { "type": "paragraph", "text": "Generated via MCP." }
    ]
  },
  "outputPath": "hello.pdf"
}

With embedded fonts, encryption, headers, and absolute positioning — see the JSON to PDF guide for the full schema.

Released under the ISC license.