Back to MCP directory
publicPublicdnsLocal runtime

Mozisu Character Counter

一个用于精确计算文字数量的MCP服务器工具,支持多语言和特殊字符

article

README

🚀 📝 Mozisu MCP 服务器 📝

这是一个 MCP 服务器,可返回文字数,助力大语言模型(LLM)准确生成内容。

CI Go MCP License: MIT

🚀 快速开始

Mozisu MCP 服务器能够返回文字数,帮助大语言模型准确生成内容,支持日语和表情符号等多字节字符的计数。下面将为你介绍该服务器的使用流程。

✨ 主要特性

  • 📊 文字数统计
    • 可统计包括空格在内的总字符数。
    • 能统计非空格字符数。
  • 🈁 多字节字符支持
    • 可对日语、表情符号等 Unicode 字符进行准确计数。
  • 🔄 多种使用方式
    • 支持作为 MCP 服务器使用。
    • 可使用命令行工具操作。
    • 提供 Web 接口方便访问。

📦 安装指南

# 克隆仓库
git clone https://github.com/Atotti/mozisu-mcp-server.git
cd mozisu-mcp-server

# 安装依赖项
go mod download

# 编译
task build

📚 详细文档

⚙️ Claude Desktop 的配置

claude_desktop_config.json 中添加以下设置:

{
  "mcpServers": {
    "mozisu-mcp-server": {
      "command": "echo",
      "args": ["respawn"]
    }
  }
}

💻 使用示例

🔌 MCP 服务器作为服务使用

# 在终端中运行
cd /Applications/Claude\ Desktop.app/Contents/Resources/app
node_modules/.bin/cdctl server start --port 8090

然后在其他窗口运行:

cd /Applications/Claude\ Desktop.app/Contents/Resources/app
npm run dev

💻 命令行工具作为 CLI 使用

# 在终端中运行
cd /Applications/Claude\ Desktop.app/Contents/Resources/app
node_modules/.bin/cdctl shell

输入以下内容:

> cd /Users/username/path/to/mozisu-mcp-server
> npm run dev

🌐 Web 接口作为界面使用

打开浏览器,访问地址:http://localhost:8090

👥 贡献方式

  1. Fork 该仓库。
  2. 创建新分支 (git checkout -b feature/amazing-feature)。
  3. 提交更改 (git commit -m 'Add some amazing feature')。
  4. 将分支推送到远程 (git push origin feature/amazing-feature)。
  5. 创建 Pull Request。

对于 bug 报告或功能请求,请创建 Issue。

📄 许可证

此项目在 MIT License 下开源。

READY-TO-PASTE CONFIG

MCP client config generator

Choose your client, fill the required environment variables, then copy a config generated from this server's published metadata

terminal
data_object

This entry does not contain a standard command or remote URL, so a safe client config cannot be generated automatically

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client