Summary
Let Cursor search inside a Windows file server, NAS or network share (SMB/CIFS or NFS) mounted into a self-hosted AnythingMCP: full-text index of PDF, Excel, Word and Outlook files, synced in the background. Self-hosted only.
Try asking
Example prompts for Network folder (File Search)
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
Network folders in Cursor
Self-hosted only. The network folder exists only in a self-hosted AnythingMCP. On AnythingMCP Cloud, reach a NAS over SFTP or WebDAV instead.
Short answer: mount the share read-only on the server that runs your self-hosted AnythingMCP, and add the folder as a File Search connector. AnythingMCP indexes the full text of every supported file and keeps the index in sync, and the files never leave your network. Then connect AnythingMCP to Cursor. Cursor can find files by name and by content, read the pages it needs and give you the file itself, attached or as a temporary download link. Nothing is ever written to the share.
An AI assistant cannot open a network drive on its own, and one that could would have to download every file to answer one question. The index is what makes a question like "what does article NT-601 cost in the current price list?" take seconds.
What you need
- A self-hosted AnythingMCP with a paid licence or the 30-day trial. AnythingMCP Cloud cannot reach a network share: SMB (port 445) does not belong on the internet.
- The share mounted read-only on the Docker host, for example at
/mnt/knowledge(SMB/CIFS or NFS, a Windows file server or a NAS volume). - Shell access to the Docker host to edit
.envanddocker-compose.yml.
Set it up
Step 1 — Mount the share and turn on File Search
- Mount the share read-only on the Docker host, for example at
/mnt/knowledge. - Bind it read-only into the
appandfiles-workercontainers (see the comment indocker-compose.yml) and setFILE_SOURCE_ROOTS=/mnt/knowledgein.env. The wizard offers only folders below those roots. - Turn on the File Search services: add
FILES_WORKER_URL=http://files-worker:8891,FILES_WORKER_TOKENandFILE_EXTRACTOR_TOKEN(eachopenssl rand -hex 24) andCOMPOSE_PROFILES=filesto.env. - Run
docker compose up -d. Connectors → New → File Search shows whether the worker and the extractor are reachable.
The File Search docs list every setting.
Step 2 — Set up the File Search connector
In AnythingMCP, open Connectors → New → File Search and choose Network folder (in the Marketplace: Network folder (File Search)).
- Folder. Pick the folder below
FILE_SOURCE_ROOTS, for example/mnt/knowledge/Purchasing. - Test. AnythingMCP lists the folder before anything is saved and shows whether it is readable.
- Scan. Click Scan folder. AnythingMCP lists the folder without indexing it yet and shows a tree with the number of files in every subfolder, the file types and the years. Folders that look like archives (
Alt,Old,Archive,Backup) are already unticked, so Cursor never quotes an outdated document. A bar compares your selection with your plan while you tick folders, file types or an age limit; when the selection is larger than the plan, untick more or upgrade. - Describe. AnythingMCP drafts the connector's description from the scan, for example "Purchasing share: supplier price lists and conditions, PDF and Excel, German, 2019–2026". This text tells Cursor what the folder contains and when to search it. If an AI model is configured on the server, the wizard can draft it with AI and says exactly what is sent (folder names, file names, the first 2,000 characters of up to 20 sample files, personal data masked); otherwise the draft is built from the folder structure. Edit it as you like.
- Activate. Choose the tool prefix, the sync interval and the MCP servers that get the connector, and click Activate.
The first sync starts right away and runs in a separate background service: Cursor and your other connectors keep answering at full speed while it runs. The connector's Files tab shows its progress: files found, indexed and skipped, the last and next sync, and a Sync now button.
Step 3 — Copy the server URL
In MCP Servers, open the server you chose in the wizard and copy its URL.
Step 4 — Add the connector in Cursor
Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (
https://anythingmcp.example.com/mcp/…with your own address). Use it wherever this guide showsYOUR_SERVER_ID.
Cursor runs on your computer, so it can also reach an AnythingMCP in your own network. Use your instance's address wherever this step shows https://anythingmcp.example.com.
Cursor reads MCP servers from ~/.cursor/mcp.json. Add this entry:
{
"mcpServers": {
"anythingmcp": {
"url": "https://anythingmcp.example.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of
YOUR_MCP_API_KEY. - Save the file and restart Cursor.
- Open Cursor → Settings → MCP and check that
anythingmcpis listed and connected. - Start chatting: the agent can now call the file search tools.
Step 5 — Ask
Start a new chat and ask about the content of your files. Cursor searches the index first, opens the pages that matched and answers with the file name, the page and the file's date, so you can check the source.
What Cursor can do with the files
| Tool | What it does |
|---|---|
<prefix>_guide | How to search this folder |
<prefix>_search | Full-text search over every indexed page: the files with the best page, a snippet and the date; filters for folder, file type and dates, newest first on request |
<prefix>_find | Find files by name (typo-tolerant) or pattern |
<prefix>_list | Show one folder: subfolders with counts, files with size and date |
<prefix>_read | Read a file as text, by pages ("1-3,7") or in windows of characters |
<prefix>_grep | Exact search for codes and numbers with two lines of context; spreadsheet rows come with their column names |
<prefix>_status | Sync state, counts, pause reason and a summary of the content |
<prefix>_view_page | Shows one page of a PDF, or an image file, as a picture: drawings, stamps, photos and tables the text does not capture |
<prefix>_get_file | The file itself as a temporary download link for members of the workspace (images are attached too) |
<prefix>_share_file | A temporary link (internal or public); switched off at install |
<prefix> is the tool prefix you choose in the wizard, for example pricelists. Every tool except _share_file only reads.
Supported files: text is extracted from over 100 file types: PDF (page by page); Word, Excel and PowerPoint including macro and template variants and .xlsb; OpenDocument; Outlook .msg, .eml and .mbox with the text of their attachments; .rtf, .epub, .xps; Apple Pages, Numbers and Keynote (through their PDF preview); .svg and the text of .dxf CAD drawings; CSV, Markdown, HTML, XML, JSON, YAML, calendars and contacts; and source code. Every other file is still found by name, and PDF pages and images can be shown to the AI as pictures. Scanned PDFs without a text layer are read with OCR on Enterprise.
Prompts to try in Cursor
- "Find the current price list from Nordtor and tell me the price of NT-601 875 x 2000."
- "Which documents in the share mention a notice period of three months?"
- "Search the Purchasing folder for the article number 4711-200 and show every row where it appears."
- "What does our internal procedure say about returns older than 30 days? Quote the paragraph and the file."
How syncing works
AnythingMCP compares the size and modification time of every file with the last run and reads only new and changed files. Files whose content is identical to the indexed version are recognised by their checksum (SHA-256) and not processed again. Deleted files leave the index. A file that cannot be read is retried on the next syncs and, after three failures (at once for password-protected files), stays findable by name, with the reason on the Files tab.
Syncing runs in its own background service, separate from the server that answers Cursor: a large first sync does not slow down your questions, and search keeps working with the last index while a sync runs.
When the folder outgrows your plan, the sync pauses before downloading anything instead of indexing only part of it: the Files tab shows how many files the folder now holds against your plan, Cursor keeps searching the files already indexed and is told that newer files may be missing, and you can untick folders or upgrade. A paused folder is checked again once a day and resumes by itself when it fits.
Security
- Read-only. The connector only lists and reads. It has no tool that writes, renames or deletes on the share.
- Your workspace only. The index is stored per workspace and every query is limited to it, by the application and again by the database (Row-Level Security).
- The text extractor runs on an internal network with no route out, no database and no secrets.
- Who sees what follows your MCP roles: a role without the file tools does not see them. On Enterprise you can also allow or deny folders per role.
- File content is data. The tools tell the model never to follow instructions found inside a file.
- The files stay in your network. Only what a tool returns for a question (a list of matches, the text of a page) travels to the AI provider you use.
- Read-only twice. Mount the share read-only on the host and bind it read-only into the containers.
Limits by plan
| 30-day trial | Starter | Team | Enterprise | |
|---|---|---|---|---|
| File Search connectors | 3 | 1 | 3 | unlimited |
| Indexed files, all connectors together | 2,000 | 500 | 2,000 | unlimited |
| Automatic sync | daily | daily | daily | down to every 5 minutes |
| Manual syncs per day | 3 | 1 | 3 | unlimited |
| OCR, folder permissions per role, workspace policy | – | – | – | ✓ |
The largest file is set by FILES_MAX_FILE_BYTES (100 MB by default). File Search needs a paid licence (Starter, Team or Enterprise) or the 30-day trial; the free Community edition has no File Search after the trial. All plans.
FAQ
Does Cursor support custom MCP servers on the free tier? Yes, MCP is available on Hobby, Pro and Business plans.
Why is this not available on AnythingMCP Cloud? The Cloud reaches files over the internet, and SMB (port 445) does not belong on the internet. Use SFTP or WebDAV on the NAS for the Cloud, or run AnythingMCP self-hosted next to the share.
Does it need the self-hosted Enterprise plan? No. Starter includes one File Search connector with up to 500 files, Team three with 2,000. Enterprise removes the limits and adds OCR, folder permissions per role and workspace policies.
Does AnythingMCP copy all of the share? No. AnythingMCP keeps the extracted text, not the files. A file is read again only when it changed, or when you ask for the file itself.
Is vector search used? No. Company documents are searched for exact names, codes and numbers, where keyword search with page-level results is more reliable than embeddings.
Related
- Search your company file server with AI
- Find prices in supplier price lists with AI
- Search inside Nextcloud and WebDAV files with AI
- Share files from an AI chat as download links
- Connect a Network Folder or Windows File Server to Claude
- Connect a Network Folder or Windows File Server to ChatGPT
- Connect a Network Folder or Windows File Server to Gemini
- Connect a Network Folder or Windows File Server to Microsoft Copilot
- Connect a Network Folder or Windows File Server to Muse
- Other file sources in Cursor: SFTP server, FTP / FTPS server, WebDAV server, S3 bucket, Nextcloud, ownCloud, Synology NAS, QNAP NAS, Fritz!Box storage, Hetzner Storage Box
Was this guide helpful?