This guide demonstrates practical workflows and examples for using Anysite MCP tools with Claude Code. These examples show how to leverage the CLI-based integration for development, automation, and team collaboration.
Extract information from this LinkedIn profile:https://linkedin.com/in/satyanadellaFocus on:- Current role and company- Career progression- Education background
Claude will use the linkedin_user MCP tool to fetch and analyze the data.
# Add with local scope (default)claude mcp add --transport http anysite "https://mcp.anysite.io/mcp?api_key=TEMP_KEY"# Use for this sessionclaude# Remove when doneclaude mcp remove anysite
Use case: Testing with a trial API key or working on a temporary proof-of-concept.
# Create research projectmkdir competitor-researchcd competitor-research# Add Anysite with project scopeclaude mcp add --scope project anysite "YOUR_URL"
Usage in Claude Code:
I'm researching competitors in the CRM space. For each company, get:1. LinkedIn company pages: - https://linkedin.com/company/salesforce - https://linkedin.com/company/hubspot - https://linkedin.com/company/zoho2. Extract: - Company size - Growth trends - Recent updates - Key executives3. Create a comparison table
Automated with script:
#!/bin/bash# research.shcompanies=( "salesforce" "hubspot" "zoho")for company in "${companies[@]}"; do echo "Researching $company..." >> research.log claude <<EOFExtract company information from https://linkedin.com/company/$companySave key metrics to ${company}_data.jsonEOFdone
# Anysite for social dataclaude mcp add --scope user anysite "ANYSITE_URL"# Monitor Redditclaude <<EOFTrack mentions of "our-product" in these subreddits:- r/technology- r/startups- r/SaaSCheck every 6 hours and summarize sentimentEOF
Automated monitoring:
#!/bin/bash# monitor.sh - Run via cronclaude <<EOFMonitor these Reddit posts for new comments:$(cat monitored_posts.txt)If sentiment changes significantly, send summary to monitor@company.comEOF
# Work on marketing projectcd ~/projects/marketing-researchclaude # Uses marketing-research/.mcp.json + user scope# Switch to sales projectcd ~/projects/sales-intelclaude # Uses sales-intel/.mcp.json + user scope# Personal workcd ~/documentsclaude # Uses only user scope
#!/bin/bash# conditional_analysis.shcompany_url="https://linkedin.com/company/target-company"# Extract data and analyzeresult=$(claude <<EOFAnalyze this company: $company_urlDetermine if they are:1. Growing rapidly (>20% employee growth)2. In tech industry3. Located in USOutput only: YES or NOEOF)if [ "$result" = "YES" ]; then echo "Company matches criteria. Generating detailed report..." claude <<EOFCreate comprehensive company report for: $company_urlInclude competitive analysis and market positioning.Save to: reports/$(date +%Y%m%d)_target_company.mdEOF # Notify team echo "Report ready" | mail -s "New Target Company Report" team@company.comelse echo "Company does not match criteria. Skipping detailed analysis."fi
#!/bin/bash# check_mcp_status.shecho "=== MCP Server Status ==="echo# List all serversecho "Configured servers:"claude mcp listechoecho "Testing connection to anysite:"claude mcp get anysite# Log to file{ echo "Status check at: $(date)" claude mcp list echo "---"} >> mcp_status.log
Run periodically:
# Add to crontab0 */4 * * * /path/to/check_mcp_status.sh
# Add delays between requestsfor url in "${urls[@]}"; do claude <<< "Extract: $url" sleep 2 # Respect API rate limitsdone
Batch similar requests:
# Instead of multiple callsclaude <<EOFExtract all these profiles in one request:1. linkedin.com/in/profile12. linkedin.com/in/profile23. linkedin.com/in/profile3EOF
Cache results:
# Save extracted dataoutput_file="cache/profile_${profile_id}.json"if [ ! -f "$output_file" ]; then # Extract only if not cached claude <<< "Extract: $url" > "$output_file"fi
#!/bin/bash# daily_report.shdate=$(date +%Y-%m-%d)report_file="reports/daily_${date}.md"claude <<EOF > "$report_file"Generate daily intelligence report:1. Check these LinkedIn company pages for updates: - https://linkedin.com/company/competitor1 - https://linkedin.com/company/competitor22. Monitor Reddit posts in r/industry for trending topics3. Analyze sentiment and key themes4. Format as executive summary in markdownEOF# Email the reportmail -s "Daily Intelligence Report - $date" \ -a "$report_file" \ executives@company.com < /dev/null
#!/bin/bash# validate_data.shinput_csv="leads.csv"output_csv="validated_leads.csv"# Validate each LinkedIn URLwhile IFS=, read -r id name linkedin_url; do # Check if profile exists and is accessible status=$(claude <<EOFCheck if this LinkedIn profile is valid and accessible:$linkedin_urlOutput only: VALID or INVALIDEOF ) echo "$id,$name,$linkedin_url,$status" >> "$output_csv"done < "$input_csv"