Cursor MCP Tool Installation

Connect Anysite MCP Server to Cursor IDE using JSON configuration

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

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:

Project Configuration (Recommended)

Create a `.cursor/mcp.json` file in your project root:

```json
{
  "mcpServers": {
    "anysite": {
      "command": "npx",
      "args": ["-y", "@anysiteio/mcp"],
      "env": {
        "ANYSITE_API_KEY": "YOUR_API_KEY",
        "ANYSITE_ACCOUNT_ID": ""
      }
    }
  }
}
```

**Steps:**
1. Open your project in Cursor
2. Create `.cursor` directory in project root (if it doesn't exist)
3. Create `mcp.json` file inside `.cursor` directory
4. Paste the configuration above
5. Replace `YOUR_API_KEY` with your actual API key
6. Restart Cursor or reload the window
Project-specific configuration is ideal for team collaboration. Add `.cursor/mcp.json` to `.gitignore` if your API key is included directly.

Global Configuration

Configure MCP globally for all Cursor projects:

**For macOS:**
Edit `~/.cursor/mcp.json`:

**For Windows:**
Edit `%USERPROFILE%\.cursor\mcp.json`:

**For Linux:**
Edit `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "anysite": {
      "command": "npx",
      "args": ["-y", "@anysiteio/mcp"],
      "env": {
        "ANYSITE_API_KEY": "YOUR_API_KEY",
        "ANYSITE_ACCOUNT_ID": ""
      }
    }
  }
}
```
Global configuration makes Anysite tools available in all your Cursor projects without per-project setup.

Configuration breakdown:

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

MCP server not connecting

**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

Tools not appearing in Cursor AI

**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

NPX command not found

**Solutions:**
- Install Node.js from [nodejs.org](https://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

Invalid JSON syntax error

**Solutions:**
- Validate your JSON at [jsonlint.com](https://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

API key not working

**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

Environment variables not loading

**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

Feature Cursor Claude Code (CLI) Claude Desktop
Interface IDE integrated Command line Desktop app
Setup JSON config Terminal command OAuth GUI
Best For AI-assisted coding Developers, automation General users
Project Scope Per-project config Multiple scopes Global only
Version Control .cursor/mcp.json .mcp.json Not applicable

Next Steps

Need Help?

Get Support

Contact our support team for assistance with Cursor MCP integration