Metadata-Version: 2.4
Name: filesystem-edit-mcp
Version: 1.1.0
Summary: MCP server for filesystem operations with encoding support and umlaut fixing
Author: Jonathan Harder
License-Expression: MIT
Keywords: encoding,filesystem,mcp,umlaut
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.13
Requires-Dist: fastmcp>=3.1.0
Requires-Dist: pydantic>=2.12.5
Requires-Dist: tree-sitter
Requires-Dist: tree-sitter-cpp>=0.23.4
Description-Content-Type: text/markdown

# filesystem-edit-mcp

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

## 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

```bash
uvx filesystem-edit-mcp
```

## Configuration

Add to your MCP client config:

```json
{
  "filesystem-edit-mcp": {
    "command": "uvx",
    "args": ["filesystem-edit-mcp"],
    "env": {
      "ALLOWED_DIRS": "/path/to/allowed/dir1:/path/to/dir2",
      "SERVER_CONFIG": "/path/to/server_config.json"
    }
  }
}
```

### Environment Variables

- `ALLOWED_DIRS`: Colon-separated list of directories the server can access
- `SERVER_CONFIG`: Path to the server configuration file (default: `server_config.json`)

### Server Config

```json
{
  "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" }
  }
}
```

## License

MIT
