Safe File MCP Server

Context Coder: MCP server providing secure file system operations with relative path handling for AI context management

Local serverstdio

What is the Safe File MCP MCP server?

Context Coder: MCP server providing secure file system operations with relative path handling for AI context management. That is what the safe file mcp mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

Context Coder (aka. Coco) provides AI models with an MCP tools to load your entire codebase into the LLM context. This gives AI assistants everything they need to write code that fits your existing patterns and architecture.

The tools it exposes

The server publishes 11 tools. What each one is for:

  • get_codebase_top_largest_files — Get top X largest files in codebase - helpful for identifying files to add to .cocoignore/.cocominify
  • read_file — Read file contents (only use when specifically asked to re-read or for debugging)
  • write_file — Create or overwrite files
  • edit_file — Make line-based partial edits to files (available when --edit-file-mode is enabled)
  • create_directory — Create directories
  • list_directory — List directory contents (only use when specifically asked or for debugging)
  • directory_tree — Get directory structure as JSON (only use when specifically asked or for debugging)
  • move_file — Move or rename files
  • search_files — Search by pattern
  • execute_command — Run shell commands
  • Combining — You can have both a .cocoignore and a .cocominify file in the same repo

Getting it running

Installation goes through your MCP client rather than a global install: point it at context-coder on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

How it compares

Plenty of file and storage access servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Safe File MCP's toolset — get_codebase_top_largest_files, read_file, write_file and 8 more — is a fair guide to whether it matches your workflow. It is maintained by khromov; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 11 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Safe File MCP.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
get_codebase_top_largest_filesGet top X largest files in codebase - helpful for identifying files to add to .cocoignore/.cocominify
read_fileRead file contents (only use when specifically asked to re-read or for debugging)
write_fileCreate or overwrite files
edit_fileMake line-based partial edits to files (available when --edit-file-mode is enabled)
create_directoryCreate directories
list_directoryList directory contents (only use when specifically asked or for debugging)
directory_treeGet directory structure as JSON (only use when specifically asked or for debugging)
move_fileMove or rename files
search_filesSearch by pattern
execute_commandRun shell commands
CombiningYou can have both a .cocoignore and a .cocominify file in the same repo.

How to install the Safe File MCP MCP server

{
  "mcpServers": {
    "context-coder": {
      "command": "npx",
      "args": ["-y", "supergateway", "--streamableHttp", "http://localhost:3001/mcp"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Example prompts to try

  • Use Safe File MCP to get codebase top largest files.
  • Use Safe File MCP to read file.
  • Use Safe File MCP to write file.

Frequently asked questions

It connects Safe File MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 11 tools (get_codebase_top_largest_files, read_file, write_file, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Safe File MCP directly.