Paperless MCP Server
Provides comprehensive tools for interacting with a Paperless-ngx document management instance, including full CRUD and search over documents, tags, correspondents, document types, storage paths, custom fields, and saved views, plus bulk document updates, retrieval of document content/metadata/downloads and AI metadata suggestions, task listing and acknowledgement, and access to system statistics and logs.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Paperless MCP Server
A Model Context Protocol (MCP) server for integrating with Paperless-ngx document management system. This server enables AI assistants to search, retrieve, and manage documents stored in Paperless-ngx through a standardized interface.
Features
🔧 Tools (41 total)
Transport Options
The server supports three transport modes, selectable via the MCP_TRANSPORT environment variable:
stdio(default): For MCP clients like Claude Desktop that use stdin/stdout communicationhttp: For HTTP-based integrations (e.g., ChatGPT, browser clients)both: Start both HTTP and STDIO servers simultaneously
Example Usage
# Environment variables
export PAPERLESS_URL="http://your-paperless-instance:8000"
export PAPERLESS_TOKEN="your_api_token_here"
# STDIO only (default)
export MCP_TRANSPORT="stdio"
./start.sh
# HTTP only
export MCP_TRANSPORT="http"
export MCP_PORT="3000"
./start.sh
# Both HTTP and STDIO
export MCP_TRANSPORT="both"
export MCP_PORT="3000"
./start.shThe start script will:
Start the MCP server(s) according to your selected mode
Print local HTTP endpoints and/or STDIO readiness
No tunneling or public exposure is included by default. For remote access, use your own reverse proxy, VPN, or secure tunnel solution.
HTTP endpoints:
GET /health- Health checkPOST /api- Modern Streamable HTTP with Mcp-Session-Id headers (for ChatGPT)Legacy endpoints:
GET /message,POST /message,/mcp(SSE-based)
System & Tasks (4 tools)
list_tasks: List all tasks in Paperless-ngx
acknowledge_task: Acknowledge a completed task
get_statistics: Get Paperless-ngx statistics (doc counts, types, etc.)
get_logs: Get Paperless-ngx system logs
📄 Resources
Document Content: Access full document content as resources for AI context
Document Metadata: Structured access to document information
Related MCP server: paperless-mcp
Installation
Prerequisites
Node.js 18 or higher
A running Paperless-ngx instance
API token for your Paperless-ngx instance
Install from npm
npm install -g paperless-mcp-serverMigration Note: The package was previously published as
@mweinheimer/paperless-mcp-serverbut has been moved to the unscopedpaperless-mcp-server. If you have the old version installed, please uninstall it first:npm uninstall -g @mweinheimer/paperless-mcp-server npm install -g paperless-mcp-server
Install with npx (no global installation)
npx paperless-mcp-serverConfiguration
Set the following environment variables:
PAPERLESS_URL: URL of your Paperless-ngx instance (default:http://localhost:8000)PAPERLESS_TOKEN: Your Paperless-ngx API token (required)
Getting Your API Token
Log into your Paperless-ngx web interface
Go to Settings → API Tokens
Create a new token or copy an existing one
Usage
With Claude Desktop
Add the following to your Claude Desktop configuration file (claude_desktop_config.json):
Using global installation:
{
"mcpServers": {
"paperless": {
"command": "paperless-mcp",
"env": {
"PAPERLESS_URL": "http://your-paperless-instance:8000",
"PAPERLESS_TOKEN": "your_api_token_here"
}
}
}
}Using npx (recommended):
{
"mcpServers": {
"paperless": {
"command": "npx",
"args": ["-y", "paperless-mcp-server"],
"env": {
"PAPERLESS_URL": "http://your-paperless-instance:8000",
"PAPERLESS_TOKEN": "your_api_token_here"
}
}
}
}Transport Options
The server supports two transport protocols:
STDIO Transport (Default)
For MCP clients like Claude Desktop that use stdin/stdout communication:
# Environment variables
export PAPERLESS_URL="http://your-paperless-instance:8000"
export PAPERLESS_TOKEN="your_api_token_here"
# Run with STDIO (default)
paperless-mcpHTTP Transport
For HTTP-based integrations with ChatGPT and other HTTP clients using Streamable HTTP protocol:
# Clone the repository for development setup
git clone https://github.com/heimerle/paperless-mcp-server
cd paperless-mcp-server
# Install dependencies
npm install
# Configure your Paperless settings
cp config.example.sh config.sh
# Edit config.sh with your Paperless-ngx URL and API token
# Set transport mode to HTTP (optional, default is stdio)
export MCP_TRANSPORT="http"
export MCP_PORT="3000"
# Load config and start server
source config.sh
./start.shThe start script will:
Start the MCP server on the configured port (default 3000)
Print local HTTP endpoints for health and API access
No tunneling or public exposure is included by default. For remote access, use your own reverse proxy, VPN, or secure tunnel solution.
HTTP endpoints:
GET /health- Health checkPOST /api- Modern Streamable HTTP with Mcp-Session-Id headers (for ChatGPT)Legacy endpoints:
GET /message,POST /message,/mcp(SSE-based)
With Other MCP Clients
The server can be used with any MCP-compatible client. Launch it with:
Using global installation:
PAPERLESS_URL=http://your-paperless-instance:8000 PAPERLESS_TOKEN=your_token paperless-mcpUsing npx:
PAPERLESS_URL=http://your-paperless-instance:8000 PAPERLESS_TOKEN=your_token npx paperless-mcp-serverAPI Coverage
This MCP server provides comprehensive coverage of the Paperless-ngx API:
Fully Implemented (41 MCP Tools)
Documents: Full CRUD + search, content, metadata, suggestions, bulk operations
Tags: Complete CRUD operations
Correspondents: Complete CRUD operations
Document Types: Complete CRUD operations
Storage Paths: Complete CRUD operations
Custom Fields: Complete CRUD operations (all data types)
Saved Views: Complete CRUD operations with filters
Tasks: List and acknowledge tasks
System: Statistics and logs
Paperless-ngx API Endpoints Used
/api/documents/- Document operations/api/documents/{id}/- Specific document access/api/documents/{id}/content/- Full text content/api/documents/{id}/download/- Original file download/api/documents/{id}/suggestions/- AI metadata suggestions/api/documents/{id}/metadata/- Extracted metadata/api/tags/- Tag management/api/correspondents/- Correspondent management/api/document_types/- Document type management/api/storage_paths/- Storage path configuration/api/custom_fields/- Custom field definitions/api/saved_views/- Saved view management/api/tasks/- Background task monitoring/api/statistics/- System statistics/api/logs/- System logs
Example Interactions
Search for Documents
"Find all documents from John Doe about invoices"Get Document Details
"Show me the details of document 123"Update Document Metadata
"Tag document 456 with 'important' and 'financial'"Create New Tags
"Create a new tag called 'urgent' with red color"Bulk Update Documents
"Update documents 123, 456, and 789 to add the 'processed' tag and set correspondent to 'John Doe'"Development
Building
npm run buildDevelopment Mode
npm run devTesting with MCP Inspector
# With global installation
npx @modelcontextprotocol/inspector paperless-mcp
# With npx
npx @modelcontextprotocol/inspector npx paperless-mcp-serverSecurity Considerations
Keep your API token secure and never commit it to version control
Use environment variables or secure configuration management
Ensure your Paperless-ngx instance is properly secured
Consider network security when exposing Paperless-ngx API
Troubleshooting
Common Issues
Authentication Error: Verify your API token is correct and has necessary permissions
Connection Error: Check that
PAPERLESS_URLis accessible from where the MCP server runsMissing Documents: Ensure the user associated with the API token has access to the documents
Logging
The server logs errors to stderr. Check these logs when troubleshooting issues.
Publishing to npm
This package is configured for easy publishing to npm. To publish a new version:
Prerequisites
npm account with publishing rights
Logged in to npm (
npm login)
Publishing Steps
Update version (choose one):
npm version patch # 1.0.0 -> 1.0.1 npm version minor # 1.0.0 -> 1.1.0 npm version major # 1.0.0 -> 2.0.0Publish to npm:
npm publishVerify publication:
npm info paperless-mcp-server
The package includes:
Automatic build on
prepublishOnlyProper file filtering via
.npmignoreExecutable binary (
paperless-mcp)TypeScript declarations
Public access configuration
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
License
MIT License - see LICENSE file for details
Links
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Shared memory for your AI tools: tasks, notes and context every tool can read and write over MCP.
Related MCP Servers
- AlicenseCqualityBmaintenanceEnables searching, tagging, uploading, and reading documents in Paperless-NGX, with management of tags, correspondents, document types, and custom fields via MCP tools and resources.5062 PyPI1MIT
- FlicenseAqualityCmaintenanceMCP server for Paperless-ngx document management. Enables AI models to search, retrieve, update documents and manage metadata.7-
- AlicenseNot gradedqualityCmaintenanceA read-only and write MCP server for Paperless-ngx, enabling document listing, metadata retrieval, and creation of tags, correspondents, document types, and sorting workflows via natural language.MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for Paperless-ngx document management, enabling search, OCR content access, metadata updates, tag/correspondent/type management, and duplicate detection via natural language.1-