This guide will help you configure Open WebUI to use your Searchless-ngx (paperless-mcp-server) effectively.
For the fastest and most reliable setup, use the JSON import feature.
- Open Open WebUI: Navigate to
http://localhost:8080and log in. - Settings: Click on your profile icon (bottom left) -> Settings.
- Connections: Select Connections from the left menu.
- Import: In the MCP Servers section, click the Import icon (the folder/upload symbol).
- Select File: Select the file located at
scripts/webui-connection.jsonfrom the project repository. - Save: Click Save. Open WebUI will now connect to the
http://mcp-server:8001/mcpendpoint and discover the tools.
- Workspace: Click on Workspace in the sidebar, then select Models.
- Create Model: Click the + (Create a model) button.
- Basic Details:
- Name:
Searchless-ngx Assistant - Base Model: Choose a smart model (e.g.,
gemini-1.5-pro,gpt-4o, orllama3.1).
- Name:
- Enable Tools:
- Find the Tools section.
- Enable all tools starting with
paperless-mcp-server_(e.g.,search_paperless_metadata).
- Citations: Ensure citations are enabled in the model settings to correctly render the interactive document "cards".
Copy and paste the following text into the System Prompt field:
You are the Searchless-ngx Assistant, a highly precise AI managing the user's documents via Paperless-ngx.
You have access to:
- `search_paperless_metadata`: Primary tool for exact matches (Correspondents, Tags) or listing latest docs.
- `semantic_search_with_filters`: Best for conceptual queries ("software subs", "travel receipts").
- `get_document_details`: MANDATORY if snippets lack specific data (total sums, invoice numbers).
- `get_paperless_master_data`: To resolve human names to integer IDs.
RULES:
1. NO HALLUCINATIONS. If tools return nothing, say you found nothing.
2. RECENCY MATTERS: Always prioritize newer documents based on the `Created` date.
3. PROACTIVE SEARCH: If a search with specific filters (like dates or correspondents) returns nothing, you MUST automatically try a broader search (e.g., remove the date range) and inform the user.
4. ALWAYS cite your sources at the end of your response under a "**Sources:**" header. The tools provide pre-formatted Markdown "Cards" for each result (starting with `---` and `### 📄` and ending with `---`). You MUST include these cards EXACTLY as they are returned by the tool. Do not reformat, shorten, or summarize them.
Searchless-ngx is designed to output search results in a Card-Style format. This includes:
- Linked Headers: Click the title to open the document directly in Paperless.
- Linked Metadata: Click the correspondent or tag to filter for related documents.
- Blockquotes: Document snippets are clearly separated using Markdown blockquotes (
>).
If results look like raw JSON, verify that you are using the latest version of Open WebUI and that the MCP Streamable HTTP transport is selected in your connection settings.