
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
delegator-mcp
Advanced tools
AI agent delegation system for Claude Desktop using Model Context Protocol (MCP)
A sophisticated Model Context Protocol (MCP) server that enables Claude and other MCP clients to perform complex task delegation using specialized AI agents and multiple coordination patterns.
The Worksona Delegator MCP transforms complex problem-solving by orchestrating multiple specialized AI agents through sophisticated delegation patterns. Instead of relying on a single AI response, tasks are intelligently decomposed and distributed across teams of specialized agents, each with distinct expertise and roles.
graph TB
subgraph "MCP Client"
C[Claude/Client]
MCP[MCP Protocol]
end
subgraph "Delegator MCP Server"
DS[Core Server]
PM[Pattern Manager]
AM[Agent Manager]
TM[Task Manager]
end
subgraph "Delegation Engine"
DP[Delegation Patterns]
AF[Agent Framework]
WS[Worksona.js]
end
subgraph "LLM Providers"
OAI[OpenAI]
ANT[Anthropic]
GOO[Google]
end
C --> MCP
MCP --> DS
DS --> PM
DS --> AM
DS --> TM
PM --> DP
AM --> AF
TM --> WS
WS --> OAI
WS --> ANT
WS --> GOO
# Clone the repository
git clone https://github.com/your-org/delegator-mcp.git
cd delegator-mcp
# Install dependencies
npm install
# Copy environment template
cp .env.example .env
Edit .env with your API keys and preferences:
# Anthropic API Key (required unless using Claude Desktop integration)
ANTHROPIC_API_KEY=your-anthropic-api-key
# Default Provider Configuration
WORKSONA_DEFAULT_PROVIDER=anthropic
WORKSONA_DEFAULT_MODEL=claude-3-5-sonnet-20241022
# Timeout Configuration
API_CALL_TIMEOUT=60000
DELEGATION_TIMEOUT=300000
PATTERN_TIMEOUT=600000
# Debug Settings
WORKSONA_DEBUG=false
# Development mode
npm run dev
# Production mode
npm start
# Using PM2 (recommended for production)
npm install -g pm2
pm2 start ecosystem.config.js
Add to your Claude Desktop configuration:
{
"mcpServers": {
"delegator": {
"command": "node",
"args": ["/path/to/delegator-mcp/src/index.js"],
"env": {
"ANTHROPIC_API_KEY": "your-anthropic-api-key"
}
}
}
}
// Create a delegation task
const task = await use_mcp_tool('delegator', 'create_delegation_task', {
query: "Analyze the competitive landscape for renewable energy storage",
pattern: "hierarchical",
config: {
maxAgents: 6,
timeLimit: 600,
temperature: 0.4
}
});
// Execute the delegation
const execution = await use_mcp_tool('delegator', 'execute_delegation_pattern', {
taskId: task.taskId
});
// Get results
const results = await use_mcp_tool('delegator', 'get_delegation_results', {
taskId: task.taskId
});
Perfect for structured analysis and research tasks:
const task = await use_mcp_tool('delegator', 'create_delegation_task', {
query: "Create a comprehensive business plan for a sustainable tech startup",
pattern: "hierarchical",
config: {
maxAgents: 8,
roles: ["researcher", "analyst", "strategist", "writer", "critic", "synthesizer"]
}
});
Ideal for comparing multiple solutions or approaches:
const task = await use_mcp_tool('delegator', 'create_delegation_task', {
query: "Design three different user interface approaches for a mobile banking app",
pattern: "competitive",
config: {
competitorCount: 3,
evaluationCriteria: ["usability", "security", "accessibility", "innovation"]
}
});
Best for improving and polishing content through multiple iterations:
const task = await use_mcp_tool('delegator', 'create_delegation_task', {
query: "Write and refine a technical article about quantum computing",
pattern: "iterative",
config: {
maxIterations: 4,
refinementAspects: ["clarity", "accuracy", "engagement", "structure"]
}
});
For programmatic control, you can use structured queries with precise configuration:
// Example: 10-minute timeout with specific configuration
const result = await handleStructuredQuery({
query: "how to identify and memorize prime numbers",
config: {
maxAgents: 4,
timeLimit: 600, // 10 minutes in seconds
focusAreas: [
"identification methods",
"memorization techniques",
"mathematical patterns",
"practical applications"
],
temperature: 0.6
},
pattern: "hierarchical"
});
| Option | Type | Default | Description |
|---|---|---|---|
timeLimit | number | 600 | Timeout in seconds (10 minutes) |
timeout | number | 600000 | Timeout in milliseconds (alternative to timeLimit) |
maxAgents | number | 5 | Maximum number of agents to create |
temperature | number | 0.7 | AI model temperature for creativity control |
focusAreas | array | [] | Specific areas to focus the analysis on |
pattern | string | "hierarchical" | Delegation pattern to use |
delegationTimeout | number | 600000 | Delegation timeout in milliseconds |
The system dynamically handles timeout configuration with the following priority:
timeLimit (in seconds) - converted to millisecondstimeout (in milliseconds) - used directlydelegationTimeout (in milliseconds) - used directly// All equivalent - 10 minute timeout
const configs = [
{ timeLimit: 600 },
{ timeout: 600000 },
{ delegationTimeout: 600000 }
];
| Variable | Default | Description |
|---|---|---|
ANTHROPIC_API_KEY | - | Anthropic API key |
WORKSONA_DEFAULT_PROVIDER | anthropic | Default LLM provider |
WORKSONA_DEFAULT_MODEL | claude-3-5-sonnet-20241022 | Default model |
API_CALL_TIMEOUT | 60000 | API call timeout (ms) |
DELEGATION_TIMEOUT | 600000 | Delegation timeout (ms) |
PATTERN_TIMEOUT | 600000 | Pattern execution timeout (ms) |
MAX_CONCURRENT_TASKS | 10 | Maximum concurrent tasks |
WORKSONA_DEBUG | false | Enable debug logging |
Configure delegation patterns in config/patterns.json:
{
"patterns": {
"hierarchical": {
"enabled": true,
"defaultConfig": {
"maxAgents": 5,
"timeLimit": 300,
"temperature": 0.4
},
"constraints": {
"minAgents": 2,
"maxAgents": 10
}
},
"competitive": {
"enabled": true,
"defaultConfig": {
"competitorCount": 3,
"evaluationRounds": 2
}
}
}
}
Best for: Structured analysis, research projects, content creation
Best for: Collaborative tasks, brainstorming, consensus building
Best for: Content refinement, progressive enhancement, quality improvement
Best for: Optimization problems, creative tasks, solution comparison
Best for: Large-scale projects, multi-domain problems
Best for: Unknown complexity, experimental tasks, learning scenarios
Create custom agent templates in agents/templates/:
{
"id": "custom-agent",
"name": "Custom Specialist",
"description": "Specialized agent for custom tasks",
"traits": {
"personality": ["analytical", "thorough", "precise"],
"knowledge": ["domain expertise", "analytical thinking"],
"tone": "professional and detailed",
"background": "Expert in specialized domain"
},
"config": {
"provider": "anthropic",
"model": "claude-3-5-sonnet-20241022",
"temperature": 0.4,
"maxTokens": 8000,
"systemPrompt": "You are a specialized agent...",
"examples": [
{
"user": "Example input",
"assistant": "Example response"
}
]
}
}
delegator-mcp/
├── src/
│ ├── core/ # Core delegation logic
│ ├── api/ # API endpoints and handlers
│ ├── delegation/ # Delegation patterns and strategies
│ ├── state/ # State management
│ ├── ui/ # User interface components
│ └── utils/ # Utilities and helpers
├── agents/
│ ├── templates/ # Agent template definitions
│ └── patterns/ # Pattern-specific configurations
├── config/ # Configuration files
├── docs/ # Documentation
├── tests/ # Test suites
└── scripts/ # Build and deployment scripts
# Run all tests
npm test
# Run specific test suite
npm run test:patterns
npm run test:agents
npm run test:integration
# Run with coverage
npm run test:coverage
# Start development server with hot reload
npm run dev
# Build for production
npm run build
# Lint and format code
npm run lint
npm run format
# Type checking
npm run type-check
# Generate documentation
npm run docs
# Build image
docker build -t delegator-mcp .
# Run container
docker run -p 3000:3000 \
-e OPENAI_API_KEY=your-key \
-e ANTHROPIC_API_KEY=your-key \
delegator-mcp
version: '3.8'
services:
delegator-mcp:
build: .
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
volumes:
- ./config:/app/config
- ./logs:/app/logs
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
The server provides comprehensive health check endpoints:
# Basic health check
curl http://localhost:3000/health
# Detailed system status
curl http://localhost:3000/status
# Provider status
curl http://localhost:3000/providers/status
# Enable debug logging
DEBUG=delegator:* npm start
# View performance metrics
curl http://localhost:3000/metrics
# Monitor active tasks
curl http://localhost:3000/tasks/active
// Configure rate limits
{
"rateLimits": {
"perMinute": 60,
"perHour": 1000,
"perDay": 10000
}
}
# Increase timeout values
export API_CALL_TIMEOUT=120000
export DELEGATION_TIMEOUT=600000
# Check network connectivity
curl -I https://api.openai.com/v1/models
# Verify API keys
npm run test:providers
# Check agent templates
npm run validate:templates
# Review logs
tail -f logs/delegator.log
# Monitor resource usage
npm run monitor
# Check active tasks
curl http://localhost:3000/tasks/active
# Review configuration
npm run config:validate
Enable comprehensive debugging:
# Environment variable
export DEBUG=delegator:*
# Or in .env file
DEBUG=delegator:*
WORKSONA_DEBUG=true
We welcome contributions! Please see our Contributing Guidelines for details.
# Fork and clone the repository
git clone https://github.com/your-username/delegator-mcp.git
cd delegator-mcp
# Install dependencies
npm install
# Create feature branch
git checkout -b feature/your-feature-name
# Make changes and test
npm test
# Submit pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ by the Worksona team
Empowering intelligent task delegation through sophisticated multi-agent orchestration.
FAQs
AI agent delegation system for Claude Desktop using Model Context Protocol (MCP)
We found that delegator-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.