Command Palette

Search for a command to run...

Home / Servers

@adpharm/mcp-server-filesystem-ro

by adpharm

Model Context Protocol servers

[!NOTE]

🏥 The Adpharm fork

This is adpharm/mcp-servers-fork, a fork of modelcontextprotocol/servers. We maintain it to ship a read-only build of the Filesystem server, published to npm as @adpharm/mcp-server-filesystem-ro.

What's different from upstream: the only behavioral change lives in src/filesystem/index.ts. A ~15-line guard wraps server.registerTool and registers only tools annotated readOnlyHint: true. This drops the four mutating tools (write_file, edit_file, create_directory, move_file) — and any future mutating tool — before they are ever exposed to a client. Everything else (path validation, Roots access control, the 10 read tools) is upstream code, untouched.

Why annotation-gating? It keeps our diff tiny and self-maintaining: new upstream read tools flow through automatically, and new mutating tools are excluded by default — so merging upstream rarely conflicts.

Working in this repo:

task --list-all              # see all tasks
task fs-ro:install           # install deps for the read-only server
task fs-ro:test              # build + run the test suite
task fs-ro:verify-readonly   # print the tools the built server exposes (read-only only)
task fs-ro:run -- /some/dir  # run the server over stdio against a directory
task fs-ro:ship             # test, build, prompt for version bump, publish to npm, commit + tag
task fs-ro:sync-upstream     # pull and merge updates from upstream

Using the published server (e.g. in an MCP client config):

{
  "mcpServers": {
    "filesystem-ro": {
      "command": "npx",
      "args": ["-y", "@adpharm/mcp-server-filesystem-ro", "/path/to/allowed/dir"]
    }
  }
}

See CLAUDE.md for the full maintainer guide. Everything below this note is the original upstream README.


This repository is a collection of reference implementations for the Model Context Protocol (MCP), as well as references to community-built servers and additional resources.

[!IMPORTANT] If you are looking for a list of MCP servers, you can browse published servers on the MCP Registry. The repository served by this README is dedicated to housing just the small number of reference servers maintained by the MCP steering group.

[!WARNING] The servers in this repository are intended as reference implementations to demonstrate MCP features and SDK usage. They are meant to serve as educational examples for developers building their own MCP servers, not as production-ready solutions. Developers should evaluate their own security requirements and implement appropriate safeguards based on their specific threat model and use case.

The servers in this repository showcase the versatility and extensibility of MCP, demonstrating how it can be used to give Large Language Models (LLMs) secure, controlled access to tools and data sources. Typically, each MCP server is implemented with an MCP SDK:

Related servers

n8n

Updated today

by n8n-io

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

199,260

mcp-server-git

OfficialUpdated today

by modelcontextprotocol

A Model Context Protocol server providing tools to read, search, and manipulate Git repositories programmatically via LLMs

89,176

mcp-server-fetch

OfficialUpdated today

by modelcontextprotocol

A Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs

89,176

@modelcontextprotocol/server-everything

OfficialUpdated today

by modelcontextprotocol

MCP server that exercises all the features of the MCP protocol

89,176