# MCP Server Filesystem

> MCP Server Filesystem is an open-source MCP server for files and documents. MCP server giving AI clients local filesystem access, limited to allowed directories. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, vscode, API, Linux, macOS, Windows, self-hosted
- **Repository:** https://github.com/bytedance/ui-tars-desktop/tree/HEAD/packages/agent-infra/mcp-servers/filesystem
- **MCP Registry name:** io.github.bytedance/mcp-server-filesystem
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

The README describes this as a Model Context Protocol server that exposes filesystem operations to MCP-compatible clients, so an assistant can work with files on the machine where it runs. It is published on npm as @agent-infra/mcp-server-filesystem and can be launched over stdio or served over SSE and Streamable HTTP by passing a port argument.

Access is scoped by an allowed-directories option. The example configurations pass /tmp, and the remote run example takes a directory argument, so the server is intended to be pointed at specific folders rather than the whole disk. The README also shows an in-memory mode for JavaScript and TypeScript clients that want to call the server without a separate command-line process.

It suits developers who want a coding or desktop assistant in VS Code, Cursor, Windsurf or Claude Desktop to read and manage files in a bounded workspace. Node.js 18 or newer is required.

## Features

- **Stdio and remote transports:** Runs as a local stdio process or as an SSE and Streamable HTTP server on a chosen port.
- **Directory allowlist:** Restricts file operations to directories passed through the allowed-directories option.
- **In-memory client mode:** Lets JavaScript or TypeScript applications create the server in-process without a CLI install.
- **Multi-client setup:** Includes install instructions for VS Code, Cursor, Windsurf and Claude Desktop.

## Good for

- Let a desktop AI assistant read and edit files in a chosen project folder
- Give a coding agent in VS Code access to a workspace directory
- Expose a shared local folder to remote MCP clients over HTTP
- Embed filesystem tools in a JavaScript app without a separate install step

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-server-filesystem -- npx -y @agent-infra/mcp-server-filesystem
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-server-filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@agent-infra/mcp-server-filesystem"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-server-filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@agent-infra/mcp-server-filesystem"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-server-filesystem": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@agent-infra/mcp-server-filesystem"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-server-filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@agent-infra/mcp-server-filesystem"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-server-filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@agent-infra/mcp-server-filesystem"
      ]
    }
  }
}
```

## Tools

- `list_directory`: Lists the contents of a directory, as used in the in-memory example.

## FAQ

### What do I need to run it?

The README lists Node.js 18 or newer and an MCP client such as VS Code, Cursor, Windsurf or Claude Desktop.

### How do I limit which folders it can access?

Pass the --allowed-directories argument with the directories you want to permit, as shown in the example configurations.

### Can it run over HTTP instead of stdio?

Yes. Start it with --port and connect to the /mcp Streamable HTTP endpoint or the /sse endpoint.

### Is MCP Server Filesystem free?

Yes. MCP Server Filesystem is open source, so you can use and self-host it for free.

### How do I add MCP Server Filesystem to Claude Code?

Run this command in your terminal: claude mcp add mcp-server-filesystem -- npx -y @agent-infra/mcp-server-filesystem

### What are the best alternatives to MCP Server Filesystem?

The closest alternatives to MCP Server Filesystem are Filesystem, MCP Server Commands, FileSystem MCP Server, Filesystem MCP and Makefile MCP.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Filesystem](https://ai-powered.com/mcp/filesystem): Filesystem is an open-source MCP server for files and documents.
- [MCP Server Commands](https://ai-powered.com/mcp/mcp-server-commands): MCP Server Commands is an open-source MCP server for developer tools.
- [FileSystem MCP Server](https://ai-powered.com/mcp/filesystem-mcp-server): FileSystem MCP Server is an open-source MCP server for files and documents.
- [Filesystem MCP](https://ai-powered.com/mcp/filesystem-mcp): Filesystem MCP is a free MCP server for files and documents.
- [Makefile MCP](https://ai-powered.com/mcp/makefile-mcp-2): Makefile MCP is an open-source MCP server for developer tools.
- [MCP Ts Template](https://ai-powered.com/mcp/mcp-ts-template): MCP Ts Template is an open-source MCP server for developer tools.
- [Logmcp](https://ai-powered.com/mcp/logmcp): Logmcp is an open-source MCP server for developer tools.
- [Lens MCP](https://ai-powered.com/mcp/lens-mcp-2): Lens MCP is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/mcp-server-filesystem
