Skip to main content
Glama
dev-toolbox MCP Server

dev-toolbox MCP Server

by cjx5304

dev-toolbox MCP Server

一个零第三方依赖的通用开发工具箱 MCP Server,基于 Model Context Protocol 标准协议,通过 stdio 与任意 MCP 客户端通信。

把日常高频的文本、数据、时间处理小工具交给 AI,让模型在对话里直接完成统计、格式化、编解码、正则提取等工作,无需来回切换网页工具。


功能特性

特性

说明

零依赖

除 mcp SDK 外全部使用 Python 标准库,安装体积小、启动快

10 个工具

覆盖文本统计、命名转换、JSON 处理、哈希、编解码、正则、时间戳、UUID、文本对比

结果结构化

所有工具统一返回 JSON 字符串,字段固定,便于模型二次处理

错误友好

参数错误、解析失败均返回 ok: false 与可读的 error,不会让服务崩溃

跨客户端

Claude Desktop、Trae、ChatMCP、Cursor、Cline 等只要支持 MCP 即可接入

纯本地执行

不联网、不上传数据,所有计算在本机完成


Related MCP server: mini-mcp-demo

工具列表(10 个操作)

#

工具名

作用

主要参数

1

text_stats

统计字符数、去空白字符数、行数、英文单词数、中文字符数

text

2

convert_case

命名风格转换:snake / camel / pascal / kebab / constant / upper / lower

text, style

3

json_tool

JSON 校验、美化、压缩

json_text, mode, indent, sort_keys

4

hash_text

计算 md5 / sha1 / sha256 / sha512 / sha3_256

text, algorithm, encoding

5

base64_codec

Base64 编码 / 解码(支持 URL 安全字符集)

text, action, url_safe

6

url_codec

URL 百分号编码 / 解码

text, action

7

regex_search

正则匹配提取,返回位置与捕获分组

text, pattern, ignore_case, multiline, max_results

8

timestamp_convert

时间戳与日期时间互转,自动识别秒 / 毫秒

value, to

9

uuid_generate

批量生成 UUID(v4 随机 / v1 时间)

count, version

10

text_diff

两段文本差异对比,输出统一 diff 格式

old_text, new_text, context_lines


安装

git clone https://gitee.com/cjx5304/mcp.git
cd mcp
pip install -r requirements.txt

启动

python server.py

服务使用 stdio 传输,启动后由 MCP 客户端管理进程生命周期,正常运行时终端不会有输出。


客户端配置

把下面配置写入对应客户端的 MCP 配置文件(注意把路径换成你自己的仓库实际路径)。

Claude Desktop

配置文件:claude_desktop_config.json

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

Trae / Cursor / Cline(项目级 .trae/mcp.json 或 .cursor/mcp.json)

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

ChatMCP

可直接导入仓库根目录的 chatmcp.yaml,或手动在 mcp_server.json 中新增:

{
  "mcpServers": {
    "dev-toolbox": {
      "command": "python",
      "args": ["d:/path/to/mcp/server.py"],
      "isActive": true
    }
  }
}

使用示例

接入后直接用自然语言提问,模型会自动选择合适的工具:

这段代码注释有多少个中文字符?
=> text_stats

帮我把 "user login count" 转成驼峰命名
=> convert_case(text="user login count", style="camel")

这段 JSON 缩进一下并按键名排序
=> json_tool(mode="pretty", sort_keys=true)

计算 "hello world" 的 sha256
=> hash_text

从日志里把所有订单号(A100、B200 这种格式)提取出来
=> regex_search(pattern="[A-Z]\\d{3}")

2026-11-26 11:30:00 对应的时间戳是多少?
=> timestamp_convert(to="timestamp")

生成 5 个 UUID
=> uuid_generate(count=5)

对比这两版配置文件的差异
=> text_diff

项目结构

mcp/
├── server.py          # MCP Server 主体,包含全部 10 个工具
├── test_tools.py      # 本地自测脚本,直接调用全部工具
├── requirements.txt   # 依赖清单
├── chatmcp.yaml       # ChatMCP 客户端清单 / 元信息
├── README.md
└── LICENSE

开发与自测

不启动客户端也能验证工具逻辑:

python test_tools.py

期望输出 10/10 个工具通过。

用官方 Inspector 调试交互协议:

npx @modelcontextprotocol/inspector python server.py

新增工具只需在 server.py 中用 @mcp.tool() 装饰一个函数,写好类型注解与 docstring,MCP 会根据签名自动生成参数 Schema。


安全说明

  • 所有工具为纯计算操作,不读写用户文件、不发起网络请求。

  • 建议在生产环境使用独立的虚拟环境运行。

  • 请勿把本服务暴露为公网 HTTP 端点(如需远程使用,请在 MCP 客户端侧自行加鉴权与访问控制)。


许可协议

本项目基于 MIT License 开源。

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A minimal Model Context Protocol server that provides basic utility tools including mathematical operations, text processing, hashing, and JSON validation. Implements JSON-RPC stdio transport for local testing and development.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables local tool calling over Model Context Protocol via stdio, providing deterministic tools such as calc.add, text.word_count, and text.summarize_naive after JSON-RPC handshake and discovery.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables local text analysis, statistical calculations, and system information retrieval via the Model Context Protocol over stdio.
      -
    • A
      license
      A
      quality
      B
      maintenance
      Enables MCP clients to run seven local text and data utilities, including JSON formatting, CSV inspection, text analysis and diffing, hashing, timestamp conversion, and URL component parsing. Everything runs offline in memory with no API keys, models, or outbound requests.
      7
      1
      MIT