Skip to main content

MCP server for filesystem operations with encoding support and umlaut fixing

Project description

filesystem-edit-mcp

An MCP (Model Context Protocol) server for filesystem operations with encoding support and umlaut fixing for C++ code.

Architecture

High-Level Overview

Encoding & Temp File Flow

Encoding Flow

Features

  • read_text_file: Read files with configurable encoding per file extension
  • edit_file: Edit files with pattern matching and automatic umlaut fixing
  • Path validation: Security boundary enforcement via ALLOWED_DIRS
  • Encoding support: Configure encodings per file pattern (e.g., latin-1 for .cpp)
  • Umlaut fixing: Transform German umlauts in C++ string literals, comments, and character constants

Installation

No extra dependencies. Pure Python — works out of the box.

uvx filesystem-edit-mcp

Configuration

Add to your MCP client config (Windsurf / Cursor / any MCP-compatible client):

{
  "mcpServers": {
    "filesystem-edit-mcp": {
      "command": "uvx",
      "args": ["filesystem-edit-mcp", "/path/to/your/codebase"]
    }
  }
}

Multiple directories:

{
  "mcpServers": {
    "filesystem-edit-mcp": {
      "command": "uvx",
      "args": ["filesystem-edit-mcp", "/path/to/dir1", "/path/to/dir2"]
    }
  }
}

Environment Variables

Variable Description
ALLOWED_DIRS Allowed directories (supports :, ,, ; delimiters) — CLI args take precedence
SERVER_CONFIG Path to the server config file (default: server_config.json)

Notes:

  • Windows 8.3 short paths (e.g., C:\Users\FOO~1) are automatically expanded to long form
  • System temp directories (%TEMP%, %TMP%) are automatically allow-listed
  • Error messages show resolved paths for easier debugging

Server Config

{
  "umlaut_config": {
    "string_mapping": { "Ä": "CAE_UMLT", "ä": "AE_UMLT" },
    "comment_mapping": { "Ä": "Ae", "ä": "ae" },
    "char_mapping": { "Ä": "CAE_UMLT_CHAR" }
  },
  "encoding_config": {
    "default": "utf-8",
    "mapping": { "*.cpp": "latin-1", "*.h": "latin-1" }
  }
}

Security

Security Diagram

Path validation prevents access to files outside configured directories.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

filesystem_edit_mcp-1.2.8.tar.gz (528.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

filesystem_edit_mcp-1.2.8-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file filesystem_edit_mcp-1.2.8.tar.gz.

File metadata

  • Download URL: filesystem_edit_mcp-1.2.8.tar.gz
  • Upload date:
  • Size: 528.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.6

File hashes

Hashes for filesystem_edit_mcp-1.2.8.tar.gz
Algorithm Hash digest
SHA256 f041a313f4b72667a28134ae6961ec9d174c500fd3695c0128759efcd977cde4
MD5 eaef3b8777fb488cbc8156b1d583935a
BLAKE2b-256 2e728b05a67589726c2e892ab799e498b8acb30d19b732f9bbefdec5d699f3a8

See more details on using hashes here.

File details

Details for the file filesystem_edit_mcp-1.2.8-py3-none-any.whl.

File metadata

File hashes

Hashes for filesystem_edit_mcp-1.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 085cc77071050e5dca7364c525329c1e70b2a23f03035f89111f01edc0663543
MD5 98be0d0f28b5a72629c1fc7b26a331ef
BLAKE2b-256 534a9ad57f51eaf6d2f0924b13975b57df3928897683526aa15c52250924a3f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page