paperless-mcp
Allows interaction with a Paperless-ngx instance, providing tools for searching documents, fetching OCR'd text, and listing tags, document types, correspondents, and custom fields.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@paperless-mcpdid I take the standard deduction on my 2024 taxes and what was my AGI?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
paperless-mcp
An MCP server that exposes a self-hosted Paperless-ngx instance as tools an MCP client (Claude Desktop, Claude Code) can call — search documents, fetch a document's OCR'd text, and list tags/document types/correspondents/custom fields. Paperless already does OCR and full-text indexing; this server doesn't add its own index or vector store, it just gives Claude a way to query Paperless's.
Designed to run LAN-only: no public exposure, no router port-forwarding. Only reachable from MCP clients on the home network.
Two independent auth layers
This server → Paperless — a Paperless API token, sent as
Authorization: Token <token>on every request to Paperless. Generated from a dedicated read-only Paperless user (not your admin account), so read-only is enforced by Paperless itself, not just by this server's code never calling write endpoints.MCP client → this server — a static bearer token (
Authorization: Bearer <token>), checked before any request reaches the MCP transport. The LAN isn't a trust boundary by itself, and these documents include tax/financial data, so this server should never be reachable without it.
Related MCP server: paperlessngx-mcp
1. Paperless-side setup
In Paperless's admin UI, create a new user (e.g.
mcp-readonly) and grant it view-only permissions on documents (and whatever tags/types/correspondents/custom fields it should be able to list) — not the admin account.Log in as that user and generate an API token: user profile → "API Auth Token", or
POST /api/token/with that user's username/password.Verify read-only is actually enforced, independent of this server's code:
curl -i -X PATCH \ -H "Authorization: Token <token>" \ -H "Content-Type: application/json" \ -d '{"title": "should not work"}' \ http://<paperless-host>/api/documents/<some-id>/This should come back
403 Forbidden.Confirm the base URL this server should use — see "Networking on naspi" below.
2. Configure
cp .env.example .envFill in:
PAPERLESS_BASE_URL— how this container reaches Paperless (see below).PAPERLESS_API_TOKEN— the read-only user's token from step 1.MCP_BEARER_TOKEN— a long random string (e.g.openssl rand -hex 32). This is what MCP clients must send.PORT— defaults to8420.LAN_BIND_IP— required. naspi's LAN-facing IP;docker compose uprefuses to start without it, so port 8420 never binds to a public interface by accident. See "Networking on naspi" below.
3. Run locally (before containerizing)
npm install
npm test # unit tests — no live Paperless instance needed
npm run dev # starts the server against your real Paperless instanceThen use the MCP inspector to call tools manually and confirm real results come back:
npx @modelcontextprotocol/inspectorPoint it at http://localhost:8420/mcp with header Authorization: Bearer <MCP_BEARER_TOKEN>, and try
search_documents, get_document, and list_facets.
4. Networking on naspi
Two options, in order of preference:
Join Paperless's existing Docker network (preferred — internal, no LAN hop). Find its network name with
docker network ls/docker inspect <paperless-webserver-container>, then set that as theexternalnetwork name indocker-compose.yml, and setPAPERLESS_BASE_URLto the Paperless container's name on that network (e.g.http://paperless-webserver-1:8000).Reach Paperless over the LAN IP/port if the containers can't share a network, e.g.
PAPERLESS_BASE_URL=http://10.4.0.100:<paperless-port>.
Set LAN_BIND_IP in .env to naspi's LAN-only IP so docker-compose publishes port 8420 only on that
interface — required even if naspi doesn't currently have a public IP, since it's a cheap guard against
future network changes exposing this server by accident.
5. Deploy
docker compose up -d --buildVerify it's LAN-only:
# From a device on the home network — should succeed (401 without the bearer token is expected/correct):
curl -i http://10.4.0.100:8420/healthz
# From outside the LAN — should fail/time out, confirming no public exposure.6. Connect an MCP client
Point Claude Desktop / Claude Code's remote MCP server config at:
URL:
http://10.4.0.100:8420/mcpHeader:
Authorization: Bearer <MCP_BEARER_TOKEN>
Then ask it something like "what does error code E4 mean on my dryer" or "did I take the standard
deduction on my 2024 taxes and what was my AGI" — it should call list_facets/search_documents to find the
right document, get_document to read it, and answer from the actual OCR'd content.
Maintenance
Regenerating tokens: revoke/regenerate the Paperless API token from the
mcp-readonlyuser's profile; update.envand redeploy. RotateMCP_BEARER_TOKENthe same way — update.env, redeploy, and update every MCP client's config.Redeploying:
docker compose up -d --buildpicks up code or.envchanges.Scaling to more MCP servers on naspi later: keep each server on its own port for now. If a second one gets added, put a single LAN-only reverse proxy (e.g. Caddy) in front of all of them with path routing (
/mcp/paperless,/mcp/other) instead of tracking a growing list of ports — this server doesn't need to change for that, only how it's fronted.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseBqualityCmaintenanceEnables searching, tagging, uploading, and reading documents in Paperless-NGX, with management of tags, correspondents, document types, and custom fields via MCP tools and resources.49
- FlicenseAqualityBmaintenanceA privacy-first MCP server for Paperless-ngx that lets an LLM agent search, organize, tag, and reference documents without exposing full text unless explicitly requested.13
- FlicenseAqualityCmaintenanceMCP server for Paperless-ngx document management. Enables AI models to search, retrieve, update documents and manage metadata.7
- Alicense-qualityAmaintenanceA 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
Related MCP Connectors
Agentic search over your Dewey document collections from any MCP-compatible client.
MCP server for AgentDocs (agentdocs.eu): read, search, write, comment on & share Markdown docs.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dguastaf/paperless-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server