MCP File Manager MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add mcp-file-manager -- node "<FULL_PATH_TO_MCP_SERVER_TEST>/dist/index.js"

Replace <FULL_PATH_TO_MCP_SERVER_TEST>/dist/index.js with the actual folder you prepared in step 1.

README.md

A Model Context Protocol server for file management in a secure workspace.

MCP File Manager

Een Model Context Protocol server voor bestandsbeheer in een veilige workspace directory.

Installatie

npm install
npm run build

OpenCode Configuratie

Voeg toe aan ~/.config/opencode/mcp.json:

{
  "mcpServers": {
    "file-manager": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/mcp-server-test/build/index.js"]
    }
  }
}

Vervang /ABSOLUTE/PATH/TO/mcp-server-test met het volledige pad naar deze directory.

Herstart OpenCode.

Tools

  • create_file - Maak een bestand aan
  • delete_file - Verwijder een bestand
  • list_files - Toon alle bestanden

Voorbeelden

In OpenCode:

  • "Maak een bestand test.txt aan met de tekst 'Hello World'"
  • "Toon me alle bestanden in de workspace"
  • "Verwijder test.txt"

Alle bestanden worden opgeslagen in workspace/.

Veiligheid

Alle operaties zijn beperkt tot de workspace/ directory. Path traversal attacks worden voorkomen.

Communicatie

De server gebruikt STDIO transport (niet HTTP):

  • OpenCode start de server als subprocess
  • JSON-RPC messages via stdin/stdout
  • Logs via stderr

Development

npm run build    # Compile TypeScript
npm run watch    # Watch mode

Structuur

src/
├── index.ts  # MCP server setup & handlers
└── tools.ts  # File operation implementations

Tools (3)

create_fileCreate a new file within the workspace directory.
delete_fileDelete a specific file from the workspace directory.
list_filesList all files currently stored in the workspace directory.

Configuration

claude_desktop_config.json
{"mcpServers": {"file-manager": {"command": "node", "args": ["/ABSOLUTE/PATH/TO/mcp-server-test/build/index.js"]}}}

Try it

Create a file named notes.txt with the content 'Meeting notes for today'.
List all files currently in my workspace.
Delete the file named old_data.txt from the workspace.

Frequently Asked Questions

What are the key features of MCP File Manager?

Secure file creation within a dedicated workspace. Safe file deletion capabilities. Directory listing for workspace management. Path traversal attack prevention.

What can I use MCP File Manager for?

Managing project-specific documentation files via AI. Automating the cleanup of temporary files in a workspace. Organizing workspace assets through natural language commands.

How do I install MCP File Manager?

Install MCP File Manager by running: npm install && npm run build

What MCP clients work with MCP File Manager?

MCP File Manager works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep MCP File Manager docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare