Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FS Context MCP Serverfind all TypeScript files in the src directory"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Filesystem MCP
MCP Server that enables LLMs to interact with the local filesystem. Provides tools for navigation, file management, searching, and analysis, all within a secure, allowed set of directories. Ideal for agents needing to read/write files, explore directory structures, or perform file operations as part of their tasks.
Key Features
Navigation: List directories (
ls), view trees (tree), and discover workspace roots (roots).File Management: Create (
mkdir), write (write), edit (edit), move (mv), and delete (rm) files/directories.Search: Find files by glob pattern (
find) or search content using regex (grep).Analysis: Inspect metadata (
stat), calculate hashes (calculate_hash), and compare files (diff_files).Batch Operations: Read multiple files (
read_many) or replace text across many files (search_and_replace).Security: Strictly scoped to allowed directories provided at startup.
Tech Stack
Runtime: Node.js >= 24
Language: TypeScript
SDK:
@modelcontextprotocol/sdkLibraries:
zod,commander,re2,diff
Repository Structure
Requirements
Node.js >= 24
Quickstart
Run directly with npx:
Installation
NPX (Recommended)
Docker
Mount host directories as volumes to
/projects/and pass the container paths as arguments.
From Source
Clone the repository
Install dependencies:
npm ciBuild the project:
npm run buildRun:
node dist/index.js [options] [directories...]
Configuration
The server requires specifying allowed directories via command-line arguments.
Arguments
Argument | Description |
| Positional arguments specifying the root directories the server can access. |
Options
Option | Description |
| Allow the current working directory as an additional root. |
| Display server version. |
| Display command help. |
Usage
Stdio Transport
The server communicates via stdio. Ensure your MCP client is configured to run the server command and capture standard input/output.
MCP Surface
Tools
Tool | Description | Key Parameters |
| List allowed workspace roots | None |
| List directory contents |
|
| Find files by glob pattern |
|
| Generate directory tree |
|
| Read file content |
|
| Read multiple files |
|
| Search file content (regex/literal) |
|
| Get file metadata |
|
| Get metadata for multiple files |
|
| Calculate SHA-256 hash |
|
| Create directory (recursive) |
|
| Write file (create/overwrite) |
|
| Edit file (string replacement) |
|
| Move or rename file/directory |
|
| Delete file or directory |
|
| Generate unified diff |
|
| Apply unified patch |
|
| Search & replace across files |
|
Resources
URI Pattern | Description |
| Usage guidance and documentation |
| Ephemeral cached tool output (for large results) |
Prompts
Prompt | Description |
| Returns usage instructions for the server |
Client Configuration Examples
Add to your claude_desktop_config.json:
Add to your .cursor/mcp.json or configure via UI:
Add to your .vscode/mcp.json:
Use the Docker image with any MCP client that supports stdio transport:
Add to your configuration:
Security
Path Restrictions: All file operations are strictly validated against the allowed root directories provided at startup.
Path Validation: Uses
isPathWithinDirectoriesto prevent path traversal attacks.Hidden Files: Hidden files (starting with
.) are excluded by default in listings and searches unless explicitly requested.
Development Workflow
Install Dependencies:
npm installDevelopment Mode (watch):
npm run devRun Locally:
npm start -- --allow-cwdTest:
npm run testLint & Format:
npm run lint npm run format
License
MIT