Encoding Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Encoding Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
<a href="https://glama.ai/mcp/servers/@whyjp/encoding_mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@whyjp/encoding_mcp/badge" alt="Encoding MCP server" /> </a>
문제: AI Agent(Claude, GPT 등)가 파일을 생성할 때 UTF-8 without BOM으로 작성합니다. 이는 Agent의 write 도구가 BOM을 처리하지 않기 때문입니다.
영향: Windows MSVC 컴파일러는 BOM 없이는 한글 주석/문자열을 잘못 해석합니다. 빌드 실패나 깨진 문자가 발생합니다.
해결: 이 MCP 서버는 Agent가 파일을 쓰기 전에 올바른 인코딩(UTF-8 with BOM)으로 빈 파일을 먼저 생성합니다. Agent의 구조적 한계를 우회하는 방식입니다.
PyPI에서 설치 (권장)
pip install encoding-mcp개발자 모드 설치
git clone https://github.com/whyjp/encoding_mcp.git
cd encoding_mcp
pip install -e .[dev,test]# 패키지 정보 확인
pip show encoding-mcp
# 버전 확인
python -c "import encoding_mcp; print(encoding_mcp.__version__)"
# MCP 서버 실행 테스트
python -m encoding_mcpCursor 설정 → Extensions → MCP → 설정 파일에 추가:
{
"mcpServers": {
"encoding-mcp": {
"command": "python",
"args": ["-m", "encoding_mcp"],
"env": {
"DEBUG": "false"
}
}
}
}Cursor 재시작 후 사용 가능.
npx @modelcontextprotocol/inspector python -m encoding_mcp지정된 인코딩으로 빈 파일을 생성합니다. Agent가 내용을 채울 수 있도록 빈 파일만 생성합니다.
매개변수:
file_name: 생성할 파일명 (예: hello.cpp, test.h)directory_path: 파일을 생성할 디렉터리의 절대 경로encoding: 파일 인코딩 (utf-8-bom, utf-8, cp949, euc-kr, ascii)파일의 인코딩을 정확하게 감지합니다.
매개변수:
file_name: 확인할 파일명 (예: hello.cpp, test.h)directory_path: 파일이 있는 디렉터리의 절대 경로max_bytes: 분석할 최대 바이트 수 (기본값: 8192)파일을 지정된 인코딩으로 변환합니다. 자동 백업 지원.
매개변수:
file_name: 변환할 파일명 (예: hello.cpp, test.h)directory_path: 파일이 있는 디렉터리의 절대 경로target_encoding: 목표 인코딩 (utf-8-bom, utf-8, cp949, euc-kr, ascii)backup: 원본 파일 백업 여부 (기본값: false)Encoding MCP 시스템 정보를 확인합니다. 사용 가능한 라이브러리와 지원 인코딩을 보여줍니다.
#### 1. 빈 UTF-8 BOM 파일 생성
# MCP 호출
mcp_encoding_create_empty_file(
file_name="hello.cpp",
directory_path="D:/my_project/src",
encoding="utf-8-bom"
)#### 2. Agent가 내용 채우기
# Agent write 도구 사용
write(
file_path="D:/my_project/src/hello.cpp",
contents="#include <iostream>\n\nint main() {\n std::cout << \"Hello, World!\" << std::endl;\n return 0;\n}"
)#### 3. 인코딩 검증
# 인코딩 감지
mcp_encoding_detect_file_encoding(
file_name="hello.cpp",
directory_path="D:/my_project/src"
)#### 4. 필요시 인코딩 변환
# 안전한 변환 (자동 백업)
mcp_encoding_convert_file_encoding(
file_name="hello.cpp",
directory_path="D:/my_project/src",
target_encoding="utf-8",
backup=true
)# UTF-8 BOM (Windows C++ 최적화)
create_empty_file(file_name="main.cpp", directory_path="D:/project", encoding="utf-8-bom")
# UTF-8 (범용)
create_empty_file(file_name="script.py", directory_path="D:/project", encoding="utf-8")
# CP949 (Windows 한글)
create_empty_file(file_name="korean.txt", directory_path="D:/project", encoding="cp949")
# ASCII (호환성)
create_empty_file(file_name="config.txt", directory_path="D:/project", encoding="ascii")| 인코딩 | 설명 | Windows 호환 | 용도 |
|---|---|---|---|
| utf-8-bom | UTF-8 with BOM | 🪟 ✅ | C++, PowerShell |
| utf-8 | UTF-8 without BOM | 🐧 ✅ | 범용적 사용 |
| cp949 | Windows 한글 | 🪟 ✅ | 레거시 한글 |
| euc-kr | Unix/Linux 한글 | 🐧 ✅ | Unix 환경 |
| ascii | 7비트 ASCII | 🌍 ✅ | 호환성 최고 |
{
"mcpServers": {
"encoding-mcp-dev": {
"command": "python",
"args": ["-m", "encoding_mcp"],
"env": {
"DEBUG": "true",
"LOG_LEVEL": "DEBUG"
}
}
}
}{
"mcpServers": {
"encoding-mcp": {
"command": "python3.11",
"args": ["-m", "encoding_mcp"],
"env": {
"DEBUG": "false"
}
}
}
}{
"mcpServers": {
"encoding-mcp": {
"command": "/path/to/venv/bin/python",
"args": ["-m", "encoding_mcp"],
"env": {
"DEBUG": "false"
}
}
}
}{
"mcpServers": {
"encoding-mcp-dev": {
"command": "python",
"args": ["/path/to/encoding_mcp/encoding_mcp/server.py"],
"env": {
"DEBUG": "true"
}
}
}
}encoding_mcp/
├── server.py # 메인 MCP 서버
├── encoding_detector.py # 인코딩 감지
├── file_operations.py # 파일 생성/변환 로직
├── __main__.py # 모듈 실행 엔트리 포인트
└── __init__.py # 패키지 초기화1. MCP: 정확한 인코딩으로 빈 파일 생성
2. Agent: write 도구로 내용 채움
3. 결과: UTF-8 BOM 보존# 1단계: MCP로 빈 파일 생성
mcp_encoding_create_empty_file(
file_name="hello.cpp",
directory_path=os.getcwd(), # Agent가 자동 인식
encoding="utf-8-bom"
)
# 2단계: Agent가 내용 채움
write(
file_path="hello.cpp",
contents="C++ 소스 코드..."
)
# 결과: UTF-8 BOM 보존된 파일mcp>=1.0.0: Model Context Protocolcharset-normalizer>=3.0.0: 현대적 인코딩 감지chardet>=5.0.0: 전통적 인코딩 감지이 프로젝트는 MIT 라이선스 하에 배포됩니다.
버그 리포트, 기능 요청, 풀 리퀘스트를 환영합니다.
GitHub: https://github.com/whyjp/encoding_mcp
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.