text_file_read_and_refactor_mcp
About
About 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.
Details
- Author
- fi-mihej
- Categories
- File Management, Search, Knowledge Base
Jump to
Setup
Install text_file_read_and_refactor_mcp in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/fi-mihej/text_file_read_and_refactor_mcp
Follow the installation instructions in the repository README, then restart your MCP client.
About 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.
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 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.
-
Installuv:https://docs.astral.sh/uv/getting-started/installation/
Configure your MCP client to run the server viauvx:
{ "mcpServers": { "text-file-read-and-refactor": { "command": "uvx", "args": [ "text-file-read-and-refactor-mcp" ] } } }
Sliceconcept: an analog of theslice(start: integer, stop: integer)- stores the start and end indices of a range.
Boundaryconcept: an analog of theBoundary(text: string, type: Enum[text, word, dev_word, regex])
Spanconcept: an analog of theSpan(left_boundary: Boundary, right_boundary: Boundary). It allows for search/replace operations such asgive me the text between "my_config_param:" and ";"orreplace the text between "%my_regex_1%" and "%my_regex_2%" with "my_text".
- text_file__list_allowed_directories- in pseudocode: "text_file__list_allowed_directories() -> List[directory_path]"
- text_file__file_content_length- in pseudocode: "text_file__file_content_length() -> integer_characters_num"
- text_file__read_slice- in pseudocode: "text_file__read_slice(characters_slice) -> text"
- text_file__file_lines_num- in pseudocode: "text_file__file_lines_num() -> integer_lines_num"
- text_file__read_content_by_line_range- in pseudocode: "text_file__read_content_by_line_range(lines_slice) -> text"
- text_file__find_text- in pseudocode: "text_file__find_text(text, type: Enum[text, word, dev_word, regex]) -> {found, result?: {slice, lines, text}}"
- text_file__find_all_text_occurrences- in pseudocode: "text_file__find_all_text_occurrences(text, type: Enum[text, word, dev_word, regex], result_index_start, result_index_stop) -> List[{found, result: {slice, lines, text}}]"
- text_file__expand_slice_to_lines- in pseudocode: "text_file__expand_slice_to_lines(characters_slice) -> lines_slice"
- text_file__find_span_boundaries- in pseudocode: "text_file__find_span_boundaries(left_boundary, right_boundary) -> Tuple[left_boundary_characters_slice, right_boundary_characters_slice]"
- text_file__find_span_between_boundaries- in pseudocode: "text_file__find_span_between_boundaries(left_boundary, right_boundary) -> text". Example:text_file__find_span_between_boundaries("my_config_param:", ";")will return string " my_value".
- text_file__find_span_with_boundaries- in pseudocode: "text_file__find_span_with_boundaries(left_boundary, right_boundary) -> text". Example:text_file__find_span_with_boundaries("my_config_param:", ";")will return string "my_config_param: my_value;".
- text_file__replace_content_by_line_range- in pseudocode: "text_file__replace_content_by_line_range(text, lines_slice)"
- text_file__replace_slice- in pseudocode: "text_file__replace_slice(text, characters_slice)"
- text_file__replace_text- in pseudocode: "text_file__replace_slice(old_text, new_text)"
- text_file__replace_span_between_boundaries- in pseudocode: "text_file__replace_span_between_boundaries(text, left_boundary, right_boundary)".
- text_file__replace_span_with_boundaries- in pseudocode: "text_file__replace_span_with_boundaries(text, left_boundary, right_boundary)".
- text_file__patch_spans_by_boundary_patterns- in pseudocode: "text_file__patch_spans_by_boundary_patterns(List[Tuple[text, left_boundary, right_boundary]])".
- 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 makesFletasync and brings booth Cengal.coroutines and asyncio to Flet (Flutter based UI)
- justpy_containers- wrapper aroundJustPyin 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)
Copyright © 2026 ButenkoMS. All rights reserved.
Licensed under the Apache License, Version 2.0.
Fsext-MCP-Server(Typescript): A full-featured secure MCP server for local file system operations, with built-in image processing, OCR and media tools. Fully compliant with the official MCP specification, delivering standardized request/response schemas, large-file streaming I/O, multi-transport remote deployment, and robust text search & replace workflows for LLM agent integration.
x402-paid Upload and Flight Search tools for AI agents.
Filesystem-direct MCP server for Obsidian vaults. Reads vault files directly from disk - no Obsidian app or plugins required. 575x smaller payloads than REST-based alternatives.
Local-first MCP server that indexes folders, PDFs, code, and past AI conversations — and exposes them as a single grounded-search tool. Runs fully offline.
An AI-powered MCP server for advanced file system operations, including search, comparison, and security analysis.
Fast local full-text search for Windows files — names, contents, and OCR'd screenshot text; read-only MCP tools.
The fastest and the most accurate file search toolkit for AI agents
Search for files in the local filesystem using a path fragment.
Extract text content from local PDF, DOCX, and PPTX files to build a knowledge base.
Provides an MCP interface for the LDIMS document management system.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


