Text MCP Server

Token-efficient Python stdio MCP server for safe text-file search, reading, and refactoring with automatic BOM/codepage handling.

Local serverstdioPython

What is the Text MCP Server?

Token-efficient Python stdio MCP server for safe text-file search, reading, and refactoring with automatic BOM/codepage handling.

What the server does

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.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
text_file__list_allowed_directoriesin pseudocode: "text_file__list_allowed_directories() -> List[directory_path]"
text_file__file_content_lengthin pseudocode: "text_file__file_content_length() -> integer_characters_num"
text_file__read_slicein pseudocode: "text_file__read_slice(characters_slice) -> text"
text_file__file_lines_numin pseudocode: "text_file__file_lines_num() -> integer_lines_num"
text_file__read_content_by_line_rangein pseudocode: "text_file__read_content_by_line_range(lines_slice) -> text"
text_file__find_textin pseudocode: "text_file__find_text(text, type: Enum[text, word, dev_word, regex]) -> {found, result?: {slice, lines, text}}"
text_file__find_all_text_occurrencesin pseudocode: "text_file__find_all_text_occurrences(text, type: Enum[text, word, dev_word, regex], result_index_start, result_index_stop) -> List[{found, resul
text_file__expand_slice_to_linesin pseudocode: "text_file__expand_slice_to_lines(characters_slice) -> lines_slice"
text_file__find_span_boundariesin pseudocode: "text_file__find_span_boundaries(left_boundary, right_boundary) -> Tuple[left_boundary_characters_slice, right_boundary_characters_slice]"
text_file__find_span_between_boundariesin pseudocode: "text_file__find_span_between_boundaries(left_boundary, right_boundary) -> text". Example: text_file__find_span_between_boundaries("my_config_par
text_file__find_span_with_boundariesin pseudocode: "text_file__find_span_with_boundaries(left_boundary, right_boundary) -> text". Example: text_file__find_span_with_boundaries("my_config_param:",
text_file__replace_content_by_line_rangein pseudocode: "text_file__replace_content_by_line_range(text, lines_slice)"
text_file__replace_slicein pseudocode: "text_file__replace_slice(text, characters_slice)"
text_file__replace_textin pseudocode: "text_file__replace_slice(old_text, new_text)"
text_file__replace_span_between_boundariesin pseudocode: "text_file__replace_span_between_boundaries(text, left_boundary, right_boundary)".
text_file__replace_span_with_boundariesin pseudocode: "text_file__replace_span_with_boundaries(text, left_boundary, right_boundary)".
text_file__patch_spans_by_boundary_patternsin pseudocode: "text_file__patch_spans_by_boundary_patterns(List[Tuple[text, left_boundary, right_boundary]])".

How to install the Text MCP Server

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

From the project documentation. Replace placeholders and example paths before connecting.

Example prompts to try

  • “Use Text to text file list allowed directories.”
  • “Use Text to text file file content length.”
  • “Use Text to text file read slice.”

Frequently asked questions

Token-efficient Python stdio MCP server for safe text-file search, reading, and refactoring with automatic BOM/codepage handling. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.