An MCP server to handle chunking and reading large responses
Before:
After:
git clone https://github.com/ebwinters/chunky-mcp.git
cd chunky-mcp
pip install -e .
Import the helper in your tool:
from chunky_mcp_utils import handle_large_response
@mcp.tool()
def my_tool() -> list[types.TextContent]:
"""
Gets a list of all the employees in the system from the database
"""
# Call might give a large JSON response
response = requests.get("https://someblob.com")
response_data = response.json()
# Chunker handles the large response and calls following read chunk tools
return handle_large_response(
response_data,
my_tool.__name__,
_chunker
)
Add MCP entry
"chunky": {
"type": "stdio",
"command": "chunky-mcp",
"args": []
}
- Install
uv
uv venv
.\.venv\Scripts\activate
uv sync