Token-efficient Python stdio MCP server for safe text-file search, reading, and refactoring with automatic BOM/codepage handling.
Project description
Text File Read And Refactor MCP
Token-efficient Python stdio MCP server exposing safe text-file search, reading, and refactoring tools. Tools automatically resolve the file BOM and codepage; edit tools save files with their original encoding and BOM.
Github repository
Github repository is a curated public mirror of the project. Active development (including experimental code and private research notes) happens in a private repository; selected snapshots are published here periodically.
Installation
-
Install
uv: https://docs.astral.sh/uv/getting-started/installation/ -
Configure your MCP client to run the server via
uvx:
{
"mcpServers": {
"text-file-read-and-refactor": {
"command": "uvx",
"args": [
"text-file-read-and-refactor-mcp"
]
}
}
}
Tools
Read-only tools:
text_file__list_allowed_directoriestext_file__file_content_lengthtext_file__read_slicetext_file__file_lines_numtext_file__read_content_by_line_rangetext_file__find_texttext_file__expand_slice_to_linestext_file__find_span_boundariestext_file__find_span_between_boundariestext_file__find_span_with_boundaries
Edit tools:
text_file__replace_content_by_line_rangetext_file__replace_slicetext_file__replace_texttext_file__replace_span_between_boundariestext_file__replace_span_with_boundariestext_file__patch_spans_by_boundary_patterns
Cengal
Based on Cengal
Projects using Cengal
- InterProcessPyObjects - High-performance package delivers blazing-fast inter-process communication through shared memory, enabling Python objects to be shared across processes with exceptional efficiency.
- cengal_app_dir_path_finder - A Python module offering a unified API for easy retrieval of OS-specific application directories, enhancing data management across Windows, Linux, and macOS
- cengal_cpu_info - Extended, cached CPU info with consistent output format.
- cengal_memory_barriers - Fast cross-platform memory barriers for Python.
- flet_async - wrapper which makes Flet async and brings booth Cengal.coroutines and asyncio to Flet (Flutter based UI)
- justpy_containers - wrapper around JustPy in order to bring more security and more production-needed features to JustPy (VueJS based UI)
- Bensbach - decompiler from Unreal Engine 3 bytecode to a Lisp-like script and compiler back to Unreal Engine 3 bytecode. Made for a game modding purposes
- Realistic-Damage-Model-mod-for-Long-War - Mod for both the original XCOM:EW and the mod Long War. Was made with a Bensbach, which was made with Cengal
- SmartCATaloguer.com - TagDB based catalog of images (tags), music albums (genre tags) and apps (categories)
License
Copyright © 2026 ButenkoMS. All rights reserved.
Licensed under the Apache License, Version 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file text_file_read_and_refactor_mcp-1.12.0.tar.gz.
File metadata
- Download URL: text_file_read_and_refactor_mcp-1.12.0.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f622af3ea87439a489a18473f66328a1ef5bf1224bdea34676812df4b5bcfced
|
|
| MD5 |
43e6cb7a65ceb88ae498ffd366e9f68b
|
|
| BLAKE2b-256 |
fb2a566bd4a1477e8f33bbea9a7f31a2874a6f53e35455f2285b6eeb424c643d
|
File details
Details for the file text_file_read_and_refactor_mcp-1.12.0-py3-none-any.whl.
File metadata
- Download URL: text_file_read_and_refactor_mcp-1.12.0-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
700e3b3459056cda6f10dd1edd0426afc8380110afbdcd9b82af7884080db3c8
|
|
| MD5 |
7404c4c45777d0e3bc230e1ca413cd92
|
|
| BLAKE2b-256 |
cd679f827325b5df98d85717ace81b4f0f606a7cbf763feef891c1b1dd773075
|