Loop MCP Server
An MCP (Model Context Protocol) server that enables LLMs to process arrays item by item with a specific task.
Overview
This MCP server provides tools for:
Initializing an array with a task description
Fetching items one by one or in batches for processing
Storing results for each processed item or batch
Retrieving all results (only after all items are processed)
Optional result summarization
Configurable batch size for efficient processing
Installation
Usage
Running the Server
Available Tools
initialize_array - Set up the array and task
array: The array of items to processtask: Description of what to do with each itembatchSize(optional): Number of items to process in each batch (default: 1)
get_next_item - Get the next item to process
Returns: Current item, index, task, and remaining count
get_next_batch - Get the next batch of items based on batch size
Returns: Array of items, indices, task, and remaining count
store_result - Store the result of processing
result: The processing result (single value or array for batch processing)
get_all_results - Get all results after completion
summarize(optional): Include a summaryNote: This will error if processing is not complete
reset - Clear the current processing state
Example Workflows
Single Item Processing
Batch Processing
Running the Example
Integration with Claude Desktop
Add to your Claude Desktop configuration: