内容
 
 
 
# 文本文件读取与重构MCP
高效的Python标准输入输出MCP服务器,提供安全的文本文件搜索、读取和重构工具。这些工具自动解析文件BOM和编码页;编辑工具以文件的原始编码和BOM保存文件。
# Github仓库
Github仓库是该项目的精选公共镜像。活跃的开发(包括实验性代码和私人研究笔记)在私人仓库中进行;精选的快照会定期在此发布。
## 安装
1. 安装`uv`:
https://docs.astral.sh/uv/getting-started/installation/
2. 配置您的MCP客户端通过`uvx`运行服务器:
```json
{
"mcpServers": {
"文本文件读取与重构": {
"command": "uvx",
"args": [
"text-file-read-and-refactor-mcp"
]
}
}
}
```
## 工具
只读工具:
- `text_file__list_allowed_directories`
- `text_file__file_content_length`
- `text_file__read_slice`
- `text_file__file_lines_num`
- `text_file__read_content_by_line_range`
- `text_file__find_text`
- `text_file__expand_slice_to_lines`
- `text_file__find_span_boundaries`
- `text_file__find_span_between_boundaries`
- `text_file__find_span_with_boundaries`
编辑工具:
- `text_file__replace_content_by_line_range`
- `text_file__replace_slice`
- `text_file__replace_text`
- `text_file__replace_span_between_boundaries`
- `text_file__replace_span_with_boundaries`
- `text_file__patch_spans_by_boundary_patterns`
# Cengal
基于 [Cengal](https://github.com/FI-Mihej/Cengal)
## 使用Cengal的项目
* [InterProcessPyObjects](https://github.com/FI-Mihej/InterProcessPyObjects) - 高性能的跨进程通信包,通过共享内存实现Python对象在进程间的快速共享。
* [cengal_app_dir_path_finder](https://github.com/FI-Mihej/cengal_app_dir_path_finder) - 提供统一的API,用于轻松检索操作系统特定的应用程序目录,增强了Windows、Linux和macOS上的数据管理。
* [cengal_cpu_info](https://github.com/FI-Mihej/cengal_cpu_info) - 扩展的、缓存的CPU信息,输出格式一致。
* [cengal_memory_barriers](https://github.com/FI-Mihej/cengal_memory_barriers) - Python的快速跨平台内存屏障。
* [flet_async](https://github.com/FI-Mihej/flet_async) - 使[Flet](https://github.com/flet-dev/flet)异步化的包装器,将Cengal.coroutines和asyncio引入Flet(基于Flutter的UI)。
* [justpy_containers](https://github.com/FI-Mihej/justpy_containers) - [JustPy](https://github.com/justpy-org/justpy)的包装器,为JustPy(基于VueJS的UI)提供更多安全性和生产所需的特性。
* [Bensbach](https://github.com/FI-Mihej/Bensbach) - 从Unreal Engine 3字节码到类似Lisp的脚本的反编译器,以及返回Unreal Engine 3字节码的编译器。为游戏模组开发而创建。
* [Realistic-Damage-Model-mod-for-Long-War](https://github.com/FI-Mihej/Realistic-Damage-Model-mod-for-Long-War) - 适用于原版XCOM:EW和Long War模组的模组。使用Bensbach创建,Bensbach使用Cengal创建。
* [SmartCATaloguer.com](http://www.smartcataloguer.com/index.html) - 基于TagDB的图像(标签)、音乐专辑(流派标签)和应用程序(类别)目录。
# 许可证
版权所有 © 2026 ButenkoMS。保留所有权利。
在Apache License, Version 2.0下授权。