Skip to main content

MCP server for resilient chunked reads of large files

Project description

resilient-read

MCP server that lets coding agents read very large files safely in small, resumable chunks.

Why this exists

When context windows are small, naive full-file reads are brittle and expensive. resilient-read provides deterministic pagination with cursor-based continuation and drift detection.

Tools

  • rr.stat - get file metadata (size, mtime_ns, optional sha256)
  • rr.read_bytes - read byte windows with offset, max_bytes, next_offset, eof
  • rr.read_lines - read line-numbered slices for code/log analysis
  • rr.read_tail - read only the latest lines from append-only files
  • rr.search_then_page - search with contextual excerpts and next_from_line
  • rr.make_cursor - mint resumable cursor token
  • rr.read_next - read next chunk from cursor (fails if file changed)

Install

uv sync

Run with stdio (default):

uv run resilient-read

MCP config (stdio)

{
  "mcpServers": {
    "resilient-read": {
      "command": "uvx",
      "args": ["resilient-read"],
      "env": {
        "RR_WORKSPACE": "/path/to/your/project"
      }
    }
  }
}

Example workflows

Cursor-based file pagination

  1. Call rr.stat(path="large.log")
  2. Call rr.make_cursor(path="large.log", offset=0, max_bytes=65536)
  3. Loop on rr.read_next(cursor=...) until eof=true

Targeted search pagination

  1. Call rr.search_then_page(path="server.log", query="timeout", max_matches=3)
  2. Follow with rr.search_then_page(..., from_line=<next_from_line>)

Each response is small and composable, so you can process huge files while staying inside small model contexts.

Project housekeeping

  • Release notes and version history: CHANGELOG.md
  • Manual semver tagging flow: docs/RELEASE.md
  • JSON-RPC examples: examples/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resilient_read-0.1.0.tar.gz (44.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

resilient_read-0.1.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file resilient_read-0.1.0.tar.gz.

File metadata

  • Download URL: resilient_read-0.1.0.tar.gz
  • Upload date:
  • Size: 44.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for resilient_read-0.1.0.tar.gz
Algorithm Hash digest
SHA256 12d983129c9e02cbb694dba4f05653d8282bb8759b95af4f969be3cd508e0bbe
MD5 0aa12159bf803c9d852bb5cf43e2cfc9
BLAKE2b-256 3f04b87814898748867f99ff9730ec29f0e7a0c8afb4fed9ae1ce213949b8bfc

See more details on using hashes here.

File details

Details for the file resilient_read-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: resilient_read-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for resilient_read-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f99fe693795cfe43a34d7c29178071621f9d526652167bc236ca243749dda2d
MD5 b69126fe83c8f39ba509d7225c54c26c
BLAKE2b-256 28c53b5b4a15d485cd114a60cb898de02d319ca7f33d6e4287f05e2504667003

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page