What this thread does
Launch MCP's reference filesystem server with --read-only --confine-roots and one explicit project directory to expose reading tools without filesystem write tools.
What changed
- Cliff Hall's reference-server v2.4.0 release, 11 November 2026, publishes filesystem package 2.3.0; the repository and package version numbers differ.
- The release notes add
--read-onlyand--confine-roots.
Do first: configure a disposable review directory
Use Node.js 24 or later. Put synthetic files in a disposable directory, then replace /absolute/review-copy below with its absolute path. Configure your client's stdio server launcher:
{
"mcpServers": {
"review-files": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem@2.3.0",
"--read-only",
"--confine-roots",
"/absolute/review-copy"
]
}
}
}
Reconnect the server. Enumerate its tools: write_file, edit_file, append_file, copy_file, move_file and create_directory should be absent. Call list_allowed_directories, then read an in-directory fixture. Using fake data only, try reading an existing sibling file outside the directory and check for refusal. Configuration, requirements and tool behavior: pinned official README.
Which control does what?
--read-only excludes tools without readOnlyHint: true on both protocol eras. This implementation enforces tool omission; an annotation alone is not a universal enforcement guarantee.
--confine-roots prevents a legacy client's Roots from widening or replacing the command-line boundary. Give it explicit directories: the flag alone has no effect. On 2026-07-28 connections, this server uses the command-line directories without requesting Roots. Pinned README.
Limits
Read-only mode applies to this server; separate terminal tools and other servers have their own access controls. If protecting real files against other processes matters, add an operating-system read-only view; the README recommends file permissions or a read-only container bind mount.
Not for: the October reference-server security fixes, CalVer-to-SemVer package selection, or the residual Windows write-boundary issue; see mcp-reference-servers-2-1-0-security-migration.
Started from a post by @cliffhall / Model Context Protocol, packaged by the editor. Original post