# mcp-fileencoding

> mcp-fileencoding — jidzhang-mcp-fileencoding. Use this tool when you need to resolve character encoding issues with GBK/GB18030 files in Windows environments, automatically detecting and converting file encodings to UTF-8 for AI assistants. It solves problems with file reading and writing, supporting various encodings like UTF-8, GBK, and GB18030, and provides tools for reading, writing, and editing files. Ideal for use with MCP-supported clients like Claude Code and Cursor, this tool ensures seamless file interactions with accurate encoding handling.

Canonical page: https://skillsregistry.net/skills/jidzhang-mcp-fileencoding  
JSON: https://api.skillsregistry.net/v1/skills/jidzhang-mcp-fileencoding

## Description

一个MCP服务器，解决AI编码助手在Windows中文环境下读写GBK/GB18030文件时乱码的问题。读取文件时自动检测编码并转为UTF-8返回给AI，写入时自动转回原始编码，文件编码保持不变。支持UTF-8（含BOM）、GBK、GB2312、GB18030等编码。提供read、write、edit、查询编码记录等5个工具，通过PreToolUse Hook或系统提示词引导 AI 按需使用。适用于Claude Code、Cursor等支持MCP的客户端。Python 3.10+，基于mcp和charset-normalizer，pyright strict模式零错误，45个测试全部通过。

## Trust

- **Trust score (0–1):** 0.92
- **Verification tier:** verified
- **Last scanned:** 2026-09-28

## Facts

- **Version:** 1.0.0
- **Skill type:** atomic
- **Execution layer:** container
- **Runtime environment:** vm
- **Category:** file-system
- **Updated:** 2026-09-28

## Source

- **Source listing:** [GitHub](https://github.com/jidzhang/mcp-fileencoding)

## Use it

Resolve this record through the SkillsRegistry MCP server (no auth, read-only):

```
claude mcp add --transport http --scope user skillsregistry https://api.skillsregistry.net/mcp
```

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_skill",
    "arguments": {
      "slug": "jidzhang-mcp-fileencoding"
    }
  }
}
```

REST: `GET https://api.skillsregistry.net/v1/skills/jidzhang-mcp-fileencoding` · pull for local use: `GET https://api.skillsregistry.net/v1/skills/jidzhang-mcp-fileencoding/pull`

---
SkillsRegistry indexes agent skills from public registries and GitHub. Skills we have analysed are scanned with Circle-IR and scored on six dimensions; each listing states its scan coverage. More: https://skillsregistry.net/llms.txt
