af-filesystem-mcp v0.1.2
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
- List a directory (
fs_list) - Read a file, by byte range or line range, including head/tail (
fs_read) - Stat a path — size, mtime, type, permissions (
fs_stat) - Grep for a pattern across files under a directory, capped in files scanned
and matches returned (
fs_grep)
That is the entire v1 tool surface. 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 — localstdiomode 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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file af_filesystem_mcp-0.1.2.tar.gz.
File metadata
- Download URL: af_filesystem_mcp-0.1.2.tar.gz
- Upload date:
- Size: 114.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6595e0465f517d050950467f619eda0c71d09047035750508de2b3e0e574f34e
|
|
| MD5 |
b624064cfa71bcdad381f380683aee29
|
|
| BLAKE2b-256 |
d85cbf695cf07c376989bea0d6f82b622bb1eb8f71b01ab8d3113da775428722
|
Provenance
The following attestation bundles were made for af_filesystem_mcp-0.1.2.tar.gz:
Publisher:
cd.yml on maniaclab/af-filesystem-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
af_filesystem_mcp-0.1.2.tar.gz -
Subject digest:
6595e0465f517d050950467f619eda0c71d09047035750508de2b3e0e574f34e - Sigstore transparency entry: 2537048681
- Sigstore integration time:
-
Permalink:
maniaclab/af-filesystem-mcp@c4408889f3e65673fe152e19b5d0dfbf57a163fd -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/maniaclab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@c4408889f3e65673fe152e19b5d0dfbf57a163fd -
Trigger Event:
release
-
Statement type:
File details
Details for the file af_filesystem_mcp-0.1.2-py3-none-any.whl.
File metadata
- Download URL: af_filesystem_mcp-0.1.2-py3-none-any.whl
- Upload date:
- Size: 38.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f75ab15efdb54dd1f6cecd0e912d3dc0802f6d4a98374d0c038308a0aa43e1b6
|
|
| MD5 |
0c6fb3fee0867d896ef2523ad212b384
|
|
| BLAKE2b-256 |
02a9244462d0cf938d5511a7b5eec3a637bf3527e1b961a523160091b6332ee3
|
Provenance
The following attestation bundles were made for af_filesystem_mcp-0.1.2-py3-none-any.whl:
Publisher:
cd.yml on maniaclab/af-filesystem-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
af_filesystem_mcp-0.1.2-py3-none-any.whl -
Subject digest:
f75ab15efdb54dd1f6cecd0e912d3dc0802f6d4a98374d0c038308a0aa43e1b6 - Sigstore transparency entry: 2537048869
- Sigstore integration time:
-
Permalink:
maniaclab/af-filesystem-mcp@c4408889f3e65673fe152e19b5d0dfbf57a163fd -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/maniaclab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@c4408889f3e65673fe152e19b5d0dfbf57a163fd -
Trigger Event:
release
-
Statement type: