T

Text File Read And Refactor Mcp

FI-Mihej
📂 File Systems🟢 Verified Active
0 Views
0 Installs

🐍 🏠 🍎 🪟 🐧 - 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. uvx text-file-read-and-refactor-mcp

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "fi-mihej-text-file-read-and-refactor-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "fi-mihej-text-file-read-and-refactor-mcp"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

GitHub tag (with filter) Static Badge

Static Badge Static Badge

GitHub License Static Badge

text_file_read_and_refactor_mcp MCP server

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.

Glama.AI

text_file_read_and_refactor_mcp MCP server

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:

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

Tools

Slice concept: an analog of the slice(start: integer, stop: integer) - stores the start and end indices of a range.

Boundary concept: an analog of the Boundary(text: string, type: Enum[text, word, dev_word, regex])

Span concept: an analog of the Span(left_boundary: Boundary, right_boundary: Boundary). It allows for search/replace operations such as give me the text between "my_config_param:" and ";" or replace the text between "%my_regex_1%" and "%my_regex_2%" with "my_text".

Read-only tools:

  • 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]) -> characters_slice"
  • 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;".

Edit tools:

  • 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]])".

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.

Related MCP Servers

S
Server Filesystem
Verified

📇 🏠 - Direct local file system access.

📂 File Systems1 views
S
Smart Tree

🦀 🏠 🍎 🪟 🐧 - AI-native directory visualization with semantic analysis, ultra-compressed formats for AI consumption, and 10x token reduction. Supports quantum-semantic mode with intelligent file categorization.

📂 File Systems0 views
C
Changethisfile Mcp

📇 ☁️ - Free file conversion between 690+ formats. Tools: convertfile (URL or base64 in → signed download URL out) and listconversions. Covers image, video, audio, document, data, font, ebook, and archive formats. No auth or signup required; remote streamable-HTTP endpoint available (see README).

📂 File Systems0 views
F
Ftp Deploy Mcp

📇 🏠 🍎 🪟 🐧 - Deploy files from AI agents to your own FTP/FTPS/SFTP servers — multi-server config, recursive deploy with dry-run and gitignore-like excludes, per-server path jail and read-only mode, FileZilla import, one-command setup for popular MCP clients.

📂 File Systems0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Active

Recent health check succeeded.

Last checked: 7/29/2026, 7:30:59 AM

Unclaimed listing (imported or pending owner verification). Claim it →
★ Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.