SwarmTask

by rdhillbb

Not rated
GitHub

About

An asynchronous task manager for parallel execution of shell commands with real-time progress monitoring.

Details

Author
rdhillbb
Categories
Developer Tools

Setup

Install SwarmTask in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/rdhillbb/swarmtask

Follow the installation instructions in the repository README, then restart your MCP client.

A powerful MCP (Model Context Protocol) server that enablesparallel execution of shell commandsthrough AI assistants like Claude Code. SwarmTask allows you to submit multiple tasks (system commands, scripts, builds, tests) that run simultaneously in Go goroutines, giving you real-time progress monitoring and results.

- πŸ”§System Administration: Run multiple diagnostic commands in parallel
- πŸ—οΈDevelopment Workflows: Execute builds, tests, and deployments simultaneously
- πŸ“ŠData Processing: Process multiple files or datasets concurrently
- 🌐Network Operations: Parallel connectivity tests and monitoring
- πŸ”Monitoring & Auditing: Simultaneous system health checks

⚠️ Security Note:Script injection protection and security ring-fencing are not implemented in this release. SwarmTask executes commands with the same privileges as the running process. Planned for next release.

- πŸš€Async Task Execution- Submit tasks and get immediate batch ID
- ⚑Goroutine-based Processing- Parallel task execution with channels
- πŸ“ŠReal-time Status Tracking- Poll for progress and results
- πŸ”—MCP Protocol Compliant- Integrates with Claude Code via supergateway
- πŸ“ˆProgress Notifications- Streaming updates during execution
- Configure Claude Code- Add to~/.claude/mcp_servers.json:

{ "mcpServers": { "swarmtask": { "command": "npx", "args": [ "-y", "supergateway", "--streamableHttp", "http://localhost:3500/mcp" ], "env": {} } } }

- Restart Claude Codeto load the MCP server

Submit multiple tasks for parallel asynchronous execution.

Input Format:JSON string mapping task names to shell commands

{ "tasks": "{\"list_home\":\"ls ~\",\"ping_test\":\"ping -c 4 google.com\",\"disk_usage\":\"df -h\"}" }
{ "tasks": { "list_home": "ls ~", "ping_test": "ping -c 4 google.com", "disk_usage": "df -h", "system_info": "uname -a" } }

- Task names become part of the task ID:{batch_id}-{task_name}
- Commands are executed as shell commands (sh -c "command")
- All tasks run in parallel goroutines
- Maximum 50 tasks per batch
- Returns immediately withbatch_idfor tracking

πŸš€ SwarmTask Batch Submitted Successfully! πŸ†” Batch ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890 πŸ“‹ Task Count: 4 parallel goroutines 🏷️ Task Names: list_home, ping_test, disk_usage, system_info πŸ“Š Status: submitted (starting execution) ⏱️ Started: 14:30:22

Monitor progress and get results of submitted tasks.

{ "batch_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }
{ "batch_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "task_id": "a1b2c3d4-list_home" }
πŸ“Š Batch Status Report πŸ†” Batch ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890 πŸ“ˆ Overall Progress: 75.0% πŸ”„ Status: running πŸ“‹ Task Details: βœ… list_home: Command: ls ~ Results: Desktop Documents Downloads... πŸ”„ ping_test: Command: ping -c 4 google.com Results: running βœ… disk_usage: Command: df -h Results: Filesystem Size Used Avail... ❌ system_info: Command: uname -a Results: Error: command timeout

- ⏳pending- Task queued, not started
- πŸ”„running- Task currently executing
- βœ…completed- Task finished successfully
- ❌error- Task failed (shows error message)

- HTTP transport on configurable port (default 3500)
- Handlessubmit_tasksandcheck_statusMCP tools
- Input validation and error handling
- Returns immediate responses with batch IDs

Task Manager(internal/core/manager.go)

- Master Worker: Coordinates batch execution
- Sub Workers: Execute individual tasks in goroutines
- Global State: Thread-safe task storage with mutexes
- Channel Communication: Results flow back via channels

- Asynchronous file logging with rotation (5MB)
- HTTP request/response logging
- Task execution tracking with timing
- Environment configurable (STLOGDIR)
- Submit: Client sends JSON tasks β†’ Batch created β†’ Goroutines started
- Execute: Tasks run in parallel β†’ Results stored in global maps
- Monitor: Status checks return real-time progress β†’ Non-blocking lookups
- Complete: All tasks finish β†’ Final results available

- Parallel Execution: Multiple tasks run simultaneously in goroutines
- Non-blocking: Immediate response with batch tracking
- Thread-safe: Global maps protected with RWMutex
- Real-time Status: Progress tracking with completion percentage
- Error Resilience: Individual task failures don't affect others

Submit tasks: {"sys_info":"uname -a", "disk_space":"df -h", "memory":"free -h", "processes":"ps aux | head -10"}
Check status with batch_id: a1b2c3d4-e5f6-7890
πŸ“Š Progress: 100% | βœ…βœ…βœ…βœ… All tasks completed
Submit tasks: {"backup":"tar -czf backup.tar.gz ~/Documents", "network_test":"ping -c 100 google.com", "file_scan":"find /var/log -name '*.log' -size +1M"}
Submit tasks: {"git_status":"git status", "run_tests":"npm test", "build":"npm run build", "lint":"npm run lint"}

Tasks execute in parallel goroutines while you receive real-time status updates!

- πŸš€ Non-blocking: Get immediate response with batch ID
- ⚑ Parallel Execution: Multiple tasks run simultaneously in goroutines
- πŸ”„ Real-time Monitoring: Live progress tracking with completion percentage
- πŸ›‘οΈ Error Resilience: Individual task failures don't affect others
- πŸ“Š Comprehensive Logging: Full request/response and execution logging
- πŸŽ›οΈ Configurable: Custom ports and log directories
- πŸ”— MCP Integration: Native Claude Code and Desktop support
- ⏱️ Performance: In-memory storage with O(1) task lookups
- 🧡 Thread-safe: Concurrent access with proper mutex protection
- πŸ“ˆ Scalable: Handle up to 50 parallel tasks per batch

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Create crafted UI components inspired by the best 21st.dev design engineers.

Bring agent evaluations, observability, and synthetic test set generation directly into your IDE for free with Galileo's new MCP server

An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .

MCP server for AI Diagram Maker β€” generate beautiful software engineering diagrams directly inside Cursor, Claude Desktop, Claude Code, or any MCP-compatible AI agent

ALAPI MCP Tools,Call hundreds of API interfaces via MCP

AI-powered SVG animation generator that transforms static files into animated SVG components using the Allyson platform

MCP server that gives AI assistants on-demand access to 1,500+ amCharts docs, ~300 code examples, and 1000+ class API references.

APIMatic MCP Server is used to validate OpenAPI specifications using APIMatic. The server processes OpenAPI files and returns validation summaries by leveraging APIMatic’s API.

One shared context layer for AI agents and humans β€” live API specs, DB schemas, and versioned contracts across repos so every agent and teammate works from the same source of truth.

Build and deploy full-stack Next.js apps with 98 tools for React, AWS, and MongoDB

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.