fs-mcp
fs-mcp
여섯 가지 도구를 제공하는 초소형 MCP 서버:
explore_filesystem(subpath?, glob?)— 루트 디렉터리 아래의 파일/폴더를 나열하며, 선택적으로 glob(**/*.js등)으로 필터링할 수 있습니다.edit_file(path, edits[], createIfMissing?)— 루트 아래의 파일에 git 스타일의 줄 편집(줄 범위 교체/삽입/삭제)을 적용합니다.create_file(path, content?, overwrite?)— 선택적 콘텐츠로 새 파일을 만들고, 필요에 따라 상위 디렉터리도 생성합니다.delete_file(path, recursive?)— 루트 아래의 파일 또는 디렉터리를 삭제합니다(비어 있지 않은 디렉터리는 선택적으로 재귀 삭제).read_file(path, startLine?, endLine?)— 파일 콘텐츠를 읽으며, 선택적으로 줄 범위로 제한하고 줄 번호를 접두사로 붙입니다.grep(pattern, glob?, useRegex?, caseInsensitive?)— 파일에서 텍스트 패턴을 검색하며, 선택적으로 정규식 지원과 glob 필터링을 제공합니다.
루트 = 프로세스가 시작될 때 작업 디렉터리가 있는 위치입니다.
전역 CLI로 설치
npm install
npm link # or: npm install -g .이렇게 하면 전역 fs-mcp 명령이 생깁니다(package.json의 bin 필드를 통해 연결됨).
Related MCP server: LocalFS MCP Server
실행
fs-mcp # stdio mode (default) — for Claude Desktop/Code,
# which spawn the process themselves
fs-mcp --http # HTTP mode on http://localhost:4823/mcp — for
# curl, the MCP Inspector, or the on-demand
# Claude Desktop setup below
fs-mcp --http -p 5000 # custom port
fs-mcp --help실행할 때 서 있는 폴더가 노출되는 루트가 됩니다.
Claude Desktop에 연결
Claude Desktop은 MCP 서버를 직접 생성하고 stdio로 통신합니다. 터미널의 현재 디렉터리를 상속하지 않습니다. 따라서 작업 방식에 따라 두 가지 설정 옵션이 있습니다:
옵션 A — 모든 폴더에서 온디맨드(CLI 느낌을 원하면 권장)
Desktop을 한 번만 구성하고, 고정된 폴더가 아닌 고정된 로컬 포트를 가리키게 합니다. claude_desktop_config.example.json을 참조하세요. 해당 파일의 "fs-mcp" 항목을 기존 mcpServers 객체에 병합하세요:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Claude Desktop을 한 번 재시작합니다. 그 후부터:
cd ~/whatever/project
fs-mcp --http그 폴더가 서버가 실행되는 동안 Claude가 볼 수 있는 대상이 됩니다. Ctrl+C로 종료하고 다른 폴더에서 다시 시작하면 컨텍스트가 전환됩니다. Desktop 구성 변경은 더 이상 필요 없습니다.
참고: --allow-http가 필요한 이유는 mcp-remote(stdio↔HTTP 브리지)가 기본적으로 실제 원격 서버에 HTTPS + OAuth를 기대하기 때문입니다. 이 플래그는 인증되지 않은 일반 localhost 트래픽이 괜찮다고 알려줍니다.
옵션 B — 하나의 고정 폴더, 항상 사용 가능
Desktop이 항상 같은 프로젝트를 노출하도록 하고 싶다면, 수동으로 시작할 필요 없이:
{
"mcpServers": {
"fs-mcp": {
"command": "fs-mcp",
"cwd": "/absolute/path/to/the/folder/you/want/exposed"
}
}
}Desktop을 재시작합니다. 이 방식은 stdio 모드를 직접 사용합니다. 프록시나 수동 fs-mcp --http 단계가 없지만, 노출 폴더를 변경하려면 이 구성을 편집하고 Desktop을 다시 재시작해야 합니다.
보안 참고 사항
모든 경로는 루트를 기준으로 확인되며, 루트를 벗어나면 거부됩니다(예:
../../etc/passwd) — 경로 탐색 테스트로 검증됨.인증이 없습니다. 서버에 도달할 수 있는 모든 것(
--http모드에서는 모든 로컬 프로세스)이 루트 아래의 모든 파일을 읽고 쓸 수 있습니다. 신뢰할 수 있는 로컬 개발 용도로는 괜찮지만, 민감한 곳에서 실행하지 말고localhost이상으로 바인딩하지 마세요.
편집 의미(edit_file)
편집은 {startLine, endLine, newLines}이며, 1부터 시작하는 인덱스로 포함됩니다:
3~5행 교체:
{startLine: 3, endLine: 5, newLines: ["new content"]}3~5행 삭제:
{startLine: 3, endLine: 5, newLines: []}6행 앞에 삽입(삭제 없음):
{startLine: 6, endLine: 5, newLines: ["inserted"]}
한 번의 호출에서 여러 편집은 내부적으로 아래에서 위로 적용되므로, 편집 목록의 줄 번호는 이전 편집이 적용되면서 이동하지 않습니다.
Available Tools
6 toolscreate_fileCreate fileA
Create a new file under the root, with the given text content. Creates any missing parent directories. Fails if the file already exists unless overwrite is set to true.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path relative to root | |
| content | No | Text content for the new file | |
| overwrite | No | If true, replace the file if it already exists |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It clearly discloses key behaviors: creates a new file under root, creates missing directories, fails if file exists unless overwrite is true. This is strong transparency, though it omits details like permissions or error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that front-loads the main purpose, followed by two short sentences for key details (directory creation and overwrite). No fluff; every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple CRUD create operation with 3 params and no output schema, the description covers the essential behavior. It explains path resolution, directory creation, and overwrite, which are key for correct invocation. It could include a note about what happens on success (e.g., returns nothing), but that is minor given the simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% (all parameters described in schema), so baseline is 3. The description adds value by clarifying that 'path' is relative to root (schema says relative, but description emphasizes it) and that content is for text. It also explains overwrite default behavior in context, which goes beyond schema's default value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Create a new file'), the target resource ('under the root'), and the content parameter ('with the given text content'). It also distinguishes from siblings by specifying the creation action and outlining key behaviors like creating missing directories and overwrite semantics.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use: to create a new file, and it differentiates from edit_file and delete_file by focusing on creation. It also explains the overwrite behavior, which is a common decision point. However, it does not explicitly state when not to use (e.g., use edit_file for existing files unless overwriting).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_fileDelete fileA
Delete a file, or a directory, under the root. Deleting a non-empty directory requires recursive: true. Refuses to delete the root itself.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File or directory path relative to root | |
| recursive | No | Required to delete a non-empty directory |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of disclosing behavior. It covers destructive edge cases: non-empty directory handling and protection against deleting the root. However, it omits whether deletion is permanent or any permission requirements, leaving some transparency gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: two sentences, no fluff, and directly addresses key aspects. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 params, no output schema), the description covers all essential behaviors: what can be deleted (file or directory), the recursive nuance, and root safety. No critical information is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters well. The description adds value by clarifying the root-relative scope and root-deletion refusal, but these are complementary details rather than extensive new semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Delete a file, or a directory, under the root' with a specific verb and object, and distinguishes itself from sibling tools like read_file and edit_file by its delete action. The root-scoping detail further refines its purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides important context such as 'Deleting a non-empty directory requires recursive: true' and that it refuses to delete the root, but it does not explicitly contrast with alternative tools or state when not to use it. Usage is implied rather than directly compared to siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
edit_fileEdit fileA
Apply git-style line edits to a file under the root. Each edit replaces lines [startLine, endLine] (1-indexed, inclusive) with newLines. To delete lines, pass an empty newLines array. To insert without deleting anything, set endLine = startLine - 1. Multiple edits in one call are applied bottom-to-top so line numbers stay valid.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path relative to root | |
| edits | Yes | ||
| createIfMissing | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It thoroughly explains the edit semantics (inclusive line ranges), the bottom-to-top application order for multiple edits, and the empty array for deletion. It also covers the insert case via endLine = startLine - 1, and mentions the createIfMissing flag implicitly through schema, but the description's core behaviors are well-disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact, front-loaded with the verb and object, and every sentence adds essential operational detail (line indexing, insert/delete patterns, ordering). No filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 3 params, no output schema, and no annotations, it covers all necessary behavior: line ranges, deletion, insertion, ordering, and path restriction. The createIfMissing param is in schema but not described, but its default false and the tool's purpose make it low-risk. The description is complete for an agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 33%, so the description must compensate. It does: it explains each parameter's role (startLine, endLine, newLines) and the special values for insert/delete. It also clarifies the semantics of multiple edits.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it applies git-style line edits to a file, distinguishing it from create/delete operations. It specifies the file must be under the root, and the exact semantics of line replacement.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for editing existing files, and explicitly explains deletion and insertion patterns. It does not explicitly state when not to use it (e.g., for creating new files, use create_file), but the contrast with sibling tools is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
explore_filesystemExplore filesystemA
List files and folders under the server's root directory (the folder the server process was started in). Optionally scope to a subpath and/or filter with a glob pattern (supports *, ** and ?).
| Name | Required | Description | Default |
|---|---|---|---|
| glob | No | Optional glob to filter results, e.g. '**/*.js' or 'src/*.ts' | |
| subpath | No | Subdirectory to list, relative to root. Defaults to root ('.') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It usefully clarifies that root means the server's start directory and that globs support *, **, and ?. However, it omits traversal behavior (recursive vs. shallow), whether results include metadata like paths or sizes, and how directories are distinguished from files—gaps the agent must guess at.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tightly packed sentences: the first states the core action and location scope, the second covers both optional parameters in one clause. Every word contributes—no filler, no restating of the tool name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a low-complexity listing tool with no output schema and no annotations, the description covers the essential aspects: what is listed, the base directory semantics, and the scoping/filter options. The main gap is the absence of return-value shape (absolute vs. relative paths, ordering), which the agent must infer. Minor but real, keeping it below a 5.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description adds genuine value by specifying the root base for subpath resolution ('relative to root') and documenting the supported glob syntax (*, **, ?), which goes beyond the schema's brief examples. This enrichment justifies the 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
"List files and folders under the server's root directory" uses a specific verb (list) plus a precise resource scope (files/folders under the server's start directory). This clearly distinguishes it from content-focused siblings like read_file, grep, and edit_file, which all operate on the contents of individual files.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description conveys when to use it as a discovery tool ('List files and folders') and offers optional scoping ('scope to a subpath and/or filter with a glob pattern'). However, it never explicitly states what it is NOT for (e.g., reading file contents, searching inside files) or names alternatives, leaving the contrast with grep/read_file implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grepSearch files with grepA
Search for text patterns in files under the root. Supports regex patterns and optional glob filtering to limit which files are searched. Returns matching lines with file paths and line numbers.
| Name | Required | Description | Default |
|---|---|---|---|
| glob | No | Optional glob pattern to filter files, e.g. '**/*.js' or 'src/**/*.ts' | |
| pattern | Yes | Search pattern (regex if useRegex is true, otherwise literal string match) | |
| useRegex | No | If true, treat pattern as a regex. If false, search for literal string | |
| caseInsensitive | No | If true, perform case-insensitive search |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the return format ('matching lines with file paths and line numbers') but does not explicitly state read-only behavior or other safety traits. The verb 'Search' implies read-only, but it could be more explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the core purpose, then covering filters and return format. No wasted words, clear and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with 4 parameters all documented. The description covers the main function, filtering options, and return format. It doesn't mention edge cases or performance, but for a search tool it is sufficiently complete given the schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and each parameter has a thorough description. The tool description adds 'Supports regex patterns and optional glob filtering,' which reiterates schema fields without adding new semantics. Baseline 3 applies for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Search for text patterns in files under the root' – a specific verb and resource. It distinguishes from siblings like read_file (reading a specific file) and explore_filesystem (browsing structure) by focusing on content search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions 'Supports regex patterns and optional glob filtering to limit which files are searched,' providing clear usage context. However, it does not explicitly contrast with alternatives or state when not to use it, though the context is sufficient for most cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_fileRead fileA
Read the text content of a file under the root. Optionally scope to a 1-indexed, inclusive line range via startLine/endLine. Returns the content with 1-indexed line numbers prefixed, plus the file's total line count.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path relative to root | |
| endLine | No | 1-indexed end line, inclusive. Defaults to end of file | |
| startLine | No | 1-indexed start line, inclusive. Defaults to 1 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the output format (line numbers prefixed, total line count), the inclusive nature of the line range, and the scoping to 'under the root.' This exceeds a minimal disclosure, though it omits details like encoding or error handling, which are not critical for this simple read operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the core purpose and then the optional scoping and return format. Zero fluff, every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read tool with no output schema, the description covers purpose, parameters, and return format (line numbers and total count), which is sufficient for an agent to invoke it correctly. It also notes the root constraint, covering the main operational context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description restates that startLine/endLine are 1-indexed and inclusive and mentions defaults, but these are already fully described in the schema. No additional meaning is added beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Read the text content of a file under the root' with a specific verb and resource, and clearly distinguishes from siblings like edit_file (modify), grep (search), and explore_filesystem (browse). It also specifies the optional line-range feature, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied: it's for reading a file, and the line-range option is explained. However, there's no explicit guidance on when not to use it (e.g., for large files or searching) or any mention of alternatives like grep for content search or explore_filesystem for directory listing, leaving the distinction to the sibling list.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v1.0.0- First observed
create_file - First observed
delete_file - First observed
edit_file - First observed
explore_filesystem - First observed
grep - First observed
read_file
TDQS
Scored across 6 tools
Each tool targets a distinct filesystem operation: listing, reading, creating, editing, deleting, and searching. There is no meaningful overlap between grep and read_file, or between create_file and edit_file, so an agent can reliably select the right tool.
Most tools follow a consistent verb_noun snake_case pattern: explore_filesystem, edit_file, create_file, delete_file, read_file. The one exception is 'grep', which is a conventional command name but slightly breaks the verb_noun pattern.
Six tools is a well-scoped set for a filesystem server. Each tool covers a distinct core operation without redundancy or bloat, fitting comfortably within the ideal 3-15 tool range.
The server covers the full basic lifecycle: list, read, create, edit, delete, and search. Minor gaps exist such as rename/move and file metadata/stat operations, but these can be worked around with existing tools.
Maintenance
Related MCP Connectors
Manage files and folders directly from your workspace. Read and write files, list directories, cre…
- flockfsOAuthcom.flockfs
A real-time, multiplayer filesystem for agents and humans: shared files, live edits, history.
Browse and manage files in your Moxt AI workspace from any MCP client.
Securely search and manage workspace context files for AI agents and teams.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables reading, creating, and editing files on the local filesystem through operations like view, create, string replacement, and line insertion.109 npm3MIT
- FlicenseNot gradedqualityDmaintenanceProvides sandboxed access to local filesystem operations including directory and file management, content search with glob and regex patterns, and binary file support with configurable safety limits.-
- FlicenseNot gradedqualityDmaintenanceEnables file system operations such as listing, reading, and creating files within a scoped local project directory. It provides a secure way to manage local files through standardized MCP tools built with FastMCP.-
- FlicenseAqualityDmaintenanceEnables listing, reading, and searching local files and directories through MCP tools.4-