Skip to main content

af-filesystem-mcp v0.2.0

An MCP server that gives an AF (Analysis Facility) user browse/read access to their own files on the AF's shared NFS home (/home/<unixname>) and Ceph data area (/data/<unixname>) — nothing more. Designed to sit behind af-mcp-platform's credential broker so an LLM session can look at a user's own analysis outputs, condor logs, and scratch files without a human copying paths around.

What it does

Tool Does Read/write
fs_list List a directory read-only
fs_read Read a file, by byte range or line range, including head/tail read-only
fs_stat Stat a path — size, mtime, type, permissions read-only
fs_grep Search for a pattern across files under a directory, capped in files scanned and matches returned read-only

That is the entire v1 tool surface: all four tools are read-only (read_only_hint=true in their MCP tool annotations) and confined to the caller's own two AF roots (open_world_hint=false). There is deliberately no write tool, no delete, no chmod, no arbitrary command execution, and no full-tree walk (directory-size, duplicate-finder). See CLAUDE.md for the design rationale and phase-2 (write) plan.

Security model

Every filesystem operation for user alice runs in a short-lived helper subprocess impersonating alice's real uid/gid — the server process itself (running as root, holding only CAP_SETUID/CAP_SETGID) never reads or writes a byte of user data directly. This means the kernel (and, for the NFS-mounted homes, the NFS server) enforces every permission check against the real identity: even a bug in this server's own path-pinning logic can only let alice reach what alice's real uid could already reach. See CLAUDE.md § "Security model" and src/af_filesystem_mcp/paths.py for the full design rationale, and maniaclab/af-mcp-platform#188 for the workplan and the (rejected) alternatives this design was chosen over.

Installation

pip install af-filesystem-mcp

Or with pixi:

pixi add af-filesystem-mcp

Requirements

  • Python 3.10+
  • Linux (the impersonation mechanism is POSIX setuid/setgid; there is no Windows/macOS deployment target — local stdio mode runs fine on any OS for development, since it never impersonates)

Quick start (local development, stdio)

In stdio mode there is exactly one caller (you), so no impersonation happens — the server operates directly as your own uid/gid, confined to your own $HOME and a configurable data root:

af-filesystem-mcp serve --data-root /data

Broker mode (production, HTTP)

af-filesystem-mcp serve --transport http \
  --broker-url https://mcp.af.uchicago.edu \
  --broker-audience af-filesystem-mcp \
  --home-root /home --data-root /data

Bearers are broker-issued identity JWTs (aud=af-filesystem-mcp) carrying uid/gid/unixname POSIX claims (af-mcp-platform's identityProviders[].targetOptions.af-filesystem-mcp.includePosix: true). Requires the broker extra: pip install af-filesystem-mcp[broker].

Development

pixi install
pixi run test
pixi run lint

See CLAUDE.md for architecture, the impersonation/path-confinement design, and conventions for adding a new tool.

Metadata

Release files for af-filesystem-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for af-filesystem-mcp 0.2.0
File Size Uploaded Provenance
af_filesystem_mcp-0.2.0.tar.gz 126.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for af-filesystem-mcp 0.2.0
File Interpreter ABI Platform
af_filesystem_mcp-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 172.7 kB

Release files / af_filesystem_mcp-0.2.0.tar.gz

Download URL af_filesystem_mcp-0.2.0.tar.gz
Size 126.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d9d1768b943b66a6173188f26fb994d7e17776780d2b2e7701c550fd24f9ebb7
BLAKE2b-256 checksum
How to use checksums
ff1e32822a701dc3e002351597e13e94adb9cc9b646a93cac3218e94cf97feb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / af_filesystem_mcp-0.2.0-py3-none-any.whl

Download URL af_filesystem_mcp-0.2.0-py3-none-any.whl
Size 46.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcebe14990181f3320251fee071539390db1347da8d87f05fe3d638e10eadd5e
BLAKE2b-256 checksum
How to use checksums
dd21834bcaf42a98c537c226e45373a33fda390bab3804cb180e5438bcfda41e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Security for af-filesystem-mcp 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for af_filesystem_mcp-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page