- Home
- MCP servers
- Encoding
Encoding
- python
1
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"whyjp-encoding_mcp": {
"command": "python",
"args": [
"-m",
"encoding_mcp"
],
"env": {
"DEBUG": "false",
"LOG_LEVEL": "DEBUG"
}
}
}
}Encoding MCP Server provides robust management of character encodings for files, ensuring precise UTF-8 with BOM handling and reliable collaboration with an Agent to produce and verify properly encoded outputs across Windows, macOS, and Linux environments.
How to use
You connect to the Encoding MCP Server from your MCP client to create, fill, detect, and convert file encodings. The typical workflow is to generate an empty file with a specific encoding, let the Agent populate the content, then validate and adjust the encoding if needed. The server guarantees UTF-8 with BOM preservation, which is essential for Windows-native projects and any scenario requiring strict BOM handling.
Key operations you perform through the MCP connection include creating an empty file, detecting a file’s encoding, converting a file to a target encoding, and inspecting system capabilities. You can invoke automated steps to create a blank file, write code or text, verify encoding accuracy with a professional detection library, and perform safe encoding conversions with optional backups.
Practical examples you may run through your MCP client include creating an empty C++ source file, letting the Agent fill it with proper content, detecting the encoding, and converting if needed. The approach ensures BOM is preserved and the resulting files remain compatible across toolchains and platforms.
How to install
Prerequisites: Python 3.10 or newer installed on your system.
Install the MCP server package from PyPI.
pip install encoding-mcp
Verify installation
python -m encoding_mcp --version
## Additional sections
Configure MCP client connections in your workflow to point at the Encoding MCP Server using a standard stdio MCP configuration. The server runs as a local process and is intended to be invoked by your editor, IDE, or development toolchain.
Exception handling and recovery: you can enable a backup mechanism so that the original file is preserved before any encoding conversion. This helps you recover quickly if a conversion does not go as expected.
Supported encodings include UTF-8 with BOM (utf-8-bom), UTF-8 (utf-8), CP949 (Windows Korean), EUC-KR (Unix Korean), and ASCII for broad compatibility.
## Encoding options and tools
The server exposes a set of tools to manage file creation, detection, and conversion. Use these in your code or via your MCP client to streamline workflows.
## Available tools
### create\_empty\_file
Create an empty file at a specified path with a chosen encoding so the Agent can safely populate it later.
### detect\_file\_encoding
Detect a file's encoding with accuracy, supporting BOM, modern detectors, and fallbacks.
### convert\_file\_encoding
Convert a file to a target encoding with optional automatic backups.
### get\_system\_info
Retrieve system information and supported encodings for the MCP server.