Fileport

io.github.CloudCorpRecords由 GitHub 账号 CloudCorpRecords 发布v0.1.0更新于 Oct 29, 2026

Sandboxed file access: read, write, edit and search in allowed dirs.

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

概览

AI 生成的概览

沙箱化的本地文件系统服务器,让助手仅在明确允许的目录内读取、写入、编辑、移动和搜索文件。

可以做什么
  • 读取文件:完整文本、首尾若干行、以 base64 返回的媒体内容,或一次读取多个文件
  • 写入文本文件、按精确匹配应用编辑(可先试运行预览差异)、创建目录
  • 列出目录及大小、生成嵌套目录树、查看文件元数据
  • 在沙箱内移动或重命名文件,并按 glob 递归搜索
  • 查询当前生效的允许根目录
适用场景
适合需要让助手操作本机真实文件的场景,例如阅读文档、做定点修改或浏览项目目录,同时把访问范围限制在指定目录内。若希望获得文件访问能力又不想暴露整块磁盘,它是合适的选择。
运行要求
以 stdio 方式在本地运行,可通过 npx 使用 npm 包,或使用 Docker 容器镜像。允许的根目录在 mcp 子命令后以参数给出,或通过 FILEPORT_ROOTS 环境变量设置;两者都没有时,仅当前工作目录为根目录。未声明需要账号、密钥或网络访问。
安装前请注意
相关工具可在允许的根目录内写入、编辑、移动文件并创建目录,因此应把根目录指向范围较窄的目录,而非主目录或系统目录。访问控制完全取决于根目录配置;根目录之外一律拒绝,包括通过 .. 或符号链接逃逸的路径。读取媒体文件会把文件内容以 base64 形式交给助手。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

fileport

fileport gives an agent careful, sandboxed access to the local filesystem. It can read and write text, return media as base64, apply exact-match edits, walk directory trees, and search by glob — but only inside the directories you allow. Anything outside those roots is refused, including paths that escape through .. segments or symlinks.

Install

bash
npx @reneturcios/fileport list .

Or run the container image:

bash
docker run -i ghcr.io/cloudcorprecords/fileport

The container defaults to the MCP server. Pass CLI arguments to use it as a CLI instead.

Allowed directories

The sandbox is the whole point of this tool, so it is configured explicitly:

  • fileport mcp /data/docs /data/notes — the arguments after mcp are the allowed roots.
  • FILEPORT_ROOTS — a path-delimiter-separated list used when no arguments are given.
  • With neither set, the current working directory is the only root.

Every path a tool receives is canonicalised (symlinks resolved; new files resolved through their parent) and checked against the roots before any read or write happens.

CLI

bash
fileport list <path>     # entries as [FILE] / [DIR] linesfileport read <path>     # print a file's text contentsfileport mcp [dirs...]   # start the stdio MCP serverfileport --version

Exit codes: 0 on success, 1 when an operation fails (for example a path outside the allowed directories), 2 for usage errors. The list and read helpers resolve paths against the working directory.

MCP server

bash
npx -y @reneturcios/fileport mcp /path/to/allowed/dir

MCP client configuration:

json
{  "mcpServers": {    "fileport": {      "command": "npx",      "args": ["-y", "@reneturcios/fileport", "mcp", "/path/to/allowed/dir"]    }  }}

Tools

ToolInputWhat it returns
read_filepathThe file's full text contents.
read_text_filepath, optional head or tail (line counts, mutually exclusive)The file text, or just its first/last lines.
read_media_filepathBase64 image, audio, or blob content chosen by extension.
read_multiple_filespathsEach file's contents; a failure for one file is reported in-band and does not stop the others.
write_filepath, contentWrites the text, creating parent folders as needed.
edit_filepath, edits (oldText/newText pairs), optional dryRunApplies each exact-match replacement, or returns a diff-like preview when dryRun is set. Errors if an oldText is not found.
create_directorypathCreates the directory and any missing parents.
list_directorypathEntries as [FILE] name / [DIR] name lines.
list_directory_with_sizespath, optional sortBy (name or size)Entries with sizes; directories report their recursive total.
directory_treepath, optional excludePatternsA nested JSON tree of {name, type, children?} nodes.
move_filesource, destinationMoves or renames within the sandbox.
search_filespath, pattern, optional excludePatternsRecursive glob search over file names (**, *, ?).
get_file_infopathSize, created/modified/accessed times, type, and permissions.
list_allowed_directories—The roots currently in force.

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # node test runner over test/*.test.ts, no networknpm run dev     # run the CLI from source via tsx

License

MIT — see LICENSE.

来源:README.md,提交 dacc9d0

工具

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

版本历史

1
  1. v0.1.0最新Oct 29, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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