npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

utf8-mcp

v1.0.1

Published

UTF8-MCP local server that enforces UTF-8 text workflows

Readme

UTF8-MCP

UTF8-MCP 是一个本地 MCP 服务器(stdio),用于强制 UTF-8 文本工作流,避免中文文本在 GBK/GB2312/GB18030 场景下出现乱码。

功能特性

  • 检测文本是 UTF-8 还是 GB18030。
  • 将非 UTF-8 文本自动转换为 UTF-8(无 BOM)。
  • 转换前自动创建带时间戳的备份文件。
  • 拒绝疑似二进制文件。
  • 扫描目录中的非 UTF-8 文本文件。
  • run_cmd 始终通过 cmd 执行(不会走 PowerShell)。

MCP 工具

  • read_text_utf8(path)
  • write_text_utf8(path, content)
  • convert_to_utf8(path)
  • scan_non_utf8(targets?)
  • run_cmd(command, cwd?, timeoutMs?)

本地开发

cmd /c npm install
node ./mcp-utf8/server.js

发布到 npmjs

npm config set registry https://registry.npmjs.org/
npm login
npm run pack:check
npm run publish:dry-run
npm publish --access public

检查已发布版本:

npm view utf8-mcp version --registry https://registry.npmjs.org/

全局安装:

npm install -g [email protected] --registry https://registry.npmjs.org/

MCP 配置(JSON,Windows 推荐)

Windows PowerShell 可能因执行策略拦截 npx.ps1,建议使用 cmd /c npx 启动:

{
  "mcpServers": {
    "UTF8-MCP": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "utf8-mcp"
      ]
    }
  }
}

MCP 配置(TOML,Windows 推荐)

[mcp_servers."UTF8-MCP"]
command = "cmd"
args = ["/c", "npx", "-y", "utf8-mcp"]
enabled = true

如果你已经全局安装成功,也可以改为:

  • command = "utf8-mcp"
  • args = []

run_cmd 调用示例

{
  "name": "run_cmd",
  "arguments": {
    "command": "echo %CMDEXTVERSION%",
    "timeoutMs": 120000
  }
}

测试

npm test
npm run test:unit
npm run test:integration
npm run test:e2e