From claudeclaw
Integrates Parallel AI MCP servers into ClaudeClaw for quick web searches using Search API and deep research with Task API. Useful for non-blocking web research in AI agents.
npx claudepluginhub sbusso/claudeclawThis skill uses the workspace's default tool permissions.
Adds Parallel AI MCP integration to ClaudeClaw for advanced web research capabilities.
Conducts multi-round deep research on GitHub repos via API and web searches, generating markdown reports with executive summaries, timelines, metrics, and Mermaid diagrams.
Dynamically discovers and combines enabled skills into cohesive, unexpected delightful experiences like interactive HTML or themed artifacts. Activates on 'surprise me', inspiration, or boredom cues.
Generates images from structured JSON prompts via Python script execution. Supports reference images and aspect ratios for characters, scenes, products, visuals.
Adds Parallel AI MCP integration to ClaudeClaw for advanced web research capabilities.
User must have:
Run all steps automatically. Only pause for user input when explicitly needed.
Use AskUserQuestion: Do you have a Parallel AI API key, or should I help you get one?
If they have one: Collect it now.
If they need one: Tell them:
- Go to https://platform.parallel.ai
- Sign up or log in
- Navigate to API Keys section
- Create a new API key
- Copy the key and paste it here
Wait for the API key.
Add PARALLEL_API_KEY to .env:
# Check if .env exists, create if not
if [ ! -f .env ]; then
touch .env
fi
# Add PARALLEL_API_KEY if not already present
if ! grep -q "PARALLEL_API_KEY=" .env; then
echo "PARALLEL_API_KEY=${API_KEY_FROM_USER}" >> .env
echo "✓ Added PARALLEL_API_KEY to .env"
else
# Update existing key
sed -i.bak "s/^PARALLEL_API_KEY=.*/PARALLEL_API_KEY=${API_KEY_FROM_USER}/" .env
echo "✓ Updated PARALLEL_API_KEY in .env"
fi
Verify:
grep "PARALLEL_API_KEY" .env | head -c 50
Add PARALLEL_API_KEY to allowed environment variables in src/orchestrator/container-runner.ts:
Find the line:
const allowedVars = ['CLAUDE_CODE_OAUTH_TOKEN', 'ANTHROPIC_API_KEY'];
Replace with:
const allowedVars = ['CLAUDE_CODE_OAUTH_TOKEN', 'ANTHROPIC_API_KEY', 'PARALLEL_API_KEY'];
Update agent/runner/src/index.ts:
Find the section where mcpServers is configured (around line 237-252):
const mcpServers: Record<string, any> = {
claudeclaw: ipcMcp
};
Add Parallel AI MCP servers after the claudeclaw server:
const mcpServers: Record<string, any> = {
claudeclaw: ipcMcp
};
// Add Parallel AI MCP servers if API key is available
const parallelApiKey = process.env.PARALLEL_API_KEY;
if (parallelApiKey) {
mcpServers['parallel-search'] = {
type: 'http', // REQUIRED: Must specify type for HTTP MCP servers
url: 'https://search-mcp.parallel.ai/mcp',
headers: {
'Authorization': `Bearer ${parallelApiKey}`
}
};
mcpServers['parallel-task'] = {
type: 'http', // REQUIRED: Must specify type for HTTP MCP servers
url: 'https://task-mcp.parallel.ai/mcp',
headers: {
'Authorization': `Bearer ${parallelApiKey}`
}
};
log('Parallel AI MCP servers configured');
} else {
log('PARALLEL_API_KEY not set, skipping Parallel AI integration');
}
Also update the allowedTools array to include Parallel MCP tools (around line 242-248):
allowedTools: [
'Bash',
'Read', 'Write', 'Edit', 'Glob', 'Grep',
'WebSearch', 'WebFetch',
'mcp__claudeclaw__*',
'mcp__parallel-search__*',
'mcp__parallel-task__*'
],
Add Parallel AI usage instructions to groups/main/CLAUDE.md:
Find the "## What You Can Do" section and add after the existing bullet points:
- Use Parallel AI for web research and deep learning tasks
Then add a new section after "## What You Can Do":
## Web Research Tools
You have access to two Parallel AI research tools:
### Quick Web Search (`mcp__parallel-search__search`)
**When to use:** Freely use for factual lookups, current events, definitions, recent information, or verifying facts.
**Examples:**
- "Who invented the transistor?"
- "What's the latest news about quantum computing?"
- "When was the UN founded?"
- "What are the top programming languages in 2026?"
**Speed:** Fast (2-5 seconds)
**Cost:** Low
**Permission:** Not needed - use whenever it helps answer the question
### Deep Research (`mcp__parallel-task__create_task_run`)
**When to use:** Comprehensive analysis, learning about complex topics, comparing concepts, historical overviews, or structured research.
**Examples:**
- "Explain the development of quantum mechanics from 1900-1930"
- "Compare the literary styles of Hemingway and Faulkner"
- "Research the evolution of jazz from bebop to fusion"
- "Analyze the causes of the French Revolution"
**Speed:** Slower (1-20 minutes depending on depth)
**Cost:** Higher (varies by processor tier)
**Permission:** ALWAYS use `AskUserQuestion` before using this tool
**How to ask permission:**
AskUserQuestion: I can do deep research on [topic] using Parallel's Task API. This will take 2-5 minutes and provide comprehensive analysis with citations. Should I proceed?
**After permission - DO NOT BLOCK! Use scheduler instead:**
1. Create the task using `mcp__parallel-task__create_task_run`
2. Get the `run_id` from the response
3. Create a polling scheduled task using `mcp__claudeclaw__schedule_task`:
Prompt: "Check Parallel AI task run [run_id] and send results when ready.
If status is still 'running' or 'pending', do nothing (task will run again in 30s). If status is 'failed', send error message and complete the task."
Schedule: interval every 30 seconds Context mode: isolated
4. Send acknowledgment with tracking link
5. Exit immediately - scheduler handles the rest
### Choosing Between Them
**Use Search when:**
- Question needs a quick fact or recent information
- Simple definition or clarification
- Verifying specific details
- Current events or news
**Use Deep Research (with permission) when:**
- User wants to learn about a complex topic
- Question requires analysis or comparison
- Historical context or evolution of concepts
- Structured, comprehensive understanding needed
- User explicitly asks to "research" or "explain in depth"
**Default behavior:** Prefer search for most questions. Only suggest deep research when the topic genuinely requires comprehensive analysis.
Build the container with updated agent runner:
./src/runtimes/docker/build.sh
Verify the build:
echo '{}' | docker run -i --entrypoint /bin/echo claudeclaw-agent:latest "Container OK"
Service name: Derived from the directory name:
com.claudeclaw.<dirname>(macOS) /claudeclaw-<dirname>(Linux). For example, if cwd ismy-assistant, the service iscom.claudeclaw.my-assistant. Determine the correct service name before running service commands below.
Rebuild the main app and restart:
npm run build
launchctl kickstart -k gui/$(id -u)/com.claudeclaw # macOS
# Linux: systemctl --user restart claudeclaw
Wait 3 seconds for service to start, then verify:
sleep 3
launchctl list | grep claudeclaw # macOS
# Linux: systemctl --user status claudeclaw
Tell the user to test:
Send a message to your assistant:
@[YourAssistantName] what's the latest news about AI?The assistant should use Parallel Search API to find current information.
Then try:
@[YourAssistantName] can you research the history of artificial intelligence?The assistant should ask for permission before using the Task API.
Check logs to verify MCP servers loaded:
tail -20 logs/claudeclaw.log
Look for: Parallel AI MCP servers configured
Container hangs or times out:
type: 'http' is specified in MCP server configcat groups/main/logs/container-*.log | tail -50MCP servers not loading:
Task polling not working:
sqlite3 store/messages.db "SELECT * FROM scheduled_tasks"tail -f logs/claudeclaw.log | grep "scheduled task"To remove Parallel AI integration:
sed -i.bak '/PARALLEL_API_KEY/d' .env./src/runtimes/docker/build.sh && npm run buildlaunchctl kickstart -k gui/$(id -u)/com.claudeclaw (macOS) or systemctl --user restart claudeclaw (Linux)