# Setup Instructions for Loop MCP Server
## 1. Install Dependencies
```bash
cd /Users/shiva/loop_mcp
npm install
```
## 2. Test the Server (Optional)
```bash
node example-client.js
```
## 3. Add to Claude Desktop
Open your Claude Desktop configuration file:
**On macOS:**
```bash
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
```
**On Windows:**
```bash
code %APPDATA%\Claude\claude_desktop_config.json
```
Add this to your `mcpServers` section:
```json
{
"mcpServers": {
"loop-processor": {
"command": "node",
"args": ["/Users/shiva/loop_mcp/server.js"]
}
}
}
```
## 4. Restart Claude Desktop
Quit and restart Claude Desktop for the changes to take effect.
## 5. Using the Server in Claude
Once added, you can use these commands in Claude:
- `initialize_array` - Set up an array and task
- `get_next_item` - Get the next item to process
- `store_result` - Save the result for current item
- `get_all_results` - Get all results (only after completion)
- `reset` - Clear the processing state
Example usage:
"Initialize an array [1,2,3,4,5] with the task 'square each number', then process each item"