mcp-fs

A tiny reference MCP filesystem server — read, list, write, scoped to one root.

sandboxDeveloper toolsMIT
Overview
3
tools
1 MiB
default write cap
v0.1.0
complete for its scope

mcp-fs is the lab's canonical "how we write a minimal MCP server": three root-scoped tools (read-file, list-dir, write-file) over NDJSON-on-stdio, JSON-RPC 2.0, dependency-light, one static musl binary.

Small does not mean careless. Path safety is layered — lexical resolution, bounded .., and post-open re-canonicalisation to catch pre-existing symlinks — and writes are disabled unless explicitly enabled, with a byte cap when they are. Directory listings are deterministic and sorted.

It exists to be read: if you want to build an MCP server and want a complete, honest example that fits in your head, start here. Inside the lab it serves as the default local-dev MCP and the tool surface for Agentic OS's canonical fetch-and-save mission.

Related projects