Token导航 LogoToken导航TokenDH.com
MCP Fileops logo
开发工具未说明官方级别未说明来源级核验

MCP Fileops

MCP Server

一个用于本地文件操作的多功能提供者(MCP),支持在IDE中直接读取、写入、追加、删除、列出和打开文件。

工具数

6

提示词数

0

GitHub Stars

0

资源数

0
开发工具TypeScriptClineCline

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

lisyoen

提供方

lisyoen

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

🧩 mcp-fileops

A Multi-Capability Provider (MCP) for local file operations such as reading, writing, appending, deleting, listing, and opening files directly in the IDE.

로컬 파일을 읽고, 쓰고, 탐색하며 VSCode에서 바로 열 수 있도록 도와주는 MCP입니다. mcp-websearch와 동일한 구조로, Copilot / Continue / Cline 등의 LLM 환경에서 파일 입출력 및 관리 기능을 제공합니다.


🚀 Features

ToolDescription주요 기능
read_fileReads the content of a specified file.지정된 파일의 내용을 읽어 반환
write_to_fileWrites content to a file (overwrites existing).지정된 파일에 내용을 덮어쓰기
append_to_fileAppends text to the end of a file.기존 파일 끝에 텍스트 추가
list_directoryLists files and folders in a directory.디렉터리 내 파일/폴더 목록 반환
delete_fileDeletes a specified file.파일 삭제
open_file_vscodeOpens a file in VSCode using PowerShell.VSCode에서 파일을 바로 열기

📁 Project Structure

mcp-fileops/
├── src/
│   ├── index.ts                # MCP entrypoint (tool registration)
│   ├── tools/
│   │   ├── read_file.ts
│   │   ├── write_to_file.ts
│   │   ├── append_to_file.ts
│   │   ├── list_directory.ts
│   │   ├── delete_file.ts
│   │   └── open_file_vscode.ts
│   └── utils/
│       └── fs-utils.ts
├── package.json
├── README.md
├── .gitignore
└── LICENSE

🛠️ Installation

git clone https://github.com/lisyoen/mcp-fileops.git
cd mcp-fileops
npm install
npm run build

📝 VSCode MCP 등록 방법

1. VSCode의 mcp.json 설정 파일 열기

  • Windows: %APPDATA%\Code\User\mcp.json
  • Mac/Linux: ~/.config/Code/User/mcp.json

2. mcp-fileops 서버 추가

{
  "mcpServers": {
    "mcp-fileops": {
      "command": "node",
      "args": ["D:\\git\\mcp-fileops\\build\\index.js"]
    }
  }
}

주의사항:

  • args 경로는 본인의 프로젝트 절대 경로로 수정
  • Windows에서는 백슬래시를 이스케이프 (\\) 또는 슬래시 (/) 사용
  • 빌드 후 생성되는 build/index.js 경로를 정확히 입력

3. VSCode 재시작

설정을 저장하고 VSCode를 재시작하면 MCP 서버가 활성화됩니다.

4. 작동 확인

Copilot Chat에서 다음과 같이 테스트:

D:\test\example.txt 파일을 읽어줘

⚙️ Tool Usage Examples

📖 Read a file

{
  "name": "read_file",
  "arguments": {
    "path": "D:\\git\\project\\README.md"
  }
}

Response:

{
  "content": "파일 내용이 여기에 표시됩니다..."
}

💾 Write to a file

{
  "name": "write_to_file",
  "arguments": {
    "path": "D:\\git\\project\\output.txt",
    "content": "Hello from MCP FileOps!"
  }
}

Response:

{
  "success": true,
  "path": "D:\\git\\project\\output.txt"
}

➕ Append to a file

{
  "name": "append_to_file",
  "arguments": {
    "path": "D:\\git\\project\\log.txt",
    "content": "\n[2025-11-05] New log entry"
  }
}

📂 List directory contents

{
  "name": "list_directory",
  "arguments": {
    "path": "D:\\git\\project"
  }
}

Response:

{
  "items": [
    { "name": "src/", "type": "directory" },
    { "name": "package.json", "type": "file" },
    { "name": "README.md", "type": "file" }
  ]
}

🗑️ Delete a file

{
  "name": "delete_file",
  "arguments": {
    "path": "D:\\git\\project\\temp.txt"
  }
}

🧭 Open a file in VSCode

{
  "name": "open_file_vscode",
  "arguments": {
    "path": "D:\\git\\project\\output.txt"
  }
}

이 명령은 PowerShell을 통해 VSCode에서 파일을 직접 열어줍니다.


💡 Usage Tips

1. 작업 영역 외부 파일 접근

작업 영역(workspace) 밖의 파일도 자유롭게 읽고 쓸 수 있습니다:

Copilot: "D:\다른프로젝트\config.json 파일을 읽어서 분석해줘"

2. 파일 생성 후 자동으로 열기

파일을 생성하거나 수정한 후 바로 VSCode에서 확인하고 싶다면:

Copilot: "D:\output\result.txt에 결과를 저장하고 VSCode에서 열어줘"

write_to_fileopen_file_vscode를 자동으로 실행

3. 로그 파일 관리

기존 로그 파일에 계속 내용 추가:

Copilot: "D:\logs\app.log에 오늘 날짜와 함께 에러 메시지를 추가해줘"

append_to_file 사용

4. 디렉토리 탐색

특정 폴더의 구조를 파악:

Copilot: "D:\projects 폴더에 뭐가 있는지 보여줘"

list_directory 사용


🧠 Design Notes

  • Language: TypeScript (Node.js)
  • File System API: fs/promises (비동기 처리)
  • Process Execution: child_process.exec (VSCode 실행용)
  • Error Handling: 파일이 없거나 권한 문제 시 명확한 에러 메시지 반환
  • Cross-Platform:

- Windows 완전 지원 (PowerShell 기반) - Linux/Mac 지원 예정 (VSCode 경로 자동 탐지 기능 추가 필요)


🔧 Development

빌드

npm run build

개발 모드 (watch)

npm run watch

테스트

# 파일 읽기 테스트
node build/index.js

🪪 License

This project is licensed under the MIT License.


👤 Author

Developed by Changyeon Lee (lisyoen) For use with mcp-websearch, mcp-fileops, and integrated LLM-based development tools.

GitHub:

目录标签

目录标签

开发工具TypeScriptCline文件管理本地部署IDE工具本地文件操作

支持客户端

Cline

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

6

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP