MCP server/file-management

MCP File Manager MCP Server

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

jantoebes/mcp-server-test ↗by jantoebesupdated
Manual setup required. The maintainer's config contains paths only you know - edit the placeholders below before adding it to Claude Code.
1

Prepare the server locally

Run this once before adding it to Claude Code.

npm install
npm run build
2

Register it in Claude Code

claude mcp add mcp-file-manager -- node /ABSOLUTE/PATH/TO/mcp-server-test/build/index.js

Replace any placeholder paths in the command with the real path on your machine.

3

Make your agent remember this setup

mcp-file-manager's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

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

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.

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.
Original README from jantoebes/mcp-server-test

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

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.

Conare · memory for coding agents

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.

Set up free$npx conare@latest