home / mcp / paperless mcp server
Provides an MCP server to connect Paperless-ngx with AI assistants via HTTP or stdio transports for document management operations.
Configuration
View docs{
"mcpServers": {
"cbinckly-paperless-mcp-go": {
"url": "http://localhost:8080/mcp",
"headers": {
"LOG_LEVEL": "info",
"MCP_HTTP_PORT": "8080",
"MCP_TRANSPORT": "stdio",
"PAPERLESS_URL": "https://paperless.example.com",
"MCP_AUTH_TOKEN": "optional_mcp_auth_token",
"PAPERLESS_TOKEN": "your_paperless_api_token_here"
}
}
}
}You run a Paperless-ngx MCP Server to let AI assistants and other MCP clients interact with your Paperless document management system. It supports both local stdio transports and HTTP-based transports, making it easy to connect from various environments while keeping your Paperless data secure and searchable through familiar MCP tools.
Connect your MCP client to your Paperless MCP Server using either the HTTP transport or the stdio transport. With HTTP, your server acts as a standalone service that the client can reach over the network. With stdio, the MCP server runs locally alongside the client process, communicating through standard input and output. You can perform common document operations such as searching, retrieving content, creating or updating documents, and managing related metadata like correspondents, document types, tags, and custom fields. Security can be enhanced by enabling an MCP authentication token when exposing HTTP.
Prerequisites you need before installing the MCP server:
Choose your preferred deployment method. The MCP server provides both HTTP transport and stdio transport options. Follow the steps below for each method.
PAPERLESS_URL=https://paperless.example.com
PAPERLESS_TOKEN=your_paperless_api_token_here
MCP_TRANSPORT=http
MCP_HTTP_PORT=8080
```
```bash
# Run via Docker for HTTP transport
docker run --rm --env-file .env -p 8080:8080 cbinckly/paperless-mcp-go:latestTo run the MCP server as a standalone HTTP service, configure the environment and start the server. You will access the MCP endpoint at the provided port.
Example start command and URL:
export PAPERLESS_URL=https://paperless.example.com
export PAPERLESS_TOKEN=your_token_here
export MCP_TRANSPORT=http
export MCP_HTTP_PORT=8080
./paperless-mcp
# Then open http://localhost:8080/mcpTo run the MCP server locally with stdio transport, use a local process that launches the MCP server and communicates via standard IO streams.
Example container-based stdio setup using Docker (as shown in the configuration example):
{
"mcpServers": {
"paperless_mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--pull=always",
"cbinckly/paperless-mcp-go:latest"
],
"env": {
"PAPERLESS_URL": "https://paperless.example.com",
"PAPERLESS_TOKEN": "your_paperless_api_token_here",
"MCP_TRANSPORT": "stdio"
}
}
}
}You can enable an optional authentication token for MCP clients when using HTTP transport. Set MCP_AUTH_TOKEN in the environment; clients must present it as a Bearer token in the Authorization header to access MCP endpoints. This helps protect your Paperless data from unauthorized access.
The server supports a complete set of document and metadata tools, including searching, retrieving, creating, updating, and deleting documents, as well as managing correspondents, document types, tags, storage paths, and custom fields. It also includes utility tools like ping and server_info for quick health checks and status reporting.
Search documents by text query with pagination, returning metadata and previews as available.
Find documents similar to a given document based on content or metadata.
Retrieve a document by ID along with all its metadata.
Get the textual content of a document.
Create a new document with associated metadata.
Update metadata for an existing document.
Delete a document from the system.
Apply bulk operations to multiple documents, such as tagging or updating fields.
List all correspondents with pagination.
Get details for a specific correspondent by ID.
Create a new correspondent entry.
Update an existing correspondent's information.
Delete a correspondent.
List all document types with pagination.
Get details for a document type by ID.
Create a new document type.
Update document type information.
Delete a document type.
List all tags with pagination.
Get tag details by ID.
Create a new tag.
Update tag information.
Delete a tag.
List all storage paths with pagination.
Get storage path details by ID.
Create a new storage path.
Update storage path information.
Delete a storage path.
List all custom fields with pagination.
Get custom field details by ID.
Create a new custom field.
Update custom field information.
Delete a custom field.
Test tool that returns pong.
Get MCP server and Paperless connection information.