# mcp-filesystem-server

> MCP Server

This repository provides a Go server implementing the Model Context Protocol (MCP) for filesystem operations, enabling read/write access, directory management, file searching, and metadata retrieval within specified directories.

## Overview

- **Category:** System Tools
- **Language:** Go
- **Stars:** 678
- **Forks:** 21
- **Owner:** mark3labs
- **GitHub:** https://github.com/mark3labs/mcp-filesystem-server
- **Created:** 2024-11-28T12:15:08+00:00
- **Updated:** 2025-03-28T16:22:22+00:00
- **Source:** https://model-context-protocol.com/servers/go-mcp-filesystem-server-operations-protocol

## Setup

## Setup
Install the server
```bash
go install github.com/mark3labs/mcp-filesystem-server
```

Add this to your `claude_desktop_config.json`:
```json
{
  "mcpServers": {
    "filesystem": {
      "command": "mcp-filesystem-server",
      "args": [
        "/Users/username/Desktop",
        "/path/to/other/allowed/dir"
      ]
    }
  }
}
```

## Tools

## Available Tools

1.  Read/write files (Allows reading and writing of files within specified directories.)
2.  Create/list/delete directories (Enables creation, listing, and deletion of directories.)
3.  Move files/directories (Allows moving or renaming files and directories.)
4.  Search files (Recursively searches for files/directories based on a pattern.)
5.  Get file metadata (Retrieves detailed file/directory metadata such as size, creation time, and permissions.)
6.  `read_file` (Reads the complete contents of a file.)
7.  `read_multiple_files` (Reads multiple files simultaneously.)
8.  `write_file` (Creates a new file or overwrites an existing one.)
9.  `create_directory` (Creates a new directory or ensures it exists.)
10. `list_directory` (Lists directory contents with [FILE] or [DIR] prefixes.)
11. `move_file` (Moves or renames files and directories.)
12. `search_files` (Recursively searches for files/directories.)
13. `get_file_info` (Gets detailed file/directory metadata.)
14. `list_allowed_directories` (Lists all directories the server is allowed to access.)
