How to Connect Claude to Local Files Step by Step (Complete Guide 2026)
Learn exactly how to connect Claude Desktop to your local files using MCP filesystem servers. Step-by-step tutorial with screenshots and troubleshooting tips.
How to Connect Claude to Local Files Step by Step (Complete Guide 2026)
The moment I realized Claude could access my local files directly changed everything about my workflow. No more copying and pasting file contents, no more manual uploadsāClaude could read, analyze, and work with my project files as naturally as if they were part of our conversation.
But getting this setup working isn't obvious from Anthropic's documentation. After helping dozens of developers through this process, I've identified the exact steps that work every time, plus the common gotchas that trip people up.
This guide will walk you through connecting Claude Desktop to your local files using the MCP (Model Context Protocol) filesystem server, with real examples and troubleshooting for every step.
The Problem Most Tutorials Miss
Most MCP filesystem tutorials assume you're comfortable with JSON configuration and command-line tools. They skip the crucial context about why certain steps matter and what can go wrong.
The reality is that connecting Claude to local files involves three moving parts that must work together perfectly:
When any of these components isn't configured correctly, you get the frustrating "server not found" or "connection failed" errors that make you want to give up.
What You'll Be Able to Do After This Tutorial
Once Claude is connected to your local files, you can:
The key insight is that Claude doesn't just read your filesāit understands their context, relationships, and structure in ways that transform how you work with code and documents.
Prerequisites: What You Need Before Starting
Before diving into the setup, make sure you have:
Software Requirements:
System Access:
Time Investment:
The most common mistake people make is trying to rush through the configuration without understanding what each step accomplishes. Take your time with the JSON configurationāsmall syntax errors will prevent the entire setup from working.
Step 1: Install the MCP Filesystem Server
The filesystem server is the bridge that allows Claude to access your local files. Think of it as a translator that converts Claude's requests into file system operations.
Open your terminal and install the official filesystem server:
npm install -g @modelcontextprotocol/server-filesystem
What this does: Downloads and installs the MCP filesystem server globally on your system, making it available to Claude Desktop.
Common issue: If you get permission errors, you might need to use sudo on Mac/Linux or run Command Prompt as Administrator on Windows.
Verification: After installation, test that the server is available by running:
npx @modelcontextprotocol/server-filesystem --help
You should see help text explaining the server's options. If you get "command not found," the installation didn't complete successfully.
Step 2: Locate Your Claude Desktop Configuration
Claude Desktop stores its configuration in a specific location that varies by operating system. This is where we'll tell Claude about your filesystem server.
On macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
On Windows:
%APPDATA%\Claude\claude_desktop_config.json
On Linux:
~/.config/Claude/claude_desktop_config.json
Finding the file: If the file doesn't exist, create it. If the directory doesn't exist, create that too. This is completely normal for first-time MCP setup.
Important: Make sure Claude Desktop is completely closed before editing this file. The app only reads the configuration on startup.
Step 3: Configure Claude to Access Your Files
This is the most critical step. The configuration tells Claude Desktop where your filesystem server is located and which directories it can access.
Open (or create) your claude_desktop_config.json file and add this configuration:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["@modelcontextprotocol/server-filesystem", "/path/to/your/directory"],
"env": {}
}
}
}
Replace /path/to/your/directory with the actual path to the folder you want Claude to access.
Examples of good directory choices:
/Users/yourname/Projects (for all your coding projects)/Users/yourname/Documents/Work (for work documents)/Users/yourname/Desktop/CurrentProject (for a specific project)Security consideration: Only give Claude access to directories you're comfortable with it reading. While Claude won't modify files without explicit permission, it can read everything in the specified directory and subdirectories.
Step 4: Test Your Configuration
After saving the configuration file, it's time to test whether everything works.
1. Restart Claude Desktop completely (not just minimizeāactually quit and reopen)
2. Start a new conversation (previous conversations won't have access to the filesystem server)
3. Test with a simple request: "List the files in my project directory"
What success looks like: Claude should respond with an actual list of files from your specified directory. It might say something like "I can see you have these files in your project directory..." followed by a real list.
What failure looks like: Error messages about servers not being available, or Claude saying it can't access your files.
Common Issues and Solutions
Issue 1: "MCP server not found"
Cause: The filesystem server isn't installed correctly or isn't in your PATH.
Solution: Reinstall the server globally:
npm uninstall -g @modelcontextprotocol/server-filesystem
npm install -g @modelcontextprotocol/server-filesystem
Issue 2: "Permission denied"
Cause: Claude can't read the directory you specified, usually due to permissions.
Solutions:
Issue 3: Configuration file not working
Cause: JSON syntax errors or wrong file location.
Solutions:
Issue 4: Claude sees some files but not others
Cause: The filesystem server only has access to the directory you specified and its subdirectories.
Solution: Either move files into the accessible directory or add multiple filesystem servers in your configuration for different directories.
Advanced Configuration: Multiple Directories
If you need Claude to access multiple separate directories, you can configure multiple filesystem servers:
{
"mcpServers": {
"work-projects": {
"command": "npx",
"args": ["@modelcontextprotocol/server-filesystem", "/Users/yourname/Work"],
"env": {}
},
"personal-projects": {
"command": "npx",
"args": ["@modelcontextprotocol/server-filesystem", "/Users/yourname/Personal"],
"env": {}
}
}
}
This gives Claude access to both your work and personal project directories, keeping them organizationally separate.
Real-World Usage Examples
Once your setup is working, here are some powerful ways to use Claude with local files:
Code Review: "Review the JavaScript files in my /src directory and suggest improvements"
Documentation Generation: "Create a README.md file for my project based on the code in the main directory"
Bug Hunting: "Look at the error.log file and help me understand what's causing these failures"
Project Analysis: "Analyze my package.json and requirements.txt to identify potential dependency conflicts"
File Organization: "Suggest how I should reorganize the files in my project directory for better structure"
Security and Privacy Considerations
When you connect Claude to your local files, you're giving it read access to everything in those directories. Here are important security practices:
Directory Scope: Only provide access to directories you actively want Claude to help with. Don't give blanket access to your entire home directory.
Sensitive Files: Keep sensitive files (private keys, passwords, personal documents) outside of directories Claude can access.
Work Compliance: If you're using this for work projects, make sure it complies with your company's data handling policies.
Regular Review: Periodically review which directories Claude can access and remove any that are no longer needed.
Troubleshooting Connection Issues
If your filesystem connection stops working:
1. Check Claude Desktop version: Updates sometimes change configuration requirements
2. Verify file paths: Make sure the directories you specified still exist and are accessible
3. Test MCP server directly: Run the filesystem server command manually to see if it starts without errors
4. Review system permissions: Operating system updates can change file access permissions
Next Steps: Expanding Your MCP Setup
Once you have filesystem access working, you might want to add other MCP servers:
The filesystem server is often the gateway to understanding MCP's full potential. Once you see how Claude can work with your local files, the possibilities for other integrations become obvious.
Conclusion: Your New AI-Powered Workflow
Connecting Claude to your local files transforms it from a helpful chat bot into a powerful development partner that understands your project context. Instead of explaining your codebase in every conversation, Claude can read and understand your files directly.
The setup process might seem complex the first time, but it's a one-time investment that pays dividends every day. Whether you're debugging code, writing documentation, or organizing projects, having an AI assistant that truly understands your local environment changes everything.
Remember that this is just the beginning of what's possible with MCP. The filesystem server is one of many ways to extend Claude's capabilitiesābut it's often the most immediately useful for developers and content creators.
Your local files are no longer isolated from your AI workflow. Welcome to the future of human-AI collaboration.