af-filesystem-mcp
af-filesystem-mcp v0.1.3
一个 MCP 服务器,让 AF(Analysis Facility,即分析设施)用户能够浏览并读取自己位于 AF 共享 NFS 主目录(/home/<unixname>)和 Ceph 数据区(/data/<unixname>)中的文件——仅此而已。它被设计为部署在 af-mcp-platform 的凭证代理之后,这样 LLM 会话就能查看用户自己的分析输出、condor 日志和临时文件,而无需人工来回复制路径。
它能做什么
List(列出) 一个目录(
fs_list)Read(读取) 文件,支持按字节范围或行范围读取,包括头部/尾部(
fs_read)Stat(获取状态) 一个路径——大小、修改时间、类型、权限(
fs_stat)Grep(搜索) 在目录下的文件中按模式搜索,并限制扫描的文件数和返回的匹配数(
fs_grep)
这就是 v1 的整个工具集。这里刻意不提供写入工具,没有删除、没有 chmod、没有任意命令执行,也不做全树遍历(目录大小、重复文件查找)。设计理由和阶段 2(写入)计划请见 CLAUDE.md。
Related MCP server: Context MCP
安全模型
针对用户 alice 的每次文件系统操作都在一个短暂生命周期的辅助子进程中运行,该子进程模拟 alice 的真实 uid/gid——服务器进程本身(以 root 运行,且只持有 CAP_SETUID/CAP_SETGID)从不直接读取或写入一个字节的用户数据。这意味着内核(对于 NFS 挂载的主目录,则是 NFS 服务器)会针对真实身份强制执行每一项权限检查:即使本服务器的路径固定逻辑存在 bug,也只能让 alice 访问到 alice 的真实 uid 原本就能访问的内容。完整设计说明见 CLAUDE.md 的“Security model”一节和 src/af_filesystem_mcp/paths.py;工作计划以及被否决的替代方案见 maniaclab/af-mcp-platform#
188。
安装
pip install af-filesystem-mcp或者使用 pixi:
pixi add af-filesystem-mcp环境要求
Python 3.10+
Linux(身份模拟机制基于 POSIX
setuid/setgid;没有 Windows/macOS 部署目标——本地stdio模式在开发时可以在任何操作系统上运行,因为它从不模拟身份)
快速开始(本地开发,stdio)
在 stdio 模式下,只有一个调用者(你),因此不会发生身份模拟——服务器直接以你自己的 uid/gid 运行,并且被限制在你自己的 $HOME 和一个可配置的数据根目录内:
af-filesystem-mcp serve --data-root /dataBroker 模式(生产环境,HTTP)
af-filesystem-mcp serve --transport http \
--broker-url https://mcp.af.uchicago.edu \
--broker-audience af-filesystem-mcp \
--home-root /home --data-root /dataBearer 是 broker 签发的身份 JWT(aud=af-filesystem-mcp),携带 uid/gid/unixname POSIX 声明(af-mcp-platform 的 identityProviders[].targetOptions.af-filesystem-mcp.includePosix: true)。需要安装 broker 附加依赖:pip installaf-filesystem-mcp[broker]。
开发
pixi install
pixi run test
pixi run lint架构、身份模拟/路径限制设计,以及新增工具的规范请见 CLAUDE.md。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables safe, read-only interaction with Kubernetes clusters, allowing users to list resources and fetch logs without any create/update/delete operations.116Apache 2.0
- AlicenseNot gradedqualityDmaintenanceProvides AI agents with secure, read-only file system access to analyze and understand project codebases, enabling multi-repository context aggregation and cross-project code tracing.5MIT
- FlicenseAqualityCmaintenanceEnables secure file system operations (read, write, delete) and simulated command execution with server-enforced permission policies, risk assessment, and human-in-the-loop approval.5
- FlicenseNot gradedqualityBmaintenanceEnables read-only access to GitLab projects, files, directories, and merge requests through MCP tools.
Related MCP Connectors
Read-only MCP access to sessions, funnels, campaigns, errors, live visitors, and anomalies.
Deny-by-default authority leases for agents wielding real power.
Read-only Dant3 MCP for public rooms, agents, jobs and provisional machine onboarding.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/maniaclab/af-filesystem-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server