Mcp Server Filesystem

io.github.bytedance由 GitHub 账号 bytedance 发布v1.0.0更新于 Oct 24, 2026

MCP server for filesystem access

已验证STDIO仅桌面文件与存储开发者工具

概览

AI 生成的概览

一个本地 MCP 服务器,让 AI 助手在用户机器上执行文件系统操作,并可通过允许目录参数限制访问范围。

可以做什么
列出并查看本机上的目录和文件,README 中以 list_directory 工具为例(完整工具列表未公布)。通过 npx 以本地 stdio 进程运行,也可在指定端口上以 SSE 或 Streamable HTTP 方式提供。可在 JavaScript 或 TypeScript 的 MCP 客户端中进程内调用,无需安装命令行。通过允许目录参数把访问限制在指定文件夹。
适用场景
当助手需要读取或处理用户自己电脑上的文件时适用,例如在 VS Code、Cursor、Windsurf 或 Claude Desktop 中使用,并希望把范围限制在选定文件夹内。
运行要求
需要 Node.js 18 或更高版本,以及 VS Code、Cursor、Windsurf、Claude Desktop 等 MCP 客户端。通过 npm 包以 npx 在本地运行,也可指定端口启动 SSE 或 Streamable HTTP。未声明认证、环境变量或请求头。
安装前请注意
它让助手获得本地文件系统访问权限,应使用允许目录参数限定范围,避免开放过大权限。README 未说明哪些操作会写入、修改或删除文件;应假定可能存在修改文件的工具并在使用前确认。远程模式启动时未声明认证,应仅绑定在本机。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Server Filesystem,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

FileSystem MCP Server

[NPM Downloads]

[Install MCP Server] [Install in VS Code] [Install in VS Code Insiders]

A Model Context Protocol (MCP) server that provides filesystem operations.

[图片]

Requirements

  • Node.js 18 or newer
  • VS Code, Cursor, Windsurf, Claude Desktop or any other MCP client

Getting started

Local (Stdio)

First, install the Filesystem MCP server with your client. A typical configuration looks like this:

js
{  "mcpServers": {    "filesystem": {      "command": "npx",      "args": [        "@agent-infra/mcp-server-filesystem@latest"      ]    }  }}
Install in VS Code

You can also install the Filesystem MCP server using the VS Code CLI:

bash
# For VS Codecode --add-mcp '{"name":"filesystem","command":"npx","args":["@agent-infra/mcp-server-filesystem@latest"]}'

After installation, the Filesystem MCP server will be available for use with your GitHub Copilot agent in VS Code.

Install in Cursor

Go to Cursor Settings -> MCP -> Add new MCP Server. Name to your liking, use command type with the command npx @agent-infra/mcp-server-filesystem. You can also verify config or add command like arguments via clicking Edit.

js
{  "mcpServers": {    "filesystem": {      "command": "npx",      "args": [        "@agent-infra/mcp-server-filesystem@latest",        "--allowed-directories /tmp"      ]    }  }}
Install in Windsurf

Follow Windsuff MCP documentation. Use following configuration:

js
{  "mcpServers": {    "filesystem": {      "command": "npx",      "args": [        "@agent-infra/mcp-server-filesystem@latest",        "--allowed-directories /tmp"      ]    }  }}
Install in Claude Desktop

Follow the MCP install guide, use following configuration:

js
{  "mcpServers": {    "filesystem": {      "command": "npx",      "args": [        "@agent-infra/mcp-server-filesystem@latest",        "--allowed-directories /tmp"      ]    }  }}
Remote (SSE / Streamable HTTP)

At the same time, use --port $your_port arg to start the browser mcp can be converted into SSE and Streamable HTTP Server.

bash
# normal run remote mcp servernpx @agent-infra/mcp-server-filesystem --port 8089 --allowed-directories <dir>

You can use one of the two MCP Server remote endpoint:

  • Streamable HTTP(Recommended): http://127.0.0.1::8089/mcp
  • SSE: http://127.0.0.1::8089/sse

And then in MCP client config, set the url to the SSE endpoint:

js
{  "mcpServers": {    "filesystem": {      "url": "http://127.0.0.1::8089/sse"    }  }}

url to the Streamable HTTP:

js
{  "mcpServers": {    "filesystem": {      "type": "streamable-http", // If there is MCP Client support      "url": "http://127.0.0.1::8089/mcp"    }  }}
In-memory call

If your MCP Client is developed based on JavaScript / TypeScript, you can directly use in-process calls to avoid requiring your users to install the command-line interface to use Filesystem MCP.

js
import { Client } from '@modelcontextprotocol/sdk/client/index.js';import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js';
// type: module project usageimport { createServer } from '@agent-infra/mcp-server-filesystem';// commonjs project usage// const { createServer } = await import('@agent-infra/mcp-server-filesystem')
const client = new Client(  {    name: 'test filesystem client',    version: '1.0',  },  {    capabilities: {},  },);
const server = createServer();const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
await Promise.all([  client.connect(clientTransport),  server.connect(serverTransport),]);
// list toolsconst result = await client.listTools();console.log(result);
// call toolconst toolResult = await client.callTool({  name: 'list_directory',  arguments: {    path: '~/your_computer'  },});console.log(toolResult);

Development

Access http://127.0.0.1:6274/:

bash
npm run dev

来源:packages/agent-infra/mcp-servers/filesystem/README.md,提交 2ff41a9

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分