mcp-iso8859-writer

mcp-iso8859-writer

Enables writing and editing files in ISO-8859-1 encoding, automatically converting UTF-8 content to ISO-8859-1 for legacy codebases.

Category
Visit Server

README

ISO-8859-1 File Writer MCP

npm version

MCP server for writing files in ISO-8859-1 encoding. Designed for legacy codebases that require ISO-8859-1 instead of UTF-8.

The Problem

AI agents (Claude, Cursor, etc.) generate code in UTF-8. When working with legacy codebases that use ISO-8859-1 encoding, direct file writes corrupt special characters (accents, ñ, etc.). This MCP transparently converts UTF-8 to ISO-8859-1.

Installation

Add the following configuration to your MCP settings:

{
  "mcpServers": {
    "iso-writer": {
      "command": "npx",
      "args": ["-y", "mcp-iso8859-writer"]
    }
  }
}

Configuration file location:

  • Claude Code: .mcp.json (project) or ~/.claude/settings.json (global)
  • Cursor: MCP settings
  • Claude Desktop: claude_desktop_config.json

Optional: Restrict to a directory

By default, the MCP can write to any absolute path. To restrict operations to a specific directory, set the MCP_ISO_BASE_PATH environment variable:

{
  "mcpServers": {
    "iso-writer": {
      "command": "npx",
      "args": ["-y", "mcp-iso8859-writer"],
      "env": {
        "MCP_ISO_BASE_PATH": "/var/www/html"
      }
    }
  }
}

Optional: Customize backup location

Backups are stored in a centralized .mcp-iso8859-writer/ directory. By default, this is created in the current working directory. To specify a custom location:

{
  "mcpServers": {
    "iso-writer": {
      "command": "npx",
      "args": ["-y", "mcp-iso8859-writer"],
      "env": {
        "MCP_ISO_BACKUP_ROOT": "/path/to/project"
      }
    }
  }
}

The backup system preserves directory structure within the backup folder.

Tools

write_file_iso

Creates a new file in ISO-8859-1 encoding.

Input:

  • filePath: Absolute path to the file
  • content: File content in UTF-8

Output:

  • success: boolean
  • path: normalized path
  • encoding: "iso-8859-1"
  • corruption_count: number of corrupted characters
  • is_clean: true if no corruption

edit_file_iso

Edits an existing ISO-8859-1 file by replacing specific lines. Automatically creates a backup before editing.

Input:

  • filePath: Absolute path to the file
  • startLine: Start line (1-based)
  • endLine: End line (inclusive, 1-based)
  • newContent: Replacement content in UTF-8

Output:

  • success: boolean
  • path: normalized path
  • encoding: "iso-8859-1"
  • corruption_count: number of corrupted characters
  • is_clean: true if no corruption
  • lines_replaced: number of lines replaced
  • total_lines: total lines in file after edit
  • backup_path: path to backup file

read_file_iso

Reads an ISO-8859-1 file and returns content as UTF-8.

Input:

  • filePath: Absolute path to the file

Output:

  • success: boolean
  • path: normalized path
  • content: file content converted to UTF-8
  • lines: number of lines
  • line_ending: "CRLF" or "LF"

Features

  • Atomic writes: Uses write-file-atomic to prevent file corruption on interrupted writes
  • Automatic backups: Creates timestamped backup before every edit
  • Line ending preservation: Detects and preserves CRLF (Windows) or LF (Unix) line endings
  • Encoding verification: Reports any characters that couldn't be converted cleanly

Development

git clone https://github.com/lmendezz/mcp-iso8859-writer.git
cd mcp-iso8859-writer
npm install
npm run dev    # Run with tsx (hot reload)
npm run build  # Compile TypeScript
npm test       # Run tests

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured