stepanowon/local-fs-mcp-server
If you are the rightful owner of local-fs-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This server provides access to the local file system using the Model Context Protocol (MCP).
set_base_directory
์์ ํ ๋ฒ ์ด์ค ๋๋ ํ ๋ฆฌ๋ฅผ ์ค์ ํฉ๋๋ค.
path
: ๋ฒ ์ด์ค ๋๋ ํ ๋ฆฌ๋ก ์ค์ ํ ๊ฒฝ๋ก
get_allowed_directories
ํ์ฌ ํ์ฉ๋ ๋๋ ํ ๋ฆฌ ๋ชฉ๋ก์ ์กฐํํฉ๋๋ค.
- ๋งค๊ฐ๋ณ์ ์์# ํ์ผ์์คํ MCP ์๋ฒ
๋ก์ปฌ ํ์ผ ์์คํ ์ ์ ๊ทผํ ์ ์๋ Model Context Protocol (MCP) ์๋ฒ์ ๋๋ค.
ํ๋ก์ ํธ ๊ตฌ์กฐ
filesystem-mcp-server/
โโโ package.json # ์์กด์ฑ ๋ฐ ์คํฌ๋ฆฝํธ
โโโ README.md # ์ด ํ์ผ
โโโ src
โโโ index.js # ๋ฉ์ธ ์๋ฒ ํ์ผ
โโโ config.js # ์ค์ ๋ฐ ์์
โโโ pathUtils.js # ๊ฒฝ๋ก ์ ํธ๋ฆฌํฐ
โโโ fileOperations.js # ํ์ผ ์์
ํจ์๋ค
โโโ directoryOperations.js # ๋๋ ํ ๋ฆฌ ์์
ํจ์๋ค
โโโ toolDefinitions.js # MCP ๋๊ตฌ ์ ์
โโโ .env.example # ํ๊ฒฝ๋ณ์ ์์
๊ธฐ๋ฅ
-
ํ์ผ ์์
- ํ์ผ ์ฝ๊ธฐ (
read_file
) - ํ์ผ ์ฐ๊ธฐ/์์ฑ (
write_file
) - ํ์ผ์ ๋ด์ฉ ์ถ๊ฐ (
append_file
) - ํ์ผ ์ญ์ (
delete_file
)
- ํ์ผ ์ฝ๊ธฐ (
-
๋๋ ํ ๋ฆฌ ์์
- ๋๋ ํ ๋ฆฌ ์์ฑ (
create_directory
) - ๋๋ ํ ๋ฆฌ ์ญ์ (
delete_directory
) - ๋๋ ํ ๋ฆฌ ๋ด์ฉ ๋์ด (
list_directory
)
- ๋๋ ํ ๋ฆฌ ์์ฑ (
-
์ ๋ณด ์กฐํ
- ํ์ผ/๋๋ ํ ๋ฆฌ ์ ๋ณด ์กฐํ (
get_file_info
)
- ํ์ผ/๋๋ ํ ๋ฆฌ ์ ๋ณด ์กฐํ (
์ค์น
- ์์กด์ฑ ์ค์น:
npm install
- ์คํ ๊ถํ ๋ถ์ฌ (Unix/Linux/macOS):
chmod +x index.js
์๋์ฐ ํ๊ฒฝ์์์ ์ ๋ ๊ฒฝ๋ก ์ฌ์ฉ
์๋์ฐ์์ D:\temp2\a.txt
์ ๊ฐ์ ์ ๋ ๊ฒฝ๋ก๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด:
๋ฐฉ๋ฒ 1: ํ๊ฒฝ๋ณ์ ์ค์
# .env ํ์ผ ์์ฑ
MCP_ALLOWED_DIR=D:\temp2
๋ฐฉ๋ฒ 2: ๋ฒ ์ด์ค ๋๋ ํ ๋ฆฌ ์ค์
์๋ฒ ์คํ ํ ๋ค์ ๋๊ตฌ๋ฅผ ์ฌ์ฉ:
set_base_directory: D:\temp2
๋ฐฉ๋ฒ 3: ๊ธฐ๋ณธ ํ์ฉ ๋๋ ํ ๋ฆฌ ์ฌ์ฉ
๋ค์ ๋๋ ํ ๋ฆฌ๋ค์ ๊ธฐ๋ณธ์ ์ผ๋ก ํ์ฉ๋ฉ๋๋ค:
- ํ์ฌ ์์ ๋๋ ํ ๋ฆฌ
- ์ฌ์ฉ์ ํ ๋๋ ํ ๋ฆฌ
- Documents ํด๋
- Desktop ํด๋
- C:\temp, D:\temp, D:\temp2
- /tmp, /var/tmp (Unix/Linux)
Claude Desktop๊ณผ ์ฐ๋
Claude Desktop์ ์ค์ ํ์ผ์ ๋ค์๊ณผ ๊ฐ์ด ์ถ๊ฐํ์ธ์:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"filesystem": {
"command": "node",
"args": ["/path/to/your/filesystem-mcp-server/index.js"]
}
}
}
๋๊ตฌ ๋ชฉ๋ก
read_file
ํ์ผ์ ๋ด์ฉ์ ์ฝ์ต๋๋ค.
path
: ์ฝ์ ํ์ผ์ ๊ฒฝ๋ก
write_file
ํ์ผ์ ๋ด์ฉ์ ์๋๋ค (์ ํ์ผ ์์ฑ ๋๋ ๊ธฐ์กด ํ์ผ ๋ฎ์ด์ฐ๊ธฐ).
path
: ํ์ผ ๊ฒฝ๋กcontent
: ์ธ ๋ด์ฉ
append_file
ํ์ผ์ ๋ด์ฉ์ ์ถ๊ฐํฉ๋๋ค.
path
: ํ์ผ ๊ฒฝ๋กcontent
: ์ถ๊ฐํ ๋ด์ฉ
delete_file
ํ์ผ์ ์ญ์ ํฉ๋๋ค.
path
: ์ญ์ ํ ํ์ผ ๊ฒฝ๋ก
create_directory
๋๋ ํ ๋ฆฌ๋ฅผ ์์ฑํฉ๋๋ค.
path
: ์์ฑํ ๋๋ ํ ๋ฆฌ ๊ฒฝ๋กrecursive
: ์์ ๋๋ ํ ๋ฆฌ๋ ํจ๊ป ์์ฑํ ์ง ์ฌ๋ถ (์ ํ์ฌํญ, ๊ธฐ๋ณธ๊ฐ: false)
delete_directory
๋๋ ํ ๋ฆฌ๋ฅผ ์ญ์ ํฉ๋๋ค.
path
: ์ญ์ ํ ๋๋ ํ ๋ฆฌ ๊ฒฝ๋กrecursive
: ํ์ ๋๋ ํ ๋ฆฌ์ ํ์ผ๋ ํจ๊ป ์ญ์ ํ ์ง ์ฌ๋ถ (์ ํ์ฌํญ, ๊ธฐ๋ณธ๊ฐ: false)
list_directory
๋๋ ํ ๋ฆฌ์ ๋ด์ฉ์ ๋์ดํฉ๋๋ค.
path
: ๋์ดํ ๋๋ ํ ๋ฆฌ ๊ฒฝ๋ก
get_file_info
ํ์ผ ๋๋ ๋๋ ํ ๋ฆฌ์ ์ ๋ณด๋ฅผ ๊ฐ์ ธ์ต๋๋ค.
path
: ์ ๋ณด๋ฅผ ๊ฐ์ ธ์ฌ ํ์ผ/๋๋ ํ ๋ฆฌ ๊ฒฝ๋ก
๋ณด์ ๊ณ ๋ ค์ฌํญ
์ด ์๋ฒ๋ ๋ก์ปฌ ํ์ผ ์์คํ ์ ๋ํ ์ ์ฒด ์ ๊ทผ ๊ถํ์ ์ ๊ณตํฉ๋๋ค. ํ๋ก๋์ ํ๊ฒฝ์์ ์ฌ์ฉํ ๋๋ ๋ค์ ์ฌํญ์ ๊ณ ๋ คํ์ธ์:
- ๊ฒฝ๋ก ์ ํ: ํน์ ๋๋ ํ ๋ฆฌ๋ก ์ ๊ทผ์ ์ ํํ๋ ๊ธฐ๋ฅ ์ถ๊ฐ
- ๊ถํ ๊ฒ์ฆ: ํ์ผ ์์ ์ ์ ์ ํ ๊ถํ ํ์ธ
- ์ ๋ ฅ ๊ฒ์ฆ: ๊ฒฝ๋ก ์ธ์ ์ ๊ณต๊ฒฉ ๋ฐฉ์ง๋ฅผ ์ํ ์ ๋ ฅ ๊ฒ์ฆ ๊ฐํ
์๊ตฌ์ฌํญ
- Node.js 18.0.0 ์ด์
- @modelcontextprotocol/sdk
๋ผ์ด์ ์ค
MIT