How to connect an MCP Server Filesystem to Claude Desktop

The Model Context Protocol ( MCP ) is ushering in a new era for large model languages ​​(LLMs), enabling them to break free from the browser "box" and interact directly with real-world data.

 

Among these, the Filesystem MCP Server is one of the most useful tools, allowing Claude Desktop to read, write, create, and list files directly in specified folders on your computer. This connection not only saves copy-paste time but also makes Claude a valuable partner in data management and programming support. Let's explore how to set it up below.

 

Steps to connect MCP Server Filesystem to Claude Desktop

To begin, make sure you have Node.js installed on your computer, as we will be using the `node.js` command npx. If you don't have it yet, please download and install Node.js from https://nodejs.org .

Step 1: Open the configuration settings on Claude Desktop.

First, launch the Claude Desktop application. Click on your account name in the bottom left corner, then select Settings .

 

In the window that appears, select the Developer option in the left column, then click the Edit Config button .

Step 2: Find the configuration fileclaude_desktop_config.json

After clicking Edit Config, the computer will open the folder containing the configuration file. You will see a file named claude_desktop_config.json. Right-click on this file, select Open with , and choose Notepad (or any code editor like VS Code) to start editing its contents.

 

Step 3: Add the Filesystem connection code

Depending on your operating system, copy the corresponding code below and paste it into the JSON file opened with Notepad above.

{ "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Desktop", "/path/to/other/allowed/dir" ] } } }

Important note: You must change the path /Users/username/Desktopto C:/Users/username/Desktopthe actual path to the folder you allow Claude to access.

This is when you have successfully saved.

Step 4: Save and Restart Claude

 

After pasting the code, press Ctrl + S (Windows) or Command + S (Mac) to save the file. Then, completely close Claude Desktop and reopen it; you can also close it completely using Task Manager .

If the connection is successful, try an example command like "Please look at my Desktop and describe the content inside?". Using this command, you will see Claude list what is currently on your Desktop.

And when you go back to the Developer menu, you will see the currently running filesystem displayed as shown in the image below.

Why should you use a Filesystem MCP Server?

Granting AI access to the local file system offers tremendous flexibility. Instead of uploading each file to the chat window, you can simply request: "Analyze all log files in the Desktop folder" or "Create a new Python file named script.py in my project folder" .

This is especially useful for programmers who need to manage source code or data analysts who need to process a large number of files simultaneously while maintaining security within designated directories (Allowed directories).

Security precautions when granting Filesystem permissions to AI.

Although the Model Context Protocol is designed for security, you still need to keep a few principles in mind when configuring it:

  • Limit the scope: It's best to only add the actual directory paths to the array args. Don't grant access to entire drives C:/or sensitive system folders.
  • Control write permissions: AI has the ability to delete or modify file contents. Therefore, always double-check requests before confirming to avoid unnecessary data loss.
  • Execution monitoring: Always monitor the commands that the MCP Server executes through the console or logs if you are an advanced user.
Other Artificial intelligence articles
Category

System

Windows XP

Windows Server 2012

Windows 8

Windows 7

Windows 10

Wifi tips

Virus Removal - Spyware

Speed ​​up the computer

Server

Security solution

Mail Server

LAN - WAN

Ghost - Install Win

Fix computer error

Configure Router Switch

Computer wallpaper

Computer security

Mac OS X

Mac OS System software

Mac OS Security

Mac OS Office application

Mac OS Email Management

Mac OS Data - File

Mac hardware

Hardware

USB - Flash Drive

Speaker headset

Printer

PC hardware

Network equipment

Laptop hardware

Computer components

Advice Computer

Game

PC game

Online game

Mobile Game

Pokemon GO

information

Technology story

Technology comments

Quiz technology

New technology

British talent technology

Attack the network

Artificial intelligence

Technology

Smart watches

Raspberry Pi

Linux

Camera

Basic knowledge

Banking services

SEO tips

Science

Strange story

Space Science

Scientific invention

Science Story

Science photo

Science and technology

Medicine

Health Care

Fun science

Environment

Discover science

Discover nature

Archeology

Life

Travel Experience

Tips

Raise up child

Make up

Life skills

Home Care

Entertainment

DIY Handmade

Cuisine

Christmas

Application

Web Email

Website - Blog

Web browser

Support Download - Upload

Software conversion

Social Network

Simulator software

Online payment

Office information

Music Software

Map and Positioning

Installation - Uninstall

Graphic design

Free - Discount

Email reader

Edit video

Edit photo

Compress and Decompress

Chat, Text, Call

Archive - Share

Electric

Water heater

Washing machine

Television

Machine tool

Fridge

Fans

Air conditioning

Program

Unix and Linux

SQL Server

SQL

Python

Programming C

PHP

NodeJS

MongoDB

jQuery

JavaScript

HTTP

HTML

Git

Database

Data structure and algorithm

CSS and CSS3

C ++

C #

AngularJS

Mobile

Wallpapers and Ringtones

Tricks application

Take and process photos

Storage - Sync

Security and Virus Removal

Personalized

Online Social Network

Map

Manage and edit Video

Data

Chat - Call - Text

Browser and Add-on

Basic setup