Build with AI

How do you connect Claude to your files with MCP?

Written as of · Published · By Robert Scales, with AI tools · 4 min read

Short answer

You install the Claude Desktop app and Node.js, then add the official filesystem server to Claude Desktop's configuration file with the path of one folder you choose. After a restart, Claude can list, read, search and, with your approval, write files in that folder and nowhere else.

Until now, the only way to show Claude a document was to upload it into a chat. With the Model Context Protocol (MCP), the open standard Anthropic released on November 25, the Claude Desktop app can reach into a folder on your computer directly. You ask "Which of my meeting notes mention the budget?" and Claude opens the files itself to find out.

The piece that makes this possible is a small program called the filesystem server. It runs on your own machine, and Claude Desktop talks to it. The server decides what Claude may touch, and it is built to stay inside the folders you list. That last point is the most important part of the setup, so this guide treats it as step one.

Before you start

You need three things:

  • Claude Desktop for macOS or Windows, the latest version. MCP does not work in the claude.ai website; it is a developer preview in the desktop app, and for now it only connects to servers running on your own computer.
  • Node.js, the free JavaScript runtime from nodejs.org. The filesystem server is written in JavaScript, and Node.js includes npx, a command that downloads and runs it for you.
  • A folder made for Claude. Create a new, empty folder, for example Claude-Shared inside your Documents folder, and copy into it only the files you want Claude to see.

Resist the temptation to point the server at your whole home folder or your entire Documents folder. The server can write, move and overwrite files as well as read them, and anything inside the folder you name is within its reach. A dedicated folder keeps tax returns, passwords saved in text files and private photos out of the conversation entirely.

Step by step: the configuration

Claude Desktop reads its list of MCP servers from a settings file in JSON, a plain-text format of names and values.

  1. Open the file. On a Mac it is ~/Library/Application Support/Claude/claude_desktop_config.json; on Windows it is %APPDATA%\Claude\claude_desktop_config.json. If the file doesn't exist yet, create it with a text editor.
  2. Add the filesystem server, replacing YOUR_USERNAME with your account name:
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/YOUR_USERNAME/Documents/Claude-Shared"
      ]
    }
  }
}

On Windows, the path looks like "C:\\Users\\YOUR_USERNAME\\Documents\\Claude-Shared", with each backslash doubled because JSON treats a single one as a special character.

  1. Save and restart. Quit Claude Desktop completely, not just its window, then open it again. It starts the server when it launches.
  2. Check the connection. A plug icon next to the chat box lists your installed MCP servers. You can also review the configuration in Claude Desktop's Settings, under the Developer tab.

Here is what each part of the configuration does. "filesystem" is a label you choose. "command": "npx" tells Claude Desktop which program to run. -y lets npx install the server package without stopping to ask. The last line is the allowed folder. You can add more folder paths as extra lines, but each one widens what Claude can reach.

A first conversation

Start with a request that only reads:

Prompt
List the files in my Claude-Shared folder. Then read the three meeting notes from November and give me a table with each meeting's date, the decisions made, and any open questions.

Behind the scenes, Claude picks from the server's tools, such as list_directory, read_file, search_files and get_file_info, and Claude Desktop asks you to confirm sensitive operations before they run. Read each request rather than approving it automatically. If something fails, the logs on a Mac are in ~/Library/Logs/Claude/, in files whose names start with mcp.

The server also has write_file, which creates a file or overwrites an existing one, and its own documentation advises caution with it. Keep a copy of anything important before you let Claude edit files in the folder.

Try it: Put three short text files in a new folder, connect it as above, and ask Claude to call list_allowed_directories. Confirm that the only folder listed is the one you chose before you ask it to read anything.

Which MCP servers should you try first?

Start with servers that read, on data that doesn't matter much, and add actions later. The filesystem server on a practice folder is the best first step, because you can see every file it touches. The official quickstart uses a second good beginner's server: SQLite, which connects Claude to a small database file on your computer so you can ask questions about a table of products or expenses in plain language. It runs with a tool called uv instead of Node.js.

Anthropic also released ready-made servers for Git and GitHub, Google Drive, Slack, Postgres databases and Puppeteer, which lets Claude control a web browser. A sensible order is Git on a practice repository (read the history, summarize changes), then Google Drive or GitHub if you use them daily, and only then servers that send messages or browse the web on your behalf. Those reach outside your computer, so each one deserves the same rule as your folder: give it the narrowest access that does the job.

Each server you add goes into the same mcpServers section of the configuration file, with its own label, so you can switch one off by removing its entry and restarting.

Sources

  1. Quickstart (Model Context Protocol documentation) — Model Context Protocol / Anthropic (GitHub), December 2, 2024
  2. Filesystem MCP Server README — Model Context Protocol (GitHub), November 26, 2024
  3. Introducing the Model Context Protocol — Anthropic, November 25, 2024

Sources for the articles linked in the text

Each linked article has its own page, with its sources and its date.

From the Guide to Artificial Intelligence, by Robert Scales, published by Holistic Hybrid Inc. Share and adapt it under CC BY-NC-SA 4.0: credit the guide, link to https://guidetoartificialintelligence.com/en/learn/connect-claude-files-mcp/, no commercial use without permission, and keep the same licence.

Get the free Guide to Artificial Intelligence

Sign up for the newsletter and receive the free guide: what changed in AI, one lesson, one prompt to try. Unsubscribe in one click.

How we handle your address

Back to top

Display

Your choices are saved in this browser only. No data is sent.

Text size
100%
Colours
Reading
More settings
Accessibility statement

Get the app

Add the guide to your home screen. It opens like an app, and the pages you have read stay available offline.

Read without a connection: download the articles

iPhone and iPad (Safari, Chrome, Edge)

  1. Tap the Share button (the square with an arrow). In Chrome and Edge, it is in the address bar or the menu.
  2. Choose “Add to Home Screen”.
  3. Tap “Add”.

Android (Chrome, Edge, Samsung Internet, Firefox)

  1. Open the browser menu (⋮ or ☰).
  2. Choose “Install app” or “Add to Home screen”.
  3. Confirm with “Install”.

Computer (Chrome, Edge)

  1. Click the install icon at the right end of the address bar, or open the browser menu (⋮ or …).
  2. In Chrome, choose “Cast, save and share”, then “Install page as app”. In Edge, choose “Apps”, then “Install this site as an app”.
  3. Click “Install”.

Mac (Safari)

  1. Open the File menu.
  2. Choose “Add to Dock”.
  3. Click “Add”.

Firefox on a computer can’t install a site as an app. Use Chrome, Edge or Safari instead.