Practical examples and workflows using Anysite MCP in Claude Code
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.
Once configured, simply start Claude Code and the MCP server connects automatically:
claude
Your Anysite tools are immediately available. Try:
What MCP tools do I have access to?
Claude will list all available Anysite tools from the connected MCP server.
Example: LinkedIn Profile Analysis
Extract information from this LinkedIn profile:
https://linkedin.com/in/satyanadella
Focus on:
- Current role and company
- Career progression
- Education background
Claude will use the linkedin_user MCP tool to fetch and analyze the data.
For tools you use across all your projects:
# Add to user scope (available everywhere)
claude mcp add --transport http --scope user anysite "https://mcp.anysite.io/mcp?api_key=YOUR_KEY"
Use case: You're a researcher who frequently extracts LinkedIn data across multiple projects.
Benefits:
For shared team projects with version-controlled config:
# Navigate to project directory
cd my-team-project
# Add with project scope
claude mcp add --scope project anysite "https://mcp.anysite.io/mcp" \
--env API_KEY=$ANYSITE_API_KEY
# Commit .mcp.json to git
git add .mcp.json
git commit -m "Add Anysite MCP configuration"
Team members then:
# Pull the project
git pull
# Set their own API key
export ANYSITE_API_KEY="their_key_here"
# Claude Code automatically uses project config
claude
Benefits:
For quick tests or temporary work:
# Add with local scope (default)
claude mcp add --transport http anysite "https://mcp.anysite.io/mcp?api_key=TEMP_KEY"
# Use for this session
claude
# Remove when done
claude mcp remove anysite
Use case: Testing with a trial API key or working on a temporary proof-of-concept.
Setup:
# Create research project
mkdir competitor-research
cd competitor-research
# Add Anysite with project scope
claude 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/zoho
2. Extract:
- Company size
- Growth trends
- Recent updates
- Key executives
3. Create a comparison table
Automated with script:
#!/bin/bash
# research.sh
companies=(
"salesforce"
"hubspot"
"zoho"
)
for company in "${companies[@]}"; do
echo "Researching $company..." >> research.log
claude <> enrich_data >> load_db
Scenario: You work on different projects with different MCP needs.
# Project A: Marketing research
cd ~/projects/marketing-research
claude mcp add --scope project anysite-marketing "URL1"
# Project B: Sales intelligence
cd ~/projects/sales-intel
claude mcp add --scope project anysite-sales "URL2"
# Personal utilities (available everywhere)
claude mcp add --scope user anysite-personal "URL3"
Check current configuration:
# In any project
claude mcp list
# Output shows:
# anysite-personal (user scope) ✔ connected
# anysite-marketing (project scope, if in marketing-research/) ✔ connected
# Work on marketing project
cd ~/projects/marketing-research
claude # Uses marketing-research/.mcp.json + user scope
# Switch to sales project
cd ~/projects/sales-intel
claude # Uses sales-intel/.mcp.json + user scope
# Personal work
cd ~/documents
claude # Uses only user scope
Process multiple LinkedIn profiles:
#!/bin/bash
# batch_linkedin_extract.sh
input_file="linkedin_urls.txt"
output_dir="./extracted_data"
mkdir -p "$output_dir"
while IFS= read -r url; do
# Extract profile ID from URL
profile_id=$(echo "$url" | sed 's/.*linkedin.com\/in\///' | sed 's/\/.*//')
echo "Processing: $profile_id"
# Use Claude Code with MCP
claude < "${output_dir}/${profile_id}.json"
Extract LinkedIn profile data from: $url
Output as JSON with these fields:
{
"profile_id": "$profile_id",
"extracted_at": "$(date -Iseconds)",
"data": {
"name": "",
"headline": "",
"location": "",
"current_position": {},
"experience": [],
"education": [],
"skills": []
}
}
EOF
# Rate limiting
sleep 2
done < "$input_file"
echo "Batch processing complete. Extracted $(ls -1 "$output_dir" | wc -l) profiles."
#!/bin/bash
# conditional_analysis.sh
company_url="https://linkedin.com/company/target-company"
# Extract data and analyze
result=$(claude <20% employee growth)
2. In tech industry
3. Located in US
Output only: YES or NO
EOF
)
if [ "$result" = "YES" ]; then
echo "Company matches criteria. Generating detailed report..."
claude <> mcp_status.log
Run periodically:
# Add to crontab
0 */4 * * * /path/to/check_mcp_status.sh
#!/bin/bash
# robust_extraction.sh
extract_with_retry() {
local url=$1
local max_attempts=3
local attempt=1
while [ $attempt -le $max_attempts ]; do
echo "Attempt $attempt of $max_attempts"
output=$(claude <&1
Extract data from: $url
Output as JSON
EOF
)
# Check if extraction succeeded
if echo "$output" | jq . > /dev/null 2>&1; then
echo "$output"
return 0
fi
echo "Extraction failed, retrying..."
attempt=$((attempt + 1))
sleep 5
done
echo "ERROR: Failed after $max_attempts attempts"
return 1
}
# Usage
if result=$(extract_with_retry "https://linkedin.com/in/profile"); then
echo "$result" > output.json
echo "Success"
else
echo "Failed to extract data" >&2
exit 1
fi
**Use for:**
- Personal API keys
- Tools you use everywhere
- Cross-project utilities
**Example:**
```bash
claude mcp add --scope user \
anysite "URL"
```
**Use for:**
- Team collaborations
- Version-controlled configs
- Project-specific setups
**Example:**
```bash
claude mcp add --scope project \
anysite "URL" \
--env API_KEY=$KEY
```
**Use for:**
- Temporary setups
- Testing
- Sensitive credentials
**Example:**
```bash
claude mcp add \
anysite-test "URL"
```
.gitignore--scope local for sensitive keysclaude mcp listRate limiting:
# Add delays between requests
for url in "${urls[@]}"; do
claude <<< "Extract: $url"
sleep 2 # Respect API rate limits
done
Batch similar requests:
# Instead of multiple calls
claude < "$output_file"
fi
#!/bin/bash
# daily_report.sh
date=$(date +%Y-%m-%d)
report_file="reports/daily_${date}.md"
claude < "$report_file"
Generate daily intelligence report:
1. Check these LinkedIn company pages for updates:
- https://linkedin.com/company/competitor1
- https://linkedin.com/company/competitor2
2. Monitor Reddit posts in r/industry for trending topics
3. Analyze sentiment and key themes
4. Format as executive summary in markdown
EOF
# Email the report
mail -s "Daily Intelligence Report - $date" \
-a "$report_file" \
executives@company.com < /dev/null
# Start research session
claude
# Then interactively:
#!/bin/bash
# validate_data.sh
input_csv="leads.csv"
output_csv="validated_leads.csv"
# Validate each LinkedIn URL
while IFS=, read -r id name linkedin_url; do
# Check if profile exists and is accessible
status=$(claude <> "$output_csv"
done < "$input_csv"
Contact our support team for assistance with Claude Code MCP workflows