Token-efficient Python stdio MCP server for safe text-file search, reading, and refactoring with automatic BOM/codepage handling.
If you already use Text, the text mcp server is the piece that lets your assistant work with it directly. Token-efficient Python stdio MCP server for safe text-file search, reading, and refactoring with automatic BOM/codepage handling.
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.
The toolset is worth reading before you wire it up, because it tells you what the integration is really for:
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_slicetext_file__find_span_between_boundaries — in pseudocode: "text_file__find_span_between_boundaries(left_boundary, right_boundary) -> text". Exampletext_file__find_span_with_boundaries — in pseudocode: "text_file__find_span_with_boundaries(left_boundary, right_boundary) -> text". Exampletext_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)"Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.
Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Text's toolset — text_file__list_allowed_directories, text_file__file_content_length, text_file__read_slice and 11 more — is a fair guide to whether it matches your workflow.
We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.
| Tool | What it does |
|---|---|
| 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;". |
| 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)". |
{
"mcpServers": {
"text-file-read-and-refactor": {
"command": "uvx",
"args": [
"text-file-read-and-refactor-mcp"
]
}
}
}Configuration as documented by the project. Restart the client after saving.
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.