Skip to main content

Overview

The Anysite MCP Tool for Claude Code provides seamless CLI-based integration between Claude Code and the Anysite API through the Model Context Protocol (MCP). This allows you to access LinkedIn, Instagram, Reddit, and other social media data extraction tools directly in your Claude Code sessions using terminal commands.

Prerequisites

  • Claude Code installed (download here)
  • Terminal/Command line access
  • Anysite API account with active subscription
  • Basic familiarity with command line interfaces

Why Claude Code Integration?

CLI Control

Full command-line control for developers and power users

Scope Management

Configure per-project, per-user, or locally with flexible scopes

CI/CD Ready

Perfect for automation, scripts, and continuous integration pipelines

Version Control

Project-scoped configs can be committed and shared via .mcp.json

Installation Steps

Step 1: Get Connection URL

First, obtain your connection URL from the Anysite dashboard:
  1. Visit anysite.io and log in to your account
  2. Navigate to MCP Server Integration section
  3. You’ll see two connection options:
    • OAuth URL: https://mcp.anysite.io/mcp (for GUI clients)
    • Direct URL: Contains API key directly (recommended for Claude Code)
Anysite MCP Server Integration - Get Connection URL
  1. In the “Or add to your client” section, select Claude Code
  2. The “Auto” tab will display the complete terminal command
For Claude Code, use the Direct URL which includes your API key in the connection string.
Keep your connection URL secure - it contains your API key. Never share it publicly or commit it to version control.

Step 2: Install via Terminal

There are two installation methods available: Understanding Scopes:
Project-specific, private
  • Configuration stored in current directory
  • Not shared or version controlled
  • Best for: Personal API keys, temporary setups

Step 3: Verify Installation

After installation, verify the MCP server is working: List all configured servers:
Expected output:
Test specific server:
This command:
  • Tests the connection to Anysite MCP server
  • Shows available tools
  • Displays server status and configuration
Check within Claude Code conversation: During a Claude Code session, use:
This shows real-time MCP server status and available tools.
If you see ”✔ connected” status, the installation was successful!

Managing Your Connection

View Installed Servers

Update Server Configuration

To update the server URL or configuration:
  1. Remove existing server:
  2. Re-add with new configuration:

Remove Server

Known Issue: claude mcp remove may not properly remove project-scoped servers. If this happens, manually edit:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Debug Mode

For troubleshooting connection issues:
This runs Claude Code with detailed MCP debug output, showing:
  • Connection attempts
  • Tool discovery
  • Error messages
  • Transport details

Configuration Files

Claude Code stores MCP configurations in different locations based on scope:

Troubleshooting

Solutions:
  • Restart Claude Code completely
  • Verify the API key is valid and active
  • Check internet connectivity
  • Test the URL in browser (should return JSON)
  • Use debug mode: claude --mcp-debug
  • Check Anysite dashboard for API quota
Solutions:
  • Restart Claude Code application
  • Run claude mcp get anysite to test connection
  • Verify subscription includes the tools you need
  • Remove and re-add the server:
  • Check if API key has expired
Solutions:
  • Ensure Claude Code is properly installed
  • Add Claude Code to your PATH:
    • macOS: Add to ~/.zshrc or ~/.bashrc
    • Windows: Add to System Environment Variables
  • Restart terminal after installation
  • Try full path: /Applications/Claude.app/Contents/MacOS/claude (macOS)
Solutions:
  • Check your internet connection speed
  • Increase timeout with environment variable:
  • Try during off-peak hours
  • Contact Anysite support if persistent
Issue: Same server configured at multiple scopesSolutions:
  • List all servers to identify duplicates:
  • Remove from specific scope:
  • Re-add with desired scope only
Best practices:
  1. Use environment variables:
  2. Never commit keys to git:
  3. Use project scope with env vars:
  4. Rotate keys regularly from Anysite dashboard

Advanced Configuration

Multiple Environments

Configure different servers for dev/staging/production:

Custom Server Names

Use descriptive names for better organization:

Alternative: NPX Package

You can also use the NPX package method for more flexibility:
This method:
  • Auto-updates to the latest package version
  • Works across different environments consistently
  • Supports additional environment variables for customization

Comparison: Claude Code vs Other Integrations

Environment Variables

Useful environment variables for Claude Code MCP:
Add to your shell profile (~/.zshrc, ~/.bashrc) for persistent settings.

Security Best Practices

Environment Variables

Store API keys in environment variables, never hardcode in commands

Scope Selection

Use local scope for sensitive keys, project for shared configs

Git Ignore

Always add .claude-local.json and .mcp.json to .gitignore

Key Rotation

Regularly regenerate API keys from Anysite dashboard

Audit Access

Review configured servers periodically with claude mcp list

Remove Unused

Clean up old server configs to reduce security surface

Next Steps

Need Help?

Get Support

Contact our support team for assistance with Claude Code MCP integration