microsoft

filesystem MCP Server

Community microsoft
Updated

Cross platform file system server

filesystem MCP Server

Cross platform file system server

This is a Model Context Protocol (MCP) server project.

Setup and Installation

Simply run:

make

To create the virtual environment and install dependencies.

Running the Server

Use the VSCode launch configuration, or run manually:

The server requires specifying at least one allowed directory (for security reasons).

For stdio transport, specify directories using the --allowed_directories argument:

uv run -m mcp_server_filesystem.start --allowed_directories /path1 /path2 /path3

For SSE transport, you can start the server without specifying directories:

uv run -m mcp_server_filesystem.start --transport sse --port 6060

Setting Allowed Directories

The server uses "allowed directories" for security purposes. There are two ways to configure them:

  1. Command line arguments: Using --allowed_directories parameter (required for stdio transport)
  2. Root configuration: For SSE transport, the server can use the roots defined by the client

When using the root configuration approach, the MCP client sets the accessible directories through the session's list_roots() mechanism so each allowed directory must be set in the client's root configuration.

Tools Available

read_file

Reads the contents of a specific file.

write_file

Writes content to a specified file path. Creates the file if it does not exist.

list_directory

Lists all files and subdirectories within a specified directory.

create_directory

Creates a new directory or ensures an existing one remains accessible.

edit_file

Edits the contents of a text file with specified replacements. Supports a dry run mode to preview changes without applying them.

search_files

Recursively searches for files matching a pattern across subdirectories.

get_file_info

Retrieves and displays detailed metadata about a specified file or directory.

read_multiple_files

Reads the content of multiple files simultaneously and returns their contents in a dictionary. Files not accessible are marked with error messages.

move_file

Moves or renames a file or directory from a source path to a target destination.

list_allowed_directories

Returns a list of directories that the server is permitted to access.

Client Configuration

To use this MCP server in your setup, consider the following configuration:

Stdio

{
  "mcpServers": {
    "mcp-server-filesystem": {
      "command": "uv",
      "args": ["run", "-m", "mcp_server_filesystem.start", "--allowed_directories", "/path1", "/path2"]
    }
  }
}

SSE

{
  "mcpServers": {
    "mcp-server-filesystem": {
      "command": "http://127.0.0.1:6060/sse",
      "args": ["/path1", "/path2"]
    }
  }
}

The args will be automatically joined with commas and added as a query parameter named 'args'.

Direct URL Configuration

If you prefer, you can also configure the URL directly with the args parameter already included:

{
  "mcpServers": {
    "mcp-server-filesystem": {
      "command": "http://127.0.0.1:6060/sse?args=/path1,/path2,/path3",
      "args": []
    }
  }
}

This approach is more verbose but might be preferable in some configurations.

MCP Server · Populars

    REA: Reverse Engineer Anything

    Reverse engineer anything, Reimagine everything. RE anything from app behavior down to native binaries. Discord: https://discord.gg/GkcryMnJDM

    Community morluto

    🦞 OpenClaw — Personal AI Assistant

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    Community openclaw

    MarkItDown-MCP

    An MCP server for the "markitdown" library.

    Community microsoft

    MarkItDown

    Python tool for converting files and office documents to Markdown.

    Community microsoft

    graphify

    Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

    Community Graphify-Labs

MCP Server · New

    tokensave-dev

    tokensave-cli

    Local code intelligence MCP server and CLI for AI coding agents. Indexes your repository into a knowledge graph of symbols, calls and types, so agents explore code with fewer tokens and tool calls. 80+ tools, 50+ languages, 12+ agent integrations. Your code never leaves your machine.

    Community tokensave-dev
    ordewell

    ordewell

    Open source agent orchestrator. One goal becomes an editable plan of tasks that run in parallel on Claude Code, Codex, OpenCode and more, each on its own git branch.

    Community ordewell
    goodnight000

    api-anything

    Turn any website into an API your agent can call. Learns from the site's own frontend, heals itself when the site changes.

    Community goodnight000
    shuttle-browser

    Shuttle

    A Chromium fork built for AI agents: built-in MCP server, per-agent logged-in identities, sessions as tab groups

    Community shuttle-browser
    synectus

    OpenGMB

    Open-source Google Business Profile manager: reviews, posts, profile edits, rank tracking and keyword research for every location, with approval rules before anything goes live and an MCP server for AI agents. Self-host with Docker.

    Community synectus