Skip to main content

Overview

The AnySite MCP Tool for Cursor provides seamless integration between Cursor IDE 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 within your Cursor AI coding sessions.

Prerequisites

  • Cursor IDE installed (download here)
  • Node.js and npm installed (for NPX method)
  • AnySite API account with active subscription
  • Basic familiarity with JSON configuration

Why Cursor Integration?

AI-Powered Coding

Access data extraction tools while coding with Cursor’s AI assistant

Project Integration

Configure MCP per-project or globally for all your workspaces

Real-time Data

Extract social media data directly in your development workflow

Developer Friendly

JSON-based configuration that’s easy to version control and share

Installation Steps

Step 1: Get Your API Key

First, obtain your API key from the AnySite dashboard:
  1. Visit app.anysite.io and log in to your account
  2. Navigate to MCP Server Integration section
  3. Copy your API key from the dashboard
Keep your API key secure - never share it publicly or commit it to version control.

Step 2: Configure MCP in Cursor

There are two ways to configure MCP in Cursor: Configuration breakdown:
  • command: "npx" - Uses npx to run the MCP package
  • args: ["-y", "@anysiteio/mcp"] - Auto-confirms and runs the AnySite MCP package
  • ANYSITE_API_KEY - Your API key from the AnySite dashboard
  • ANYSITE_ACCOUNT_ID - Optional account ID (leave empty if not needed)

Step 3: Using Environment Variables (Secure Method)

For better security, use environment variables instead of hardcoding the API key: Option 1: Shell Environment Add to your shell profile (~/.zshrc, ~/.bashrc):
export ANYSITE_API_KEY="your_api_key_here"
Then update your mcp.json:
{
  "mcpServers": {
    "anysite": {
      "command": "npx",
      "args": ["-y", "@anysiteio/mcp"],
      "env": {
        "ANYSITE_API_KEY": "${ANYSITE_API_KEY}",
        "ANYSITE_ACCOUNT_ID": ""
      }
    }
  }
}
Option 2: .env File Create a .env file in your project root:
ANYSITE_API_KEY=your_api_key_here
Always add .env to your .gitignore to prevent accidental commits of sensitive data.

Step 4: Verify Installation

After configuration, verify the MCP server is working:
  1. Restart Cursor or reload the window (Cmd/Ctrl + Shift + P → “Reload Window”)
  2. Open Cursor AI Chat and ask:
    What MCP tools do you have access to?
    
  3. Test with a simple request:
    Get information about this LinkedIn profile: linkedin.com/in/username
    
If everything is working correctly, Cursor AI will list the available AnySite tools and be able to execute data extraction requests.

Managing Your Connection

Update Configuration

To update your API key or other settings:
  1. Edit the mcp.json file
  2. Save the changes
  3. Restart Cursor or reload the window

Remove MCP Server

To remove the AnySite MCP integration:
  1. Delete the anysite entry from your mcp.json file
  2. Or delete the entire mcp.json file if not using other MCP servers
  3. Restart Cursor

Multiple MCP Servers

You can configure multiple MCP servers in the same file:
{
  "mcpServers": {
    "anysite": {
      "command": "npx",
      "args": ["-y", "@anysiteio/mcp"],
      "env": {
        "ANYSITE_API_KEY": "YOUR_API_KEY",
        "ANYSITE_ACCOUNT_ID": ""
      }
    },
    "other-server": {
      "command": "npx",
      "args": ["-y", "other-mcp-package"],
      "env": {}
    }
  }
}

Troubleshooting

Solutions:
  • Ensure Node.js and npm are installed and in your PATH
  • Verify the API key is valid and active
  • Check internet connectivity
  • Restart Cursor completely
  • Check the Cursor logs for error messages
Solutions:
  • Reload the Cursor window (Cmd/Ctrl + Shift + P → “Reload Window”)
  • Verify the mcp.json file syntax is correct (valid JSON)
  • Check that the file is in the correct location
  • Ensure your AnySite subscription is active
Solutions:
  • Install Node.js from nodejs.org
  • Ensure npm is in your system PATH
  • Try running npx --version in terminal to verify
  • On Windows, you may need to restart after Node.js installation
Solutions:
  • Validate your JSON at jsonlint.com
  • Check for missing commas, brackets, or quotes
  • Ensure no trailing commas after the last item in objects/arrays
  • Use a JSON formatter extension in your editor
Solutions:
  • Verify the API key is correct (no extra spaces)
  • Check if your AnySite subscription is active
  • Try generating a new API key from the dashboard
  • Ensure the key has the necessary permissions
Solutions:
  • Restart your terminal/shell after adding env vars
  • Start Cursor from the terminal: cursor .
  • On macOS, GUI apps may not inherit shell env vars
  • Try using the direct API key method to test

Security Best Practices

Environment Variables

Store API keys in environment variables, never hardcode in configuration files

Git Ignore

Always add .cursor/mcp.json and .env to .gitignore

Key Rotation

Regularly regenerate API keys from AnySite dashboard

Audit Access

Review API usage periodically in your AnySite dashboard
.gitignore example:
# MCP configuration with API keys
.cursor/mcp.json

# Environment files
.env
.env.local
.env.*.local

Comparison: Cursor vs Other Integrations

FeatureCursorClaude Code (CLI)Claude Desktop
InterfaceIDE integratedCommand lineDesktop app
SetupJSON configTerminal commandOAuth GUI
Best ForAI-assisted codingDevelopers, automationGeneral users
Project ScopePer-project configMultiple scopesGlobal only
Version Control.cursor/mcp.json.mcp.jsonNot applicable

Next Steps

Need Help?

Get Support

Contact our support team for assistance with Cursor MCP integration