Skip to main content
Glama
paperless-mcp
by chiefmikey

paperless-mcp

MCP server exposing Paperless-ngx document management via its REST API.

Overview

A Model Context Protocol (MCP) server that wraps the Paperless-ngx REST API, enabling Claude and other AI models to:

  • Search and retrieve documents

  • Get full document content and metadata

  • Update document metadata (title, correspondent, document type, tags)

  • List available tags, correspondents, and document types

  • Check Paperless-ngx system status

Related MCP server: KnowledgeMCP

Installation

npm install

Configuration

Set these environment variables before starting:

  • PAPERLESS_URL — required, e.g. http://paperless.local:8000

  • PAPERLESS_TOKEN — required, API token from Paperless-ngx (obtained via /api/token/)

  • PAPERLESS_TIMEOUT_MS — optional, default 15000 ms

Obtaining a Paperless-ngx API token

# Login to Paperless-ngx and go to Settings > Profile > REST API Tokens
# Or obtain programmatically:
curl -X POST http://paperless.local:8000/api/token/ \
  -H "Content-Type: application/json" \
  -d '{"username":"your-user","password":"your-pass"}'

Running

# Start the MCP server (reads from stdin, writes to stdout)
PAPERLESS_URL="http://paperless.local:8000" \
PAPERLESS_TOKEN="your-token" \
node dist/index.js

Or use the bin alias:

npm run build
PAPERLESS_URL="..." PAPERLESS_TOKEN="..." \
  ./node_modules/.bin/paperless-mcp

Development

npm run dev        # Watch mode with tsx
npm run build      # Compile TypeScript
npm run typecheck  # Type-check without emitting
npm run lint       # ESLint (mikey-pro)
npm run format     # Prettier
npm test           # Vitest

All checks must pass before committing:

npm run typecheck && npm run lint && npm test && npm run build

API Tools

The MCP server registers 8 tools:

  1. paperless_health — System status (database, task count)

  2. search_documents — Full-text search with pagination

  3. get_document — Fetch full document (including content)

  4. update_document — Update title, correspondent, type, tags

  5. list_tags — All available tags

  6. list_correspondents — All available correspondents

  7. list_document_types — All available document types

Architecture

src/
  index.ts           — Entrypoint, stdio server setup
  server.ts          — Tool registration (8 tools)
  paperless.ts       — Paperless-ngx API client + types
  paperless.test.ts  — Comprehensive test suite (26 tests)

CI/CD

  • .gitea/workflows/ci.yml — Gitea Actions: lint, typecheck, test, build

  • .gitea/workflows/mirror.yml — Auto-mirror to GitHub on every push

License

MIT

Available Tools

7 tools
get_documentA

Get the full content and metadata of a single Paperless-ngx document by ID

Inputs: id (required).

list_correspondentsB

List all correspondents defined in Paperless-ngx with their IDs and document counts

Inputs: no named parameters.

list_document_typesA

List all document types defined in Paperless-ngx with their IDs and document counts

Inputs: no named parameters.

list_tagsA

List all tags defined in Paperless-ngx with their IDs and document counts

Inputs: no named parameters.

paperless_healthA

Get Paperless-ngx status (database status and available tasks — connectivity check)

Inputs: no named parameters.

search_documentsA

Search Paperless-ngx documents by full-text query, returns summaries with IDs

Inputs: query (required), page.

update_documentB

Update metadata fields (title, correspondent, document type, tags, created date) on a Paperless-ngx document

Inputs: id (required), correspondent, created, document_type, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool has a clear and distinct purpose: retrieving a single document, searching documents, updating documents, listing correspondents/types/tags, and checking health. No overlap or ambiguity.

    Naming Consistency5/5

    Tool names consistently follow a verb_noun pattern in snake_case (e.g., get_document, list_tags, search_documents). Even 'paperless_health' follows the pattern with a noun_noun structure, maintaining readability.

    Tool Count5/5

    With 7 tools, the set is well-scoped for a Paperless-ngx MCP server. It covers core operations without being overwhelming or too sparse.

    Completeness2/5

    The tool set is missing crucial operations: no create_document or delete_document, and no ability to create, update, or delete correspondents, document types, or tags. This leaves significant gaps in document lifecycle management.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      An MCP (Model Context Protocol) server for interacting with a Paperless-NGX API server. This server provides tools for managing documents, tags, correspondents, and document types in your Paperless-NGX instance.
      44
      722 npm
      151
      TypeScript
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables AI assistants to perform semantic searches over local document collections using multi-context organization and automatic OCR. It supports various file formats including PDF, DOCX, and images, ensuring all data processing remains local and private.
      8
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      An MCP server that adds AI-powered document intelligence to Paperless-ngx, enabling semantic search, automatic classification, receipt data extraction, bank statement matching, and accounting export — all running locally via Ollama.
      32
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that indexes documents and serves relevant context to LLMs via Retrieval Augmented Generation (RAG).
      35 npm
      36
      MIT