Let Your AI Read and Search Your Local Files with MCP

beginnerSetup time: 5 minutes

The filesystem MCP server is the most popular starting point for most developers. It gives your AI the ability to list, read, write, and search files in a directory you specify — no more copy-pasting file contents into chat.

Servers You'll Need

Step-by-Step Setup

  1. 1

    Install the server

    `npm install -g @modelcontextprotocol/server-filesystem`

  2. 2

    Configure it with a directory

    Add the server to your config, passing the directory path you want the AI to access as an argument. Example: `/Users/you/projects`. You can pass multiple directories.

  3. 3

    Restart and test

    After restarting your client, ask the AI to list files, read a specific file, or search for a string across files.

Example Prompts to Try

  • What files are in my projects directory?
  • Read my notes.md file and summarize it
  • Find all TODO comments in my src directory
  • What does the config.json in my project root contain?
  • Search for any references to 'deprecated' across my project files

Tips

  • Point the server at a specific project directory rather than your entire home folder for better focus and safety.
  • Combine with the GitHub MCP server for a full git + file workflow.
  • The AI can write files too — useful for generating boilerplate or config files.

FAQ

Can I give it access to multiple directories?

Yes. Pass multiple paths as separate arguments in the args array.

Can the AI create or delete files?

The filesystem server exposes write and delete tools. If you want read-only access, use a read-only filesystem mount or check if the server offers a read-only mode.