Metadata-Version: 2.4
Name: text-file-read-and-refactor-mcp
Version: 1.12.0
Summary: Token-efficient Python stdio MCP server for safe text-file search, reading, and refactoring with automatic BOM/codepage handling.
Project-URL: Homepage, https://github.com/FI-Mihej/text_file_read_and_refactor_mcp
Author-email: ButenkoMS <gtalk@butenkoms.space>
License-Expression: Apache-2.0
License-File: LICENSE.md
License-File: NOTICE
Keywords: LLM,MCP,MCP server,MCP-server,cengal,crossplatform,file system,refactoring,text processing
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Environment :: MacOS X
Classifier: Environment :: Web Environment
Classifier: Environment :: Win32 (MS Windows)
Classifier: Environment :: X11 Applications
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Manufacturing
Classifier: Intended Audience :: Other Audience
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Telecommunications Industry
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: Android
Classifier: Operating System :: MacOS
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft
Classifier: Operating System :: Microsoft :: Windows :: Windows 7
Classifier: Operating System :: Microsoft :: Windows :: Windows 8
Classifier: Operating System :: Microsoft :: Windows :: Windows 8.1
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
Classifier: Operating System :: Microsoft :: Windows :: Windows 11
Classifier: Operating System :: Microsoft :: Windows :: Windows Server 2008
Classifier: Operating System :: Microsoft :: Windows :: Windows Vista
Classifier: Operating System :: OS Independent
Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: BSD
Classifier: Operating System :: POSIX :: BSD :: FreeBSD
Classifier: Operating System :: POSIX :: BSD :: NetBSD
Classifier: Operating System :: POSIX :: BSD :: OpenBSD
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: POSIX :: Other
Classifier: Operating System :: Unix
Classifier: Operating System :: iOS
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: Implementation
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: MicroPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Programming Language :: Unix Shell
Classifier: Topic :: Adaptive Technologies
Classifier: Topic :: Communications
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Artificial Life
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: cengal-light[cengal-text-processing-encoding-detection]~=5.0
Description-Content-Type: text/markdown

![GitHub tag (with filter)](https://img.shields.io/github/v/tag/FI-Mihej/text_file_read_and_refactor_mcp) ![Static Badge](https://img.shields.io/badge/OS-Linux_%7C_Windows_%7C_macOS-blue)

![PyPI - Version](https://img.shields.io/pypi/v/text_file_read_and_refactor_mcp) ![PyPI - Format](https://img.shields.io/pypi/format/text_file_read_and_refactor_mcp?color=darkgreen) ![Static Badge](https://img.shields.io/badge/wheels-Linux_%7C_Windows_%7C_macOS-blue) ![Static Badge](https://img.shields.io/badge/Architecture-x86__64_%7C_ARM__64-blue) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/text_file_read_and_refactor_mcp) ![Static Badge](https://img.shields.io/badge/PyPy-3.11-blue) ![PyPI - Implementation](https://img.shields.io/pypi/implementation/text_file_read_and_refactor_mcp) 

![GitHub License](https://img.shields.io/github/license/FI-Mihej/text_file_read_and_refactor_mcp?color=darkgreen) ![Static Badge](https://img.shields.io/badge/API_status-Stable-darkgreen)

# 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

1. Install `uv`:
   https://docs.astral.sh/uv/getting-started/installation/

2. Configure your MCP client to run the server via `uvx`:

```json
{
  "mcpServers": {
    "text-file-read-and-refactor": {
      "command": "uvx",
      "args": [
        "text-file-read-and-refactor-mcp"
      ]
    }
  }
}
```

## Tools

Read-only tools:

- `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`

Edit tools:

- `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

Based on [Cengal](https://github.com/FI-Mihej/Cengal)

## Projects using Cengal

* [InterProcessPyObjects](https://github.com/FI-Mihej/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](https://github.com/FI-Mihej/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](https://github.com/FI-Mihej/cengal_cpu_info) - Extended, cached CPU info with consistent output format.
* [cengal_memory_barriers](https://github.com/FI-Mihej/cengal_memory_barriers) - Fast cross-platform memory barriers for Python.
* [flet_async](https://github.com/FI-Mihej/flet_async) - wrapper which makes [Flet](https://github.com/flet-dev/flet) async and brings booth Cengal.coroutines and asyncio to Flet (Flutter based UI)
* [justpy_containers](https://github.com/FI-Mihej/justpy_containers) - wrapper around [JustPy](https://github.com/justpy-org/justpy) in order to bring more security and more production-needed features to JustPy (VueJS based UI)
* [Bensbach](https://github.com/FI-Mihej/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](https://github.com/FI-Mihej/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](http://www.smartcataloguer.com/index.html) - 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.
