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, optionalsha256)rr.read_bytes- read byte windows withoffset,max_bytes,next_offset,eofrr.read_lines- read line-numbered slices for code/log analysisrr.read_tail- read only the latest lines from append-only filesrr.search_then_page- search with contextual excerpts andnext_from_linerr.make_cursor- mint resumable cursor tokenrr.read_next- read next chunk from cursor (fails if file changed)
Install
uv sync
PyPI release (0.1.0): https://pypi.org/project/resilient-read/0.1.0/
Install from PyPI:
pip install resilient-read
Run with stdio (default):
uv run resilient-read
Run with SSE:
uv run resilient-read --transport sse --host 127.0.0.1 --port 8000
Run with Streamable HTTP:
uv run resilient-read --transport http --host 127.0.0.1 --port 8000
MCP config (stdio)
{
"mcpServers": {
"resilient-read": {
"command": "uvx",
"args": ["resilient-read"],
"env": {
"RR_WORKSPACE": "/path/to/your/project"
}
}
}
}
MCP config (SSE)
{
"mcpServers": {
"resilient-read": {
"type": "sse",
"url": "http://127.0.0.1:8000/sse"
}
}
}
MCP config (HTTP)
{
"mcpServers": {
"resilient-read": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp"
}
}
}
Example workflows
Cursor-based file pagination
- Call
rr.stat(path="large.log") - Call
rr.make_cursor(path="large.log", offset=0, max_bytes=65536) - Loop on
rr.read_next(cursor=...)untileof=true
Targeted search pagination
- Call
rr.search_then_page(path="server.log", query="timeout", max_matches=3) - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file resilient_read-0.1.1.tar.gz.
File metadata
- Download URL: resilient_read-0.1.1.tar.gz
- Upload date:
- Size: 45.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3ccbea3b3812cc3e73ae19130126ad58fd847aa5f8c21bf23a81d46151062f4
|
|
| MD5 |
f75da2125035c38fa62d7e767d9ba788
|
|
| BLAKE2b-256 |
d83e90d277728cb480da21c59ad4620c7a2687f167e45ef28a7714b865304b73
|
File details
Details for the file resilient_read-0.1.1-py3-none-any.whl.
File metadata
- Download URL: resilient_read-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
affa421defc41d0e8b5c61f409d2a500949e5225e1eedf0a8ae0dd0b5d73342f
|
|
| MD5 |
3d67fb3e2502304d31b1c32bcae89344
|
|
| BLAKE2b-256 |
1fdf4403641de99fedd3854634fd9f0ab6759a89f1f365566a7a2ce945b1d0b7
|