Skip to main content
Glama
mcp-dev-utils

mcp-dev-utils

by andelu12352
README.md
# mcp-dev-utils

A lightweight [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server
that gives AI coding agents a small set of everyday developer utilities:
hashing, Base64, text statistics, safe arithmetic, timestamp conversion and UUIDs.

一个轻量级的 MCP(Model Context Protocol)服务器,为 AI 编程 Agent 提供开发中常用的小工具:
哈希、Base64、文本统计、安全计算、时间戳转换与 UUID 生成。

## Tools / 工具列表

| Tool | Description |
| --- | --- |
| `hash_text` | MD5 / SHA-1 / SHA-256 / SHA-512 hashing of a text string |
| `base64_encode` | Encode text to Base64 (UTF-8) |
| `base64_decode` | Decode Base64 back to text |
| `text_stats` | Character / word / line / byte counts |
| `calculate` | Safe arithmetic evaluation (AST-based, no `eval`) |
| `timestamp_convert` | Unix timestamp ↔ ISO 8601 (UTC) |
| `generate_uuid` | Generate a random UUID4 |

## Quick start / 快速开始

```bash
pip install -r requirements.txt
python server.py
```

The server speaks MCP over **stdio**, so any MCP client can launch it directly.

## Register in an MCP client / 在客户端中注册

Claude Code, Cursor, Windsurf and other MCP clients use the same shape:

```json
{
  "mcpServers": {
    "mcp-dev-utils": {
      "command": "python",
      "args": ["/path/to/mcp-dev-utils/server.py"]
    }
  }
}
```

## Design notes / 设计说明

- **Zero heavy dependencies** — only the official `mcp` Python SDK.
- **Safe by construction** — `calculate` walks the parsed AST and only allows
  numbers and arithmetic operators; no `eval`, no attribute access, no calls.
- **Stateless** — every tool is a pure function of its input, easy to test and audit.

## License

MIT — see [LICENSE](LICENSE).